[syslinux] Post-Syslinux Memory Manager

Shao Miller sha0.miller at gmail.com
Mon Dec 31 14:31:31 PST 2012


A goal: To have something like MEMDISK, but that redirects to sectors on
another disk, rather than memory.

A possible solution: Syslinux can install an INT 0x13 hook (as MEMDISK does)
and mark the hook's memory as reserved in the memory map.  (Requiring an INT
0x15 hook, too.)

Given this solution, another goal: Once the hooks are installed, it'd be
useful to be able to return to Syslinux and work with the virtual disk.
This will be even more desirable once "multi-disk" support is incorporated
into Syslinux.

A challenge: In order to return to Syslinux, Syslinux must recognize that
the memory occupied by the hooks is now off-limits.  Re-initializing
Syslinux' view of memory by re-probing the memory map seems very yucky, but
having the memory marked as allocated should be good enough.

Implications: The hooks' memory is marked in both the INT 0x15 hook as well
as in Syslinux' memory arenas.

A possible direction:

A general, installable INT 0x15 hook (could be derived from MEMDISK).  This
hook could extend INT 0x15 to accept modifications to the memory-map.  It
could have a few spare slots for these changes.  It could have an
installation check function.  It could report failure if the spare slots
become full.

Syslinux could have a wrapper function perm_alloc() that:
  - Checks for the INT 0x15 hook's presence.  If not installed, installs it
  - Allocates memory from Syslinux' memory arenas
  - Marks that memory in the memory map using the INT 0x15 hook

MEMDISK could check for the presence of this INT 0x15 hook and use it if
it's available.

Other programs could use this INT 0x15 hook to install their own hooks or
TSRs or whatever.

Does this seem like a worth-while project, with the relevant support code
introduced into Syslinux?

- Shao Miller



More information about the Syslinux mailing list