summaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
Diffstat (limited to 'boot')
-rw-r--r--boot/arch/amd64/mbr/link.ld2
-rw-r--r--boot/arch/amd64/mbr/mbr.S5
2 files changed, 5 insertions, 2 deletions
diff --git a/boot/arch/amd64/mbr/link.ld b/boot/arch/amd64/mbr/link.ld
index 6d25985..77ded5c 100644
--- a/boot/arch/amd64/mbr/link.ld
+++ b/boot/arch/amd64/mbr/link.ld
@@ -1,7 +1,7 @@
OUTPUT_FORMAT(binary)
SECTIONS {
- . = 0x7C00;
+ . = 0x0000;
.text : {
*(.text)
diff --git a/boot/arch/amd64/mbr/mbr.S b/boot/arch/amd64/mbr/mbr.S
index e071a41..236f9f1 100644
--- a/boot/arch/amd64/mbr/mbr.S
+++ b/boot/arch/amd64/mbr/mbr.S
@@ -1,7 +1,10 @@
+/* Segment constants */
+#define BOOT_SEG 0x7C0 /* Segment we reside on startup */
+
.code16
_start:
/* Normalize CS + other selectors */
- ljmp $0x00,$1f
+ ljmp $BOOT_SEG,$1f
1: xor %ax, %ax
mov %ax, %ds
mov %ax, %ss