Re: [Etherboot-developers] [COMMIT] 5.1.2+ boot from disk.
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: <ebi...@ln...> - 2002-08-28 01:13:28
|
"Timothy Legge" <tl...@ro...> writes:
> > The Roms file at least works for me. I just verified it.
>
> Strange, I will try another update.
>
> > I can think of two software possibilities.
> > 1) I may be stressing your version of binutils and the compiler
> > into compiling incorrect code. If you could run
>
> It seems that there is no comparison. I am usin Mandrake kgcc
>
> ld --version
> GNU ld 2.10.91
> Copyright 2000 Free Software Foundation, Inc.
> This program is free software; you may redistribute it under the terms of
> the GNU General Public License. This program has absolutely no warranty.
> Supported emulations:
> elf_i386
> i386linux
This is probably o.k. There is a bug fixed and I believe introduced
somewhere between 2.10 and 2.12.90.0.9 that puts junk at the end of
assembly files. So be careful. If you had earlier than 2.9 I might
worry but you are probably o.k.
> kgcc --version
> egcs-2.91.66
I would be surprised if the compiler version makes a difference.
I use roughly the same compiler for compiling LinuxBIOS because
the later ones appear to introduce code bloat.
> > 2) Etherboot appears to be incorrectly deteceting your available memory.
> > At line 360 of osloader.c could you change.
>
> I receive
>
> Memory regions(32)
Ouch! The e820 map worked found 32 memory regions, none of them
with ram!
> I guess I should update my compiler etc.
Carefully. At this point I think it is interesting information but
I wouldn't jump terribly fast.
I would start with memsizes.c
The following patch should work around the immediate problem.
A little more investigation is probably called for to see
what is actually in the returned e820 map.
void get_memsizes(void)
{
int i;
+ int e820_ram;
meminfo.basememsize = basememsize();
meminfo.memsize = memsize();
meminfo.map_count = meme820(meminfo.map, E820MAX);
+ e820_ram = 0;
+ for(i = 0; i < meminfo.map_count; i++) {
+ if (meminfo.map[i].type == E820_RAM) {
+ e820_ram = 1;
+ break;
+ }
+ }
- if (meminfo.map_count == 0) {
+ if (!e820_ram) {
/* If we don't have an e820 memory map fake it */
meminfo.map_count = 2;
meminfo.map[0].addr = 0;
meminfo.map[0].size = meminfo.basememsize << 10;
meminfo.map[0].type = E820_RAM;
meminfo.map[1].addr = 1024*1024;
meminfo.map[1].size = meminfo.memsize << 10;
meminfo.map[1].type = E820_RAM;
}
/* Allocate the real mode stack */
real_mode_stack = (meminfo.basememsize << 10);
}
Eric
|