path: root/mbr/gptmbr.S
Commit message (Collapse)AuthorAgeFilesLines
* Document GPT boot protocol; add !GPT signature3.6xH. 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.