summaryrefslogtreecommitdiff
path: root/mbr/isohdpfx.S
Commit message (Collapse)AuthorAgeFilesLines
* isohybrid: Generate GPT and Mac bootable imagesMatthew Garrett2011-08-241-0/+31
| | | | | | | | | | | | | | | | | | | | | | | EFI systems typically don't support booting off ISO 9660 filesystems, even if written to USB sticks. This patch adds support for generating a GPT that covers the stick as well, with an additional partition entry pointing purely at the secondary El Torito image. When burned to CD the secondary El Torito will be used as an EFI boot image, and when written to a USB stick the GPT partition will be found and may be booted from. However, some earlier EFI Macs don't support booting from El Torito images via EFI. To cater for them this also supports generating an Apple partition table, allowing a third El Torito image in HFS+ format to be made available to the firmware. This requires padding the MBR images slightly in order to leave space for the Apple header, but should have no functional impact. Sadly, this breaks the workaround for Acer BIOSes (magic xor instruction) when Mac support is enabled via -m... not much that can be done about that. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* mbr: Make sure the MBR code starts with the byte 0x33H. Peter Anvin2010-12-231-2/+1
| | | | | | | | | Apparently some BIOSes (including some Acer Travelmate machines) require an MBR to start with 0x33; apparently Micro$oft MBRs start with 33 C0, an alternate coding of the "xorw %ax,%ax" instruction. As such, follow suit to work on these braindead BIOSes. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* isohdpfx: update to the new !GPT protocolH. Peter Anvin2010-06-271-3/+5
| | | | | | Update the check for !GPT to match the updated protocol (with length). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* isohdpfx: actually generate the stack frame isolinux expectssyslinux-3.82-pre2H. Peter Anvin2009-05-311-6/+9
| | | | | | | | Actually generate the stack frame isolinux expects. This is not the optimal order, but it appears to be what both earlier and later versions of isolinux expects... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* isohdpfx: don't clear %ds before parsing partiting infosyslinux-3.81-pre15H. Peter Anvin2009-05-261-14/+15
| | | | | | | | | | | | The partition information is pointed to by ds:si; although ds will *usually* be 0 it isn't guaranteed (in particular, it may very well be 0x40 or 0x60); therefore, move the partition parsing up before the reset of %ds and %es. As a side benefit, we get to use push again... Also, fix the ordering of the two halves of the GPT LBA! Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* isohybrid: revert to a stack format compatible with previous versionsyslinux-3.81-pre14H. Peter Anvin2009-05-251-17/+18
| | | | | | | | Revert the isohybrid handover protocol so that it has a stack format compatible with the previous versions; that way we can also revert the magic number to a compatible one. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* isohybrid: support booting from partition; fix CBIOS bootingH. Peter Anvin2009-05-211-20/+49
| | | | | | | | Fix CBIOS in isohybrid mode. Also allow an isohybrid image to be booted from a partition. Unfortunately this breaks compatibility between differing versions of isohybrid and isolinux.bin. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* mbr: generate normal versions, force-80 versions, and ctrl-80 versionsH. Peter Anvin2009-04-041-9/+8
| | | | | | | Produce MBR variants with normal (DL) behavior, force to drive 80 behavior, and force to 80 on Ctrl pressed behavior. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* mbr/*.S: use a symbolic constant for BIOS_kbdflagsH. Peter Anvin2009-03-301-2/+3
| | | | | | | | | Impact: cleanup Use a symbolic constant for BIOS_kbdflags instead of open-coding the address. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* mbr/*.S: if Ctrl is pressed, force the drive number to 0x80H. Peter Anvin2009-03-301-3/+9
| | | | | | | | | | | Impact: BIOS bug workaround, possible unexpected consequences? Escape hatch for BIOSes which pass in garbage in DL: if the Ctrl key is pressed during boot, force the drive number to 0x80. Based on a patch by "TJ <ubuntu@tjworld.net>". Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* isohdpfx: remove stray jmpw *%siH. Peter Anvin2009-03-101-1/+0
| | | | | Remove a stay jmpw *%si which was a test instruction and wasn't meant to have been checked in.
* isohdpfx: work around gas/ld miscompilationH. Peter Anvin2009-02-271-1/+9
| | | | | | | | Some, unknown, version of gas or ld miscompiles a relative jump to an absolute symbol, resulting in a broken isohybrid. Implement a workaround for it by using a far jmp, which is absolute. Fortunately, the isohybrid prefix is one of the very few boot sectors we have which isn't short on space.
* mbr, gptmbr, isohdpfx: don't lose the carry flagH. Peter Anvin2008-09-081-1/+1
| | | | | | | | Using addw to restore the stack pointer clobbers CF. Use leaw instead, even though this relies on the BIOS not clobbering %si. Worst case we can add a mov %sp, %si or similar. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* isohdpfx: save one byteH. Peter Anvin2008-09-081-1/+1
| | | | | | Save one byte in isohdpfx.S. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* ISOLINUX: fix EBIOS information passing in hybrid HDD modeH. Peter Anvin2008-09-051-5/+7
| | | | | | | | | We were incorrectly not passing the EBIOS flag in hybrid HDD mode; also compute the EBIOS LBA correctly in hybrid HDD mode. Allow a 34-bit LBA for this, that way we still support up to 2^32 CD-ROM sectors (8 TB). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* ISOLINUX: support for hybrid mode (CD-ROM/USB key)H. Peter Anvin2008-09-051-0/+212
Still a work in progress. Signed-off-by: H. Peter Anvin <hpa@zytor.com>