[LinuxBIOS] epia, rom_cc and locking code

Ben Hewson ben at hewson-venieri.com
Sat Oct 21 12:18:46 CEST 2006


Ok first off the issue with ROM_CC and #if - #else - #endif not
compiling properly.

After some testing I have at least found the problem and it only ever
happens if you put  a C++ style
comment on the same line as the #if or #else

so in the following example

static void test_ifdef(void)
{

#if TEST_IFDEF // blows up
    outb(50,100);
    outb(51,100);
    outb(52,100);
#else  /* ok */
    outb(60,100);
    outb(61,100);
    outb(62,100);
#endif
}


Of course no comment works fine as well.  Also putting a blank line
after the comment produces the correct code.
I can't say for the rest of the linuxbios code, but the via/epia code
seems to have a good mixture of both types of comments.

Perhaps as the code is not strictly C++ you should stick to using
standard C style comments.

Ok now to my problems with the EPIA board. I think in general it is
working ok, but I still have some problems.


More information about the coreboot mailing list