aboutsummaryrefslogtreecommitdiffstats
path: root/mbr/mbr.S
Commit message (Collapse)AuthorAgeFilesLines
* mbr: Add support for loading VBRs from XFS filesystemsPaulo Alcantara2012-07-211-0/+13
| | | | | | | | | | | | Before reading the VBR into 0x7C00, we need to check the first 4 bytes of the read sector and check whether it is a XFS superblock or not. If it is, then we need to read the right sector, which is the 4th sector of the XFS partition where the Syslinux boot sector lives in. This patch adds support for booting off XFS partitions properly on MBR HDDs. Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
* mbr: Make sure the MBR code starts with the byte 0x33H. Peter Anvin2010-12-231-1/+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>
* mbr: generate normal versions, force-80 versions, and ctrl-80 versionsH. Peter Anvin2009-04-041-7/+5
| | | | | | | 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-3/+4
| | | | | | | | | 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>
* 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>
* 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-101-1/+1
|
* 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.)
* 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
|
* Another 2 bytes off the MBR.H. Peter Anvin2007-07-111-15/+13
|
* Add some comments to the MBRH. Peter Anvin2007-07-111-3/+3
|
* Another 3 bytes or so off the MBR...H. Peter Anvin2007-07-111-5/+7
|
* One more MBR byte...H. Peter Anvin2007-07-111-1/+1
|
* Shave two more bytes off the MBRH. Peter Anvin2007-07-111-4/+3
|
* MBR: fix pointer to partition table baseH. Peter Anvin2007-07-111-2/+2
|
* Shave another byte off the MBRH. Peter Anvin2007-07-111-2/+4
|
* Shave an additional ~7 bytes off the MBRH. Peter Anvin2007-07-111-16/+16
|
* Shave a byte off the MBR code.H. Peter Anvin2007-07-111-4/+4
|
* MBR: fix problems when LBA > 65535*sectors.H. Peter Anvin2007-04-101-18/+17
| | | | | Fix division overflow bug when LBA > 65535*sectors. Bug report by Devin Bayer.
* Stealth whitespace cleanup (automated)H. Peter Anvin2007-03-141-11/+11
|
* Fix numerous problems in the new MBR code.syslinux-3.36-pre5H. Peter Anvin2007-02-041-13/+22
|
* MBR: Set %si immediately upon setting %spH. Peter Anvin2007-02-041-1/+1
|
* New MBR which supports logical partitions.H. Peter Anvin2007-02-041-0/+290
New MBR which supports logical partitions. Move the MBR to a subdirectory, and convert it to gas with the expectation of including it in util-linux.