diff --git a/sys/boot/i386/boot2/Makefile b/sys/boot/i386/boot2/Makefile index d0d5fefae2a8..b7823bf427bd 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 a919d2ecdfcd..99397a394a56 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 fc221a1854c1..b16de41babeb 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 a919d2ecdfcd..99397a394a56 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 d0d5fefae2a8..b7823bf427bd 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