[syslinux] [PATCH] [memdisk] Add some DriveShiftLimit logic

Miller, Shao Shao.Miller at yrdsb.edu.on.ca
Mon Jun 1 13:47:32 PDT 2009


Instead of MEMDISK always inserting itself and shifting all BIOS drives
up by
one, we are pursuing logic whereby MEMDISK's "installer" stage will:

1. Decide which BIOS drive numer we desire
2. Probe for a contiguous range of already-present BIOS drives starting
with our desired number
3. Save the top-most drive number of this contiguous range
4. Install the INTerrupt hooks
5. Our INTerrupt code will only shift drive numbers within this range

Why?  As an example, suppose that we have BIOS drives 0x00, 0x80, 0x81,
0xE8.  If we wish to hook our MEMDISK disk as the new 0x80, we shift the
previous 0x80 to become 0x81, we shift the previous 0x81 to become 0x82,
but we leave 0xE8 alone, because it's outside of the contiguous range we
probed for starting at 0x80.  In this way, any system code already
installed and relying on drive 0xE8 will be left sane.  Previously,
drive 0xE8 would have been shifted to become 0xE9, possibly breaking
such system code. This is just an example.

This patch adds a DriveShiftLimit field to store the top-most drive
numer that we are interested in shifting.  The drive probing logic is
not fully implemented in this patch, but the "stage is set" for further
refinement.

- Shao Miller
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001--memdisk-Add-some-DriveShiftLimit-logic.patch
Type: application/octet-stream
Size: 6206 bytes
Desc: 0001--memdisk-Add-some-DriveShiftLimit-logic.patch
URL: <http://www.zytor.com/pipermail/syslinux/attachments/20090601/922102c7/attachment.obj>


More information about the Syslinux mailing list