Port-i386 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: A bug in pbr.S perhaps
On Sun, Jan 13, 2008 at 10:21:13AM +0800, abutter gao wrote:
> First, the pbr code rarely goes to no_netbsd_ptn in pbr.S, right ?
>
> it will get there when no expected partition is found, and if the ESI
> register holding the LBA sector number pass by mbr is not zero, maybe
> there is a netbsd partition, so pbr code will try to clear the ESI
> register and the lba_sector and then boot the netbsd partition found
> first.
>
> The code is below:
> ------------------
> 204 no_netbsd_ptn:
> 205 /* Specific sector not found: try again looking for first NetBSD ptn
> */
> 206 testl %esi, %esi
> 207 set_err(ERR_PTN)
> 208 jz error
> 209 xorl %esi, %esi
> 210 movl %esi, lba_sector
> 211 jmp start
> ------------------
>
> But, the start's address is PRIMARY_LOAD_ADDRESS but not 0x7c00, so
> maybe it will crash when booting the last-checked partition.
No, all jumps and calls are PC-relative inxtructions.
David
--
David Laight: david%l8s.co.uk@localhost
Home |
Main Index |
Thread Index |
Old Index