#4028: Hybrid GPT/MBR Initial Program Loader ----------------------------+--------------------------- Reporter: meianoite | Owner: axeld Type: enhancement | Status: new Priority: normal | Milestone: R1 Component: File Systems | Version: R1/pre-alpha1 Resolution: | Keywords: Blocked By: | Blocking: Has a Patch: 1 | Platform: All ----------------------------+--------------------------- Comment (by meianoite): Changelog: LBA pointer buffer is moved from 8 bytes on the MBR itself to a 64-bit buffer right after the stack. Makes more room for code and is more robust;[[BR]] Deals with interrupts before and after relocation;[[BR]] Work memory (0x600 to 0x7bff) is zero cleaned before relocation;[[BR]] Deals with probable segment tainting by the BIOS. Nothing is assumed to be zeroed by default anymore;[[BR]] Jumps to relocated code and loaded boot code made absolute (far);[[BR]] Boot drive range check is disabled by default (turned into a compile-time option). Now assumes the BIOS is reasonable in this regard;[[BR]] Test for BIOS extended disk read before attempting GPT read;[[BR]] Reading arbitrary quantities of sectors bloated the code for no real gain. Now the amount of sectors to load depend on the partitioning scheme;[[BR]] Restored some code from the FreeBSD loaders used as the basis for this one. Made the above item possible (slightly modified so GPT boot loader reading goes up to circa 545KiB now and stops there instead of erroring out);[[BR]] In the process, noticed that error check after LBA disk read was removed. Duh! Restored it;[[BR]] Changed some sections to make code more compact despite doing more work;[[BR]] Comments are now more extensive. Magic numbers explained. Offsets explained. Exploited side effects are explicitly mentioned. -- Ticket URL: <http://dev.haiku-os.org/ticket/4028#comment:8> Haiku <http://dev.haiku-os.org> Haiku - the operating system.