diff options
author | rnordier <rnordier@FreeBSD.org> | 1998-11-05 20:52:25 +0000 |
---|---|---|
committer | rnordier <rnordier@FreeBSD.org> | 1998-11-05 20:52:25 +0000 |
commit | b975f40fac11caca651c2bb4f4e08640381fcf8f (patch) | |
tree | 855f3064316e9b731e497f2053a3d068c28d1496 /sys/boot | |
parent | e9582417392ed244d57d8d625ab335a3589831fe (diff) | |
download | FreeBSD-src-b975f40fac11caca651c2bb4f4e08640381fcf8f.zip FreeBSD-src-b975f40fac11caca651c2bb4f4e08640381fcf8f.tar.gz |
Make use of BIOS int 0x13 extensions configurable, and disabled
by default.
Diffstat (limited to 'sys/boot')
-rw-r--r-- | sys/boot/i386/boot2/Makefile | 5 | ||||
-rw-r--r-- | sys/boot/i386/boot2/boot1.S | 8 | ||||
-rw-r--r-- | sys/boot/i386/boot2/boot1.m4 | 3 | ||||
-rw-r--r-- | sys/boot/i386/boot2/boot1.s | 8 | ||||
-rw-r--r-- | sys/boot/i386/gptboot/Makefile | 5 |
5 files changed, 20 insertions, 9 deletions
diff --git a/sys/boot/i386/boot2/Makefile b/sys/boot/i386/boot2/Makefile index d0d5fef..b7823bf 100644 --- a/sys/boot/i386/boot2/Makefile +++ b/sys/boot/i386/boot2/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.7 1998/10/15 22:08:13 rnordier Exp $ +# $Id: Makefile,v 1.8 1998/10/20 20:20:48 rnordier Exp $ PROG= boot2 NOMAN= @@ -11,6 +11,7 @@ CLEANFILES+= boot1 boot1.out boot1.o \ M4?= m4 +B1INT13X?= 0 B2SIOPRT?= 0x3f8 B2SIOFMT?= 0x3 B2SIODIV?= 0xc @@ -41,7 +42,7 @@ boot1.out: boot1.o ${LD} ${LDFLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} boot1.o boot1.o: boot1.m4 boot1.s - (cd ${.CURDIR}; ${M4} boot1.m4 boot1.s) | \ + (cd ${.CURDIR}; ${M4} -DFLAGS=${B1INT13X} boot1.m4 boot1.s) | \ ${AS} ${AFLAGS} -o ${.TARGET} boot2: boot2.ldr boot2.bin diff --git a/sys/boot/i386/boot2/boot1.S b/sys/boot/i386/boot2/boot1.S index a919d2e..99397a3 100644 --- a/sys/boot/i386/boot2/boot1.S +++ b/sys/boot/i386/boot2/boot1.S @@ -13,7 +13,7 @@ # purpose. # -# $Id: boot1.s,v 1.2 1998/10/13 21:35:42 rnordier Exp $ +# $Id: boot1.s,v 1.3 1998/10/27 20:19:24 rnordier Exp $ .set MEM_REL,0x600 # Relocation address .set MEM_ARG,0x800 # Arguments @@ -156,7 +156,9 @@ return: ret # Generic return # Read from disk -read: testb %dh,%dh # Try for extensions? +read: tstbim(0x80,MEM_REL+flags-start)# Extensions enabled? + jz read.3 # No + testb %dh,%dh # Try for extensions? jz read.3 # No movwir(0x55aa,_bx) # Magic pushl %edx # Save @@ -239,6 +241,8 @@ msg_read: .asciz "Read error" msg_part: .asciz "No bootable partition" msg_boot: .asciz "\r\nHit return to reboot: " +flags: .byte FLAGS # Flags + .org PRT_OFF,0x90 # Partition table diff --git a/sys/boot/i386/boot2/boot1.m4 b/sys/boot/i386/boot2/boot1.m4 index fc221a1..b16de41 100644 --- a/sys/boot/i386/boot2/boot1.m4 +++ b/sys/boot/i386/boot2/boot1.m4 @@ -13,7 +13,7 @@ # purpose. # -# $Id:$ +# $Id: boot1.m4,v 1.1.1.1 1998/10/12 21:16:26 rnordier Exp $ define(_al,0x0)dnl define(_cl,0x1)dnl @@ -60,3 +60,4 @@ define(movbi1,`.byte 0xc6; .byte 0x40 | $3; .byte $2; .byte $1')dnl define(callwi,`.byte 0xe8; .word $1 - . - 0x2')dnl define(jmpnwi,`.byte 0xe9; .word $1 - . - 0x2')dnl define(tstbi0,`.byte 0xf6; .byte $2; .byte $1')dnl +define(tstbim,`.byte 0xf6; .byte 0x6; .word $2; .byte $1')dnl diff --git a/sys/boot/i386/boot2/boot1.s b/sys/boot/i386/boot2/boot1.s index a919d2e..99397a3 100644 --- a/sys/boot/i386/boot2/boot1.s +++ b/sys/boot/i386/boot2/boot1.s @@ -13,7 +13,7 @@ # purpose. # -# $Id: boot1.s,v 1.2 1998/10/13 21:35:42 rnordier Exp $ +# $Id: boot1.s,v 1.3 1998/10/27 20:19:24 rnordier Exp $ .set MEM_REL,0x600 # Relocation address .set MEM_ARG,0x800 # Arguments @@ -156,7 +156,9 @@ return: ret # Generic return # Read from disk -read: testb %dh,%dh # Try for extensions? +read: tstbim(0x80,MEM_REL+flags-start)# Extensions enabled? + jz read.3 # No + testb %dh,%dh # Try for extensions? jz read.3 # No movwir(0x55aa,_bx) # Magic pushl %edx # Save @@ -239,6 +241,8 @@ msg_read: .asciz "Read error" msg_part: .asciz "No bootable partition" msg_boot: .asciz "\r\nHit return to reboot: " +flags: .byte FLAGS # Flags + .org PRT_OFF,0x90 # Partition table diff --git a/sys/boot/i386/gptboot/Makefile b/sys/boot/i386/gptboot/Makefile index d0d5fef..b7823bf 100644 --- a/sys/boot/i386/gptboot/Makefile +++ b/sys/boot/i386/gptboot/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.7 1998/10/15 22:08:13 rnordier Exp $ +# $Id: Makefile,v 1.8 1998/10/20 20:20:48 rnordier Exp $ PROG= boot2 NOMAN= @@ -11,6 +11,7 @@ CLEANFILES+= boot1 boot1.out boot1.o \ M4?= m4 +B1INT13X?= 0 B2SIOPRT?= 0x3f8 B2SIOFMT?= 0x3 B2SIODIV?= 0xc @@ -41,7 +42,7 @@ boot1.out: boot1.o ${LD} ${LDFLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} boot1.o boot1.o: boot1.m4 boot1.s - (cd ${.CURDIR}; ${M4} boot1.m4 boot1.s) | \ + (cd ${.CURDIR}; ${M4} -DFLAGS=${B1INT13X} boot1.m4 boot1.s) | \ ${AS} ${AFLAGS} -o ${.TARGET} boot2: boot2.ldr boot2.bin |