Subject: Re: mbr seems to check MBR_MAGIC against wrong location
To: David Laight <david@l8s.co.uk>
From: Yuichiro Goto <goto@acr.kanazawa-it.ac.jp>
List: port-i386
Date: 05/06/2005 17:41:25
David Laight wrote:

>On Fri, May 06, 2005 at 10:17:11AM +0900, Yuichiro Goto wrote:
>  
>
>>Hi,
>>
>>I recently read src/sys/arch/i386/stand/mbr/mbr.S, and I have had a
>>question.
>>    
>>
>
>Only one...
>  
>
I have many questions, but one question in this time.

>You get a prize it you manage to squeeze out any more bytes, or add
>further (useful) functionality within the available space!
>  
>
It's quite complicated for me to do that.

>>When the mbr code checks extended partition chain, it always checks
>>MBR_MAGIC against
>>itself, that is LOADADDR + MBR_MAGIC_OFFSET, but not newly loaded
>>sector into BOOTADDR. I think
>>BOOTADDR + MBR_MAGIC_OFFSET is correct location to check.
>>    
>>
>
>One the face of it that does seem correct....
>
>	David
>
>  
>
Using the disk address packet constructed at lba_info, data is
transferred to BOOTADDR, so I thought that comparing the magic
number is for the sanity check of newly read sector at BOOTADDR.

Yuichiro Goto