[syslinux:master] mbr: Make sure the MBR code starts with the byte 0x33
syslinux-bot for H. Peter Anvin
hpa at zytor.com
Thu Dec 23 12:06:07 PST 2010
Commit-ID: d0f275981c9289dc4b8df64e72cd9902bf85aebe
Gitweb: http://syslinux.zytor.com/commit/d0f275981c9289dc4b8df64e72cd9902bf85aebe
Author: H. Peter Anvin <hpa at zytor.com>
AuthorDate: Thu, 23 Dec 2010 12:02:52 -0800
Committer: H. Peter Anvin <hpa at zytor.com>
CommitDate: Thu, 23 Dec 2010 12:02:52 -0800
mbr: Make sure the MBR code starts with the byte 0x33
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 at zytor.com>
---
mbr/altmbr.S | 2 +-
mbr/gptmbr.S | 2 +-
mbr/isohdpfx.S | 3 +--
mbr/mbr.S | 2 +-
4 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/mbr/altmbr.S b/mbr/altmbr.S
index 794ab62..1b60905 100644
--- a/mbr/altmbr.S
+++ b/mbr/altmbr.S
@@ -49,8 +49,8 @@ bootsec:
.text
.globl _start
_start:
+ .byte 0x33, 0xc0 /* xorw %ax, %ax */
cli
- xorw %ax, %ax
movw %ax, %ds
movw %ax, %ss
movw $stack, %sp
diff --git a/mbr/gptmbr.S b/mbr/gptmbr.S
index 8ed4cf4..ae0549f 100644
--- a/mbr/gptmbr.S
+++ b/mbr/gptmbr.S
@@ -55,8 +55,8 @@ bootsec:
.text
.globl _start
_start:
+ .byte 0x33, 0xc0 /* xorw %ax, %ax */
cli
- xorw %ax, %ax
movw %ax, %ds
movw %ax, %ss
movw $stack, %sp
diff --git a/mbr/isohdpfx.S b/mbr/isohdpfx.S
index 0bf807e..2784fb8 100644
--- a/mbr/isohdpfx.S
+++ b/mbr/isohdpfx.S
@@ -65,9 +65,8 @@ bootsec:
.text
.globl _start
_start:
-
+ .byte 0x33, 0xed /* xorw %bp, %bp */
cli
- xorw %bp, %bp
movw %bp, %ss
movw $stack, %sp
sti
diff --git a/mbr/mbr.S b/mbr/mbr.S
index 7caf4fc..b71cfb7 100644
--- a/mbr/mbr.S
+++ b/mbr/mbr.S
@@ -49,8 +49,8 @@ bootsec:
.text
.globl _start
_start:
+ .byte 0x33, 0xc0 /* xorw %ax, %ax */
cli
- xorw %ax, %ax
movw %ax, %ds
movw %ax, %ss
movw $stack, %sp
More information about the Syslinux-commits
mailing list