| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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 notices; add Intel copyright notices where
appropriate.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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 the GPT boot protocol; add additional assurance by
requiring that EAX contains "!GPT" for the GPT information
to be valid.
|
|
|
|
|
| |
Using cltq (cdq) to clear %edx when %eax is zero is cheaper by one
byte.
|
| |
|
| |
|
|
|
|
| |
Use the start field for the boot sector address...
|
|
|
|
|
|
| |
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.)
|
|
|
|
|
| |
xhcgw with %ax and a register is one byte shorter than movw with %ax
if %ax is then dead.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
With %bx advanced to the end of the boot sector, we can use -2(%bx)
instead of (bootsec+510), thus saving one byte.
|
|
|
|
| |
Save one byte...
|
|
|
|
| |
The offsets into phdr, from the EFI spec, are in decimal, not hex.
|
|
|
|
| |
Move the advancing of %bx into read_sector, saving 3 bytes.
|
|
|
|
|
|
| |
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.)
|
|
|
|
|
| |
Shuffle some code slightly to reduce register pressure; no size change
but this might make the code easier to follow and/or change.
|
|
|
|
| |
Shuffle some code to reduce the total size by 3 bytes
|
|
|
|
| |
Same instruction, but repe is more correct for cmpsw
|
|
Beginnings of a master boot record for GPT partition tables.
|