[syslinux] [PATCH] new *br: Show handoff data

Gene Cumm gene.cumm at gmail.com
Fri Nov 26 11:56:05 PST 2010


On Fri, Nov 26, 2010 at 14:28, Michal Soltys <soltys at ziu.info> wrote:
> On 10-11-26 19:23, Gene Cumm wrote:
>>
>> git://git.zytor.com/users/genec/syslinux.git
>>
>> Branch handoff-mbr-for-hpa
>>
>> This is a piece of code that can be used in place of a MBR or VBR/PBR
>> (master boot record; volume/partition) in order to examine the data
>> handed to the respective boot code.  AX, SS, and SP are destroyed
>> before examining anything.  I set an internal restriction that limits
>> it to 420 bytes such that it could be used with a FAT32 file system.
>>
>> HPA: Should this be renamed?  I have intentionally skipped adding it
>> to the Makefile (for now) for this reason.
>>
>
> I did something similar when I was testing my chain module. It dumps
> registers (none are destroyed), bpb info and dos + gpt handover data. It can
> be booted as a file= / sect=, it can chain from itself as well (depending on
> seg= / sect=). After everything is done/dumped, it reloads disk 80h.

None are destroyed?  I'd assume it explicitly moves the contents of
every register (minus CS, IP, of course) to a static area in memory
before doing anything?

> Code/data takes 4 sectors though (3 remaining ones are loaded using handover
> information, unless it was loaded as a file=) - couldn't really stuff it all
> in just 400ish bytes :) 1.5 sectors is roughly unused though. Overall - it
> doesn't care about filesystem at all, it does respect most of the important
> bpb fields though.

Pretty big.

> I needed something like that to test the functionality, including effects of
> more dangerous options (mbrchs, un/hideall, setbpb/bpb autodetection among
> other things).
>
> Could be potentially useful, so just tell if you want to use it.

Primarily, I was looking at using this code when it's suspected that
the BIOS or existing MBR is not following the normal rules.  As such,
I'd think it must stay under 420 bytes of code and pre-initialized
data as the hand-off data should be considered corrupt.

-- 
-Gene




More information about the Syslinux mailing list