Port-i386 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: A bug in pbr.S perhaps




To: abutter gao <abutter.gao%gmail.com@localhost>

Subject: Re: A bug in pbr.S perhaps

From: David Laight <david%l8s.co.uk@localhost>

Date: Sun, 13 Jan 2008 07:44:08 +0000


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



Follow-Ups:

Re: A bug in pbr.S perhaps
From: abutter gao


References:

A bug in pbr.S perhaps
From: abutter gao




Prev by Date: Re: wm(4) problems

Next by Date: Re: MATH_EMULATE

Previous by Thread: A bug in pbr.S perhaps

Next by Thread: Re: A bug in pbr.S perhaps

Indexes:

reverse Date

reverse Thread

Old Index



Home | Main Index | Thread Index | Old Index