aboutsummaryrefslogtreecommitdiffstats
path: root/mbr
Commit message (Collapse)AuthorAgeFilesLines
* 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-083-3/+3
| | | | | | | | 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>
* mbr/Makefile: run checksize on the proper binaries...syslinux-3.72-pre4H. Peter Anvin2008-09-071-3/+3
| | | | | | | There is a reason other than stylistic for using macros like $@ in explicit rules, and that is that they get copied and pasted around... 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-052-5/+219
| | | | | | Still a work in progress. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Clean up embedded Makefile targets; fix build failureH. Peter Anvin2008-08-221-11/+1
| | | | | | Unify common pieces to "embedded" targets (those that produce code that runs neither in the host nor in a com32 environment); this fixes the broken sample/ directory Makefile.
* Major Makefile cleanups; gcc 4.3.0 compatiblityH. Peter Anvin2008-08-201-10/+7
| | | | | Cleanup and centralize the Makefile system even more. Fix a gcc 4.3 incompatibility in memdisk (definition of strlen).
* Build _bin.c files in libinstaller; clean up B/I separationH. Peter Anvin2008-06-271-5/+2
| | | | | | | Clean up the BSUBDIR/ISUBDIR separation further. Build _bin.c files, which are an intermediate stage toward building the installers, in the libinstaller directory, since that directory is used by all the installers anyway. That also lets us get bin2c.pl out of the root.
* mbr: clean up *_bin.c filesH. Peter Anvin2008-05-291-1/+1
|
* Move files out of root into core, dos, and utilsH. Peter Anvin2008-05-291-5/+11
| | | | | | | | Move source files out of the root directory; the root is a mess and has become virtually unmaintainable. The Syslinux core now lives in core/; the Linux and generic utilities has moved into utils/, and copybs.com has moved into dos/; it had to go somewhere, and it seemed as good a place as any.
* 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.
* Merge commit 'origin/gptmbr'H. Peter Anvin2008-05-132-1/+295
|\
| * 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-252-1/+292
| | | | | | | | Beginnings of a master boot record for GPT partition tables.
* | Use $(CC) in gcc_ok macro, not plain gccH. Peter Anvin2008-03-051-1/+1
|/ | | | | Use $(CC) in gcc_ok macro, not plain gcc. This seems to work, iff the gcc_ok macro is declared with =, not :=
* Whitespace cleanup...syslinux-3.62-pre11H. Peter Anvin2008-02-191-1/+1
|
* mbr: save another 5 bytes by terminating error on newlinesyslinux-3.61-pre4H. Peter Anvin2008-01-221-8/+4
| | | | | Save another 5 bytes by making the newline character do double duty as newline and string terminator.
* mbr.S: save one more bytesyslinux-3.61-pre3H. Peter Anvin2008-01-221-1/+1
| | | | | %ax is set to zero at the top; we then set it to 0x4100, so we only need to change %ah, not all of %ax.
* Update copyright yearH. Peter Anvin2008-01-104-4/+4
|
* mbr: remove *.bin on "spotless", not "clean"syslinux-3.53H. Peter Anvin2007-11-171-1/+1
| | | | | Remove mbr/*.bin on "spotless", not "clean"; otherwise we break "make installer".
* mbr.S: fix loading from logical partitionsH. Peter Anvin2007-11-141-1/+1
| | | | | Fix loading from logical partitions (a push/pop pair was not done in reverse order.)
* Fix [BI]ESUBDIRS for make installer/tidy/clean/spotlessH. Peter Anvin2007-11-011-0/+2
| | | | Fix the handling of [BI]ESUBDIRS for other targets than "all".
* MBR: shave off another byteH. Peter Anvin2007-07-111-5/+6
| | | | Yet another byte bites the dust...
* MBR: shave off another byteH. Peter Anvin2007-07-111-2/+2
| | | | | Shave off another byte by using the not-frequently-used jmpw *%sp instruction!
* MBR: one more commentH. Peter Anvin2007-07-111-0/+1
| | | | Comments are good...
* MBR: shave another ~4 bytes through an ugly error message hackH. Peter Anvin2007-07-111-22/+17
| | | | | Use the "return address points to data" trick to shave a few bytes off the generation of error messages.
* MBR: add HLT to prevent system from melting on failureH. Peter Anvin2007-07-111-1/+3
| | | | | | | | In case we hit the death loop, put HLT in it. It's probably superfluous, but it can't hurt, and we can always take it out to reclaim the space. Arguable the death loop is superfluous at all, since int $0x18 should never return.
* MBR: add CR LF to the end of messagesH. Peter Anvin2007-07-111-3/+3
| | | | | | Six bytes down the drain, but people do expect it. If it becomes an issue we can remove the period; it's better than the CR LF. There might be some way to efficiently issue . \r \n in common code, too.
* MBR: shave 2 more bytesH. Peter Anvin2007-07-111-2/+4
| | | | | We always re-read the last partition table on any kind of error, so no need to prevent the code from clobbering it on failure.
* MBR: Don't clobber %eax before entering CBIOS codeH. Peter Anvin2007-07-111-3/+5
|
* MBR: always do setup for EBIOS, makes stack handling easier and saves jmpH. Peter Anvin2007-07-111-14/+14
|
* MBR: Handle the stack in read_sector correctly...H. Peter Anvin2007-07-111-2/+3
|
* One more MBR byteH. Peter Anvin2007-07-111-1/+1
|
* Another 12 bytes shaved off the MBR...H. Peter Anvin2007-07-111-18/+12
|