====== Differences ====== This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
soc:2008:dverkamp:notes:start [2008/05/19 16:40] mdc |
soc:2008:dverkamp:notes:start [2008/05/20 08:15] (current) drv |
||
---|---|---|---|
Line 2: | Line 2: | ||
===== Notes ===== | ===== Notes ===== | ||
+ | |||
+ | ==== COMBOOT ==== | ||
+ | |||
+ | * http://syslinux.zytor.com/wiki/index.php/Comboot_API | ||
+ | * What should happen if/when a COMBOOT executable returns? Do any other image types ever return? | ||
+ | |||
+ | === Basic COMBOOT execution sequence === | ||
+ | |||
+ | * Detect image type (.com/.cbt -> 16-bit COMBOOT; .c32 or magic number B8 FF 4C CD 21 -> COM32) - case-insensitive filenames? | ||
+ | |||
+ | == 16-bit COMBOOT == | ||
+ | |||
+ | - Copy image to offset 0x100 of some segment | ||
+ | - Set up PSP in same segment | ||
+ | - Set up IDT entries to point at COMBOOT API implementation (stubs in lowmem to call actual protected-mode implementation?) | ||
+ | - Change to real mode | ||
+ | - Set segment registers CS = DS = ES = SS to segment containing PSP and code | ||
+ | - Set SP to 0xfffe (end of 64k segment) | ||
+ | - Near call 0x100 (start executing) | ||
+ | |||
+ | == COM32 == | ||
+ | |||
+ | - Copy image to virtual address 0x101000 | ||
+ | - Set DS = ES = SS to the same base as CS (flat address space) | ||
+ | - Set FS = GS = 0 | ||
+ | - Set ESP to end of available memory | ||
+ | - Allocate bounce buffer in lowmem | ||
+ | - Push args onto stack (helper functions, bounce buffer, other args from user) | ||
+ | - Call entry point | ||
==== Development and Testing Environment ==== | ==== Development and Testing Environment ==== |