Re: [Etherboot-developers] [COMMIT] 5.1.2+ boot from disk.
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: <ebi...@ln...> - 2002-08-30 11:30:08
|
Michael Brown <mb...@fe...> writes:
> OK, it works. I can now boot a full Linux kernel from EB 5.1.x, using the
> same image as for EB 5.0.x. Have checked in two changes to osloader.c,
> both of which I'm not 100% sure about:
I have just put in some updated fixes, that solve the problems more
cleanly (assuming they work.)
> 1. The BSS is no longer zeroed, in order to avoid vapourising the NBI
> header.
>
> Q: How important is it to zero the BSS? Linux seems to boot fine
> without it, haven't tried anything else.
Zeroing the BSS isn't terribly important (though it is speced for ELF
images). The nice attribute is that it gives predictable behavior.
Bugs that depend on the contents of memory are nasty to track.
The alternative solution is to call prep_segment before ``loading''
the first 512 bytes. In that case the zeroing does not matter. Plus
since we know all of the segments must fit in 512 bytes a more lock
resistant sanity check can be implemented.
> 2. When load_block() is called with eof=1, os_download() gets called
> twice: once with the normal data block and once more as
> os_download(NULL,0,eof). This is how tagged_download() expects to be
> used.
>
> Q: Will this break the other *_download() routines?
It won't break them because they honor the eof flag, and so the
code will never be called. So mostly the second call is bloat.
I have instead changed the while loop in tagged download:
data += i;
- } while (len > 0)
+ } while ((len > 0) || eof);
return 0;
And the tagged_download should honor the eof flag.
The real potential for problems come from other callers (like
the disk code), and differences in requirements between the probe
routines.
This is good debugging by the way, thanks.
Eric
|