[LinuxBIOS] FILO with the USB

Fridel Fainshtein fainshf at gmail.com
Fri Nov 16 13:42:19 CET 2007


Etherboot does not work with gcc 4. At least filo part.
As I remember, I found a few strange things like
#if 0 <-- original
#define isdigit(c)      ((c & 0x04) != 0)
#define islower(c)      ((c & 0x02) != 0)
//#define isspace(c)    ((c & 0x20) != 0)
#define isupper(c)      ((c & 0x01) != 0)
#else <-- not optimized correction
#define isdigit(c)      (c >= '0' && c <= '9')
#define islower(c)      (c >= 'a' && c <= 'z')
#define isupper(c)      (c >= 'A' && c <= 'Z')
#endif

These strange things caused FILO in ETHERBOOT not to work.
I"ve never tested but does FILO in ETHERBOOT work if it is compiled with gcc 3?

Not optimized suggestion for allot2:
void *allot2(size_t size, unsigned int alignment)
{
       void         *addr;
       unsigned long addrval;
       int           pSize = sizeof(unsigned long);

   if(((alignment + 1) & alignment) != 0)
               return (void *)0;

       addr=malloc(size + alignment + /*2**/pSize);

       addrval=(unsigned long)addr/* + pSize*/;
       addrval+=alignment+1; //  0x12345600 + 0xff + 1
       addrval&=~alignment;  //  0x12345700
       *(unsigned long *)(addrval-sizeof(unsigned long))=addr;
       return (void *)addrval;
}

dma_to_td still appears, but "malloc_check: sizes mismatch" disappeared
and I can see a led blinking on my USB

On Nov 16, 2007 7:31 AM, yhlu <yinghailu at gmail.com> wrote:
> On Nov 15, 2007 7:38 AM, Corey Osgood <corey.osgood at gmail.com> wrote:
> > Fridel Fainshtein wrote:
> > > I compared to etherboot and it works there.
> > > In Etherboot there are 2 set of bswap functions:
> > > 1) little
> > > 2) big
> > >
> so any reason for not using etherboot with filo or kernel loader?
>
> YH
>




More information about the coreboot mailing list