Re: [Etherboot-developers] mknbi-1.2-7rc2 released
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: <ke...@us...> - 2002-02-27 21:38:12
|
>Just doing a code review I can say that there are some serious logic bugs. >Usually there are at least 2 ram segments in the returned e820 information >which is a little screwy. Can you elaborate? >But more interesting the following logic in first32.c is just wrong. > > top_of_mem = ((setup->su_version >= 0x203) ? > setup->ramdisk_max : > (e->addr + e->size) > ) >> 10; > >setup->ramdisk_max is in bytes not kilobytes. > >And if you set the top_of_ram to just under 1GB on a 16M machine your >ramdisk will fail miserably. Unless there is some magic that just >makes this code work... But top_of_mem is measured in kB (I know, it's confusing, maybe I should rationalise that). Note the parentheses. ramdisk_max is at the same level as e->addr + e->size. If expanded it looks like this: if (su_version >= 0x203) temp = ramdisk_max; else temp = e->addr + e->size; top_of_mem = temp >> 10; |