[okl4-developer] IDL & vtables
Ryan Heffernan
ryan.heffernan at nicta.com.au
Tue Mar 4 11:12:58 EST 2008
Hello,
I'm currently dealing with some code written for an old (2006) version
of Nicta L4 and Iguana, and I'm at a standstill with the IDL compiler
and some vtables. Firstly, i wanted to ask if vtables are still in use
in OKL4/Iguana, and if so how they get generated? Looking at the timer
and serial main.c files it looks like they use vtables, but then I don't
think that code gets compiled because virtual drivers are used.
Here's an example of the vtable use in my code:
void *device_vtable[DEVICE_DEFAULT_VTABLE_SIZE] =
DEVICE_DEFAULT_VTABLE;
and later on...
int a = (magpie_get_interface_bigid(&msgbuf));
switch (a) {
case 42:
idl4_process_request(&partner, &msgtag, &msgbuf,
&cnt, device_vtable[idl4_get_function_id(&msgtag) & DEVICE_FID_MASK]);
The .idl4 file for this server does indeed contain a "device" interface,
but the build system gives the following complaints:
`DEVICE_DEFAULT_VTABLE_SIZE' undeclared here (not in a function)
`DEVICE_DEFAULT_VTABLE' undeclared here (not in a function)
If vtables are still being used, they must be defined and/or generated
differently than they were in 2006, so it would be a big help to me if
someone could explain how this process works or just simply how I can
work around it. Thanks!
Also, my code needs to make use of the packet_t structure defined in
driver/include/driver.h, but the iguana SConstruct builds
driverv2/include/driver.h instead. So I hacked the following code in the
Sconstruct to make it build the driver files I want:
if ig_env.machine.device_core is not None:
ig_env.Package("libs/driver")#NEW
ig_env.Package("drivers/drv_smc91x")#NEW
Do you think this could eventually have disastrous consequences?
Ryan
More information about the Developer
mailing list