Skip site navigation (1)Skip section navigation (2)
Date:      09 Nov 96 15:08:34 EST
From:      Berend de Boer <100120.3121@CompuServe.COM>
To:        FreeBSD stable <freebsd-stable@freebsd.org>
Subject:   Follow on Atlantis board
Message-ID:  <961109200834_100120.3121_EHQ22-1@CompuServe.COM>

next in thread | raw e-mail | index | archive | help
Some more info:

in start.S (called immediately after booteasy passes control?) we added a

	mov   $0x0080, %edx

so the code looks like:

        /* bootstrap passes us drive number in %dl */
	mov   $0x0080, %edx
        cmpb    $0x80, %dl
        data32
        jae     hd

However in boot() in boot.c drive is still 0x333b.

After that we removed this line, and added it to the last lines of boot2.S:

	mov   $0x0080, %edx
        movzbl  %dl, %edx       /* discard head (%dh) and random high bits */
        pushl   %edx
        call    EXT(boot)        

Still in boot() drive was 0x333b... I thought i went crazy. 

Next we added a printf(drive) immediately after the boot() int ret with the
above patch intact. We also had a printf before the dosdev = drive; line. Now
the first printf showed 0x0080, but the 2nd was 0x333b.

It seemed boot() was screwing up the stack somehow?? After some printf's
the following line screws the stack:

  for(ret = 0; ret < N_BIOS_GEOM; ret ++)
    bootinfo.bi_bios_geom[ret] = get_diskinfo(ret + 0x80);

I think it's get_diskinfo. But get_diskinfo seems too difficult for me to
investigate. Maybe some FreeBSD boot guru has an idea?


Groetjes,

Berend.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?961109200834_100120.3121_EHQ22-1>