summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2022-09-02 07:46:04 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2022-09-02 07:46:04 +0000
commit24003a20ddc4f75f31d659d5f992ee99ddbe1d9e (patch)
tree7f7c49c6eff57187ab4c8ba2271bd17741033596 /sys/arch
parentb95273d1b73c7259f075a0e730c236313fb1ce98 (diff)
Adopt a terser specification of an MBR partition table of
64 zeros, suggested by miod@ a while ago. ok mlarkin@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/stand/mbr/mbr.S12
-rw-r--r--sys/arch/i386/stand/mbr/mbr.S12
2 files changed, 4 insertions, 20 deletions
diff --git a/sys/arch/amd64/stand/mbr/mbr.S b/sys/arch/amd64/stand/mbr/mbr.S
index 6fd9e6ade88..8d8c9f38c21 100644
--- a/sys/arch/amd64/stand/mbr/mbr.S
+++ b/sys/arch/amd64/stand/mbr/mbr.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: mbr.S,v 1.8 2022/08/15 04:17:50 daniel Exp $ */
+/* $OpenBSD: mbr.S,v 1.9 2022/09/02 07:46:03 krw Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff and Tobias Weingartner
@@ -513,15 +513,7 @@ endofcode:
/* partition table */
/* flag, head, sec, cyl, type, ehead, esect, ecyl, start, len */
. = DOSPARTOFF /* starting address of partition table */
-pt:
- .byte 0x0,0,0,0,0,0,0,0
- .long 0,0
- .byte 0x0,0,0,0,0,0,0,0
- .long 0,0
- .byte 0x0,0,0,0,0,0,0,0
- .long 0,0
- .byte 0x0,0,0,0,0,0,0,0
- .long 0,0
+pt: .fill 0x40,1,0
/* the last 2 bytes in the sector 0 contain the signature */
. = 0x1fe
signature:
diff --git a/sys/arch/i386/stand/mbr/mbr.S b/sys/arch/i386/stand/mbr/mbr.S
index 82c08f5ad1e..cc172b692f2 100644
--- a/sys/arch/i386/stand/mbr/mbr.S
+++ b/sys/arch/i386/stand/mbr/mbr.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: mbr.S,v 1.26 2022/08/15 04:17:51 daniel Exp $ */
+/* $OpenBSD: mbr.S,v 1.27 2022/09/02 07:46:03 krw Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff and Tobias Weingartner
@@ -513,15 +513,7 @@ endofcode:
/* partition table */
/* flag, head, sec, cyl, type, ehead, esect, ecyl, start, len */
. = DOSPARTOFF /* starting address of partition table */
-pt:
- .byte 0x0,0,0,0,0,0,0,0
- .long 0,0
- .byte 0x0,0,0,0,0,0,0,0
- .long 0,0
- .byte 0x0,0,0,0,0,0,0,0
- .long 0,0
- .byte 0x0,0,0,0,0,0,0,0
- .long 0,0
+pt: .fill 0x40,1,0
/* the last 2 bytes in the sector 0 contain the signature */
. = 0x1fe
signature: