summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1997-08-29 19:47:25 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1997-08-29 19:47:25 +0000
commit0507d15d443d2a65fba46908fc83b2937f9dd279 (patch)
treee2d5ccab3dcbdc1a5821044f98ff98a4ee9e367f /sys
parent0e92ec16d1df82975dd299f40e0b680012867bd1 (diff)
don't use private defines, use ones exported from includes
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/i386/stand/biosboot/biosboot.S12
-rw-r--r--sys/arch/i386/stand/etc/genassym.cf8
-rw-r--r--sys/arch/i386/stand/mbr/mbr.S22
3 files changed, 19 insertions, 23 deletions
diff --git a/sys/arch/i386/stand/biosboot/biosboot.S b/sys/arch/i386/stand/biosboot/biosboot.S
index aa033a17c18..bad1308f5a7 100644
--- a/sys/arch/i386/stand/biosboot/biosboot.S
+++ b/sys/arch/i386/stand/biosboot/biosboot.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: biosboot.S,v 1.15 1997/08/13 04:03:28 mickey Exp $ */
+/* $OpenBSD: biosboot.S,v 1.16 1997/08/29 19:47:23 mickey Exp $ */
.file "bootbios.S"
@@ -18,12 +18,6 @@
#define BOOTSTACK 0xfffc /* stack starts here */
#define ZMAGIC 0x0b01 /* ZMAGIC */
-/*
- * Partition table values
- */
-#define BOOTABLE 0x80 /* flag of boot_ind, means bootable partition */
-#define OPENBSDPART 0xA6 /* OpenBSD partition type */
-
#ifdef DEBUG
#define DBGMSG(msg) \
movb $msg, %al; \
@@ -330,12 +324,12 @@ _block_count:
. = 0x1b8
.space 4, 0 /* (MBR) NT registry offset from James C. Cortilier III */
- . = 446
+ . = DOSPARTOFF
.globl _partitions
/* throw in a partition in case we are block0 as well */
/* flag, head, sec, cyl, typ, ehead, esect, ecyl, start, len */
_partitions:
- .byte BOOTABLE, 0, 1, 0,OPENBSDPART, 255, 255, 255
+ .byte DOSACTIVE, 0, 1, 0, DOSPTYP_OPENBSD, 255, 255, 255
.long 0,50000
.byte 0,0,0,0,0,0,0,0
.long 0,0
diff --git a/sys/arch/i386/stand/etc/genassym.cf b/sys/arch/i386/stand/etc/genassym.cf
index 6c5928aaa37..bf04651071e 100644
--- a/sys/arch/i386/stand/etc/genassym.cf
+++ b/sys/arch/i386/stand/etc/genassym.cf
@@ -1,11 +1,17 @@
-# $OpenBSD: genassym.cf,v 1.2 1997/08/13 02:55:01 mickey Exp $
+# $OpenBSD: genassym.cf,v 1.3 1997/08/29 19:47:23 mickey Exp $
include <sys/param.h>
include <machine/specialreg.h>
include <machine/segments.h>
include <machine/biosvar.h>
+include <machine/disklabel.h>
+export DOSPARTOFF
+export DOSACTIVE
+export DOSPTYP_OPENBSD
+export NDOSPART
+export DOSMBR_SIGNATURE
export DEV_BSIZE
export CR0_PE
export SDT_MEMERAC
diff --git a/sys/arch/i386/stand/mbr/mbr.S b/sys/arch/i386/stand/mbr/mbr.S
index 72d4696b41d..1c880a41656 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.10 1997/08/13 02:22:02 mickey Exp $ */
+/* $OpenBSD: mbr.S,v 1.11 1997/08/29 19:47:24 mickey Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff and Tobias Weingartner
@@ -43,18 +43,14 @@
.file "mbr.S"
#include <machine/asm.h>
-#include <machine/specialreg.h>
+#include <assym.h>
#define data32 .byte 0x66
#define addr32 .byte 0x67
#define BOOTBIOS 0x7c0 /* segment where we are loaded */
#define BOOTRELOC 0x7a0 /* segment where to relocate */
-#define SIGNATURE 0xaa55 /* MBR signature */
-#define NUMPART 4 /* number of partitions in partition table */
#define PARTSZ 16 /* each partition table entry is 16 bytes */
-#define BSDPART 0xA6 /* OpenBSD partition */
-#define BOOTABLE 0x80 /* bootable partition */
#ifdef DEBUG
#define CHAR_S 'S' /* started */
@@ -186,10 +182,10 @@ reloc:
* for the (l)user though.
*/
1: xorl %bx, %bx
- # cmpw $SIGNATURE, (%bx)
+ # cmpw $DOSMBR_SIGNATURE, (%bx)
.byte 0x81, 0xbf
.word signature
- .word SIGNATURE
+ .word DOSMBR_SIGNATURE
je sigok
data32
movl $esig, %esi
@@ -207,12 +203,12 @@ sigok:
data32
movl $pt, %esi
data32
- movl $NUMPART, %ecx
+ movl $NDOSPART, %ecx
1:
DBGMSG(CHAR_L)
# movb (%si), %al
.byte 0x8a, 0x44, 0x00
- cmpb $BOOTABLE, %al
+ cmpb $DOSACTIVE, %al
je found
data32
addl $PARTSZ, %esi
@@ -357,7 +353,7 @@ endofcode:
/* partition table */
/* flag, head, sec, cyl, type, ehead, esect, ecyl, start, len */
- . = 0x1be # starting address of partition table
+ . = DOSPARTOFF # starting address of partition table
pt:
.byte 0x0,0,0,0,0,0,0,0
.long 0,0
@@ -365,11 +361,11 @@ pt:
.long 0,0
.byte 0x0,0,0,0,0,0,0,0
.long 0,0
- .byte BOOTABLE,0,1,0,BSDPART,255,255,255
+ .byte DOSACTIVE,0,1,0,DOSPTYP_OPENBSD,255,255,255
.long 0,0x7FFFFFFF
/* the last 2 bytes in the sector 0 contain the signature */
. = 0x1fe
signature:
- .short SIGNATURE
+ .short DOSMBR_SIGNATURE
. = 0x200