path: root/mbr/gptmbr.S
Commit message (Collapse)AuthorAgeFilesLines
* mbr: generate normal versions, force-80 versions, and ctrl-80 versionsH. Peter Anvin2009-04-041-7/+6
| | | | | | | 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>
* Update copyright noticesH. Peter Anvin2009-04-041-0/+1
| | | | | | | Update copyright notices; add Intel copyright notices where appropriate. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* mbr/*.S: use a symbolic constant for BIOS_kbdflagsH. Peter Anvin2009-03-301-1/+2
| | | | | | | | | 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-4/+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>
* 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>
* Document GPT boot protocol; add !GPT signatureH. Peter Anvin2008-05-131-0/+1
| | | | | | Document the GPT boot protocol; add additional assurance by requiring that EAX contains "!GPT" for the GPT information to be valid.
* gptmbr: use cltq to extend a zero %eax into %edxH. Peter Anvin2008-02-251-1/+1
| | | | | Using cltq (cdq) to clear %edx when %eax is zero is cheaper by one byte.
* gptmbr: Add commentH. Peter Anvin2008-02-251-1/+1
* gptmbr: save phdr -> bootsect on the stack, saving one byteH. Peter Anvin2008-02-251-2/+4
* gptmbr: another confusion of start and end fieldsH. Peter Anvin2008-02-251-2/+2
| | | | Use the start field for the boot sector address...
* gptmbr: fix confusion between start and end fieldsH. Peter Anvin2008-02-251-2/+4
| | | | | | Fix a case of bad confusion of the start and end fields (length = end-start+1, so we can't easily reuse the load of the start field.)
* gptmbr: use xchgw %ax,... instead of movw %ax,... when %ax is deadH. Peter Anvin2008-02-251-1/+1
| | | | | xhcgw with %ax and a register is one byte shorter than movw with %ax if %ax is then dead.
* gptmbr: Use %bp for references into phdr and the stackH. Peter Anvin2008-02-251-20/+19
| | | | | | Set up %bp as a permanent frame pointer and use it to reference stack and phdr fields; by putting phdr in the bootsect slot we can use it for phdr references with small displacements. This saves 5 bytes.
* gptmbr: since %bx is advanced, we can test -2(%bx) == (bootsec+510)H. Peter Anvin2008-02-251-1/+1
| | | | | With %bx advanced to the end of the boot sector, we can use -2(%bx) instead of (bootsec+510), thus saving one byte.
* gptmbr: addw $512, %bx -> addb $2, %bhH. Peter Anvin2008-02-251-1/+1
| | | | Save one byte...
* gptmbr: offsets into phdr are decimal, not hexH. Peter Anvin2008-02-251-4/+4
| | | | The offsets into phdr, from the EFI spec, are in decimal, not hex.
* gptmbr: move advancing %bx into read_sectorH. Peter Anvin2008-02-251-4/+3
| | | | Move the advancing of %bx into read_sector, saving 3 bytes.
* gptmbr: need to set %bx -> bootsecH. Peter Anvin2008-02-251-0/+1
| | | | | | Need to tell read_sector where to load the boot sector (unlike the MBR code, where we always loaded into 0x7c00, this code uses multiple buffers.)
* gptmbr: shuffle slightly to reduce register pressureH. Peter Anvin2008-02-251-6/+3
| | | | | Shuffle some code slightly to reduce register pressure; no size change but this might make the code easier to follow and/or change.
* gptmbr: shuffle slightly to save 3 bytesH. Peter Anvin2008-02-251-14/+17
| | | | Shuffle some code to reduce the total size by 3 bytes
* rep; cmpsw -> repe; cmpswH. Peter Anvin2008-02-251-1/+1
| | | | Same instruction, but repe is more correct for cmpsw
* Master boot record for GPT partition tablesH. Peter Anvin2008-02-251-0/+284
Beginnings of a master boot record for GPT partition tables.