Re: [Etherboot-developers] [COMMIT] 5.1.2+ boot from disk.
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: Michael B. <mb...@fe...> - 2002-08-29 19:03:02
|
On 29 Aug 2002, Eric W Biederman wrote:
> > That is one address I forget to check to see if it is safe to load. Want to
> > take a look at that?
> In particular something like:
> printf("(NBI)");
> /* Zero all context info */
> memset(&tctx, 0, sizeof(tctx));
> /* Copy first 4 longwords */
> memcpy(&tctx.img, data, sizeof(tctx.img));
> /* Memory location where we are supposed to save it */
> tctx.segaddr = tctx.linlocation =
> ((tctx.img.u.segoff.ds) << 4) + tctx.img.u.segoff.bx;
> + if (!prep_segment(tctx.segaddr, tctx.segaddr + 512, tctx.segaddr + 512,
> + 0, 512) {
> + return 0;
> + }
> /* Grab a copy */
> memcpy(phys_to_virt(tctx.segaddr), data, 512);
> /* Advance to first segment descriptor */
> tctx.segaddr += ((tctx.img.length & 0x0F) << 2)
> + ((tctx.img.length & 0xF0) >> 2);
> /* Remember to skip the first 512 data bytes */
> tctx.first = 1;
Have added the patch, didn't make any difference so it wasn't that that
was the problem anyway. In tagged_download(), I added an abort if
sh.length == 0 (same defence as before). Etherboot will now download the
image (or something that looks to be the right size) but fails to boot
because it can't find the segment with (sh.flags & 0x04) set. At least it
doesn't lock up and force me to reboot each time I want to test it now!
:-)
It looks as though the downloaded image is being corrupted somehow. I'm
using an image that is known to work with Etherboot 5.0.6 through to
current 5.0.x HEAD, so it's not the image itself.
Progress, albeit slow, is happening.
Michael Brown
http://www.fensystems.co.uk
|