Commit a8776d26 authored by Charles Jacobsen's avatar Charles Jacobsen Committed by Vikram Narayanan

Fixed build errors for big test.

Just need to install boot endpoint.
parent 6a7da47e
......@@ -22,18 +22,17 @@ struct lcd_handler {
int (*handler)(void);
};
static inline struct lcd * current_lcd(void)
{
return current->lcd;
}
static inline int lcd_send(cptr_t c)
{
return __lcd_send(current_lcd(), c);
}
static inline int lcd_recv(cptr_t c)
{
return __lcd_recv(current_lcd(), c);
}
static inline int lcd_reply(void)
{
return lcd_send(current_lcd(), lcd_reply_cap());
return lcd_send(lcd_reply_cap());
}
static inline int lcd_call(cptr_t c)
{
......@@ -55,9 +54,11 @@ static inline int lcd_rm_sync_endpoint(cptr_t c)
return __lcd_rm_sync_endpoint(current_lcd(), c);
}
#if 0
static inline int lcd_select(struct lcd_handlers *hs, int hs_count)
{
return -ENOSYS;
}
#endif
#endif /* LCD_PROTOTYPE_IPC_H */
......@@ -122,6 +122,11 @@ LCD_MK_IN_CAP_REG_ACCESS(7);
/* REPLY INFO ---------------------------------------- */
static inline cptr_t lcd_reply_cap(void)
{
return current_lcd()->utcb.reply_endpoint_cap;
}
static inline u64 lcd_reply_badge(void)
{
/* not implemented */
......
......@@ -15,16 +15,21 @@ extern void __dealer_exit(void);
/* IDL/LCD DEFS -------------------------------------------------- */
#include <linux/slab.h>
#include "dealer-idl.h"
#include "manufacturer-idl.h"
#include "../include/common.h"
#include "../include/ipc.h"
#include "../include/api.h"
#include "../include/api-internal.h"
#include "../include/utcb.h"
/* INTERFACE WRAPPERS -------------------------------------------------- */
cptr_t manufacturer_interface_cap;
struct engine * mk_engine_caller(int cylinders);
struct automobile * mk_automobile_caller(struct engine *e, int doors);
void free_engine_caller(struct engine *e);
void free_automobile_caller(struct automobile *a);
/**
* dealer_register_manufacturer_callee
......@@ -75,7 +80,7 @@ fail1:
* lcd_r1 = (cptr) to auto; used to refer to car in dealer space
* lcd_r2 = (cptr) to engine inside auto
*/
static int * dealer_buy_car_callee(void)
static int dealer_buy_car_callee(void)
{
int ret;
struct automobile *a;
......@@ -93,12 +98,12 @@ static int * dealer_buy_car_callee(void)
/*
* Alloc capabilities
*/
ret = lcd_ds_store(a, &auto_dsptr, lcd_reply_badge());
ret = lcd_ds_store(a, lcd_reply_badge(), &auto_dsptr);
if(ret) {
LCD_ERR("store auto");
goto fail2;
}
ret = lcd_ds_store(a->engine, &engine_dsptr, lcd_reply_badge());
ret = lcd_ds_store(a->engine, lcd_reply_badge(), &engine_dsptr);
if(ret) {
LCD_ERR("store engine");
goto fail3;
......@@ -144,9 +149,9 @@ static int dealer_return_car_callee(void)
* Get and remove engine from data store
*/
auto_dsptr = (dsptr_t)lcd_r1();
a = lcd_ds_drop(lcd_reply_badge(), engine_dsptr);
a = lcd_ds_drop(lcd_reply_badge(), auto_dsptr);
if (!a) {
LCD_ERR("bad auto dsptr %lld", engine_dsptr);
LCD_ERR("bad auto dsptr %lld", auto_dsptr);
ret = -EINVAL;
goto fail1;
}
......@@ -187,7 +192,7 @@ int dealer_die_callee(void)
* Kill manufacturer
*/
lcd_store_r0(MANUFACTURER_DIE);
ret = lcd_call(manfacturer_interface_cap);
ret = lcd_call(manufacturer_interface_cap);
if (ret)
return ret;
/*
......@@ -288,6 +293,7 @@ fail1:
*/
void free_engine_caller(struct engine *e)
{
int ret;
/*
* Free on callee side
*/
......@@ -316,6 +322,7 @@ fail:
*/
void free_automobile_caller(struct automobile *a)
{
int ret;
/*
* Free on callee side
*/
......@@ -364,7 +371,7 @@ int execution_loop(void)
ret = dealer_return_car_callee();
break;
case DEALER_DIE:
ret = dealer_die();
ret = dealer_die_callee();
goto out;
}
......
......@@ -11,7 +11,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include "common.h"
#include "../include/common.h"
#include "dealer.h"
MODULE_LICENSE("GPL");
......
......@@ -16,9 +16,10 @@ extern void __manufacturer_exit(void);
/* IDL/LCD DEFS -------------------------------------------------- */
#include "manufacturer-idl.h"
#include "dealer-idl.h"
#include "../include/common.h"
#include "../include/ipc.h"
#include "../include/api.h"
#include "../include/api-internal.h"
#include "../include/utcb.h"
/* INTERFACE WRAPPERS -------------------------------------------------- */
......@@ -54,7 +55,7 @@ static int mk_engine_callee(void)
/*
* Alloc capability
*/
ret = lcd_ds_store(e, &engine_dsptr, lcd_reply_badge());
ret = lcd_ds_store(e, lcd_reply_badge(), &engine_dsptr);
if(ret) {
LCD_ERR("store engine");
goto fail2;
......@@ -120,7 +121,7 @@ static int mk_automobile_callee(void)
/*
* Put in data store
*/
ret = lcd_ds_store(a, &auto_dsptr, lcd_reply_badge());
ret = lcd_ds_store(a, lcd_reply_badge(), &auto_dsptr);
if(ret) {
LCD_ERR("store auto");
goto fail2;
......@@ -204,8 +205,8 @@ static int free_automobile_callee(void)
* Get and remove auto from data store
*/
auto_dsptr = (dsptr_t)lcd_r1();
e = lcd_ds_drop(lcd_reply_badge(), auto_dsptr);
if (!e) {
a = lcd_ds_drop(lcd_reply_badge(), auto_dsptr);
if (!a) {
LCD_ERR("bad auto dsptr %lld", auto_dsptr);
ret = -EINVAL;
goto fail1;
......@@ -332,7 +333,7 @@ int execution_loop(void)
ret = free_automobile_callee();
break;
case MANUFACTURER_DIE:
manufacturer_die();
manufacturer_die_callee();
goto out;
}
......
......@@ -7,7 +7,7 @@
#ifndef LCD_PROTOTYPE_MANUFACTURER_IDL_H
#define LCD_PROTOTYPE_MANUFACTURER_IDL_H
enum manufacturer_interface {
enum manufacturer_interface_enum {
MANUFACTURER_MK_ENGINE,
MANUFACTURER_MK_AUTOMOBILE,
MANUFACTURER_FREE_ENGINE,
......
......@@ -12,7 +12,7 @@
#include <linux/module.h>
#include <linux/slab.h>
#include "common.h"
#include "../include/common.h"
#include "dealer.h"
static struct engine * mk_engine(int cylinders)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment