From 841b54e275fef021259a25a34650c6cfd02a3faa Mon Sep 17 00:00:00 2001 From: jhb Date: Thu, 24 Aug 2000 20:57:44 +0000 Subject: Add a new compile-time tweak to BTX. If you set the make(1) variable BOOT_BTX_NOHANG, then BTX will be compiled with the appropriate flags so that it reboots after a fault instead of hanging forever. Requested by: ps Approved by: rnordier --- sys/boot/i386/btx/btx/Makefile | 8 ++++++++ sys/boot/i386/btx/btx/btx.S | 2 +- sys/boot/i386/btx/btx/btx.s | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/sys/boot/i386/btx/btx/Makefile b/sys/boot/i386/btx/btx/Makefile index 22b935d..d3ead1b 100644 --- a/sys/boot/i386/btx/btx/Makefile +++ b/sys/boot/i386/btx/btx/Makefile @@ -6,6 +6,14 @@ M4?= m4 M4FLAGS+= -DPAGING .endif +.if defined(BOOT_BTX_NOHANG) +BOOT_BTX_FLAGS=0x1 +.else +BOOT_BTX_FLAGS=0x0 +.endif + +AFLAGS+= --defsym BTX_FLAGS=${BOOT_BTX_FLAGS} + ORG= 0x9000 all: btx diff --git a/sys/boot/i386/btx/btx/btx.S b/sys/boot/i386/btx/btx/btx.S index 48729cf..72ba555 100644 --- a/sys/boot/i386/btx/btx/btx.S +++ b/sys/boot/i386/btx/btx/btx.S @@ -104,7 +104,7 @@ btx_hdr: .byte 0xeb # Machine ID .ascii "BTX" # Magic .byte 0x1 # Major version .byte 0x1 # Minor version - .byte 0x0 # Flags + .byte BTX_FLAGS # Flags .word PAG_CNT-MEM_ORG>>0xc # Paging control .word break-start # Text size .long 0x0 # Entry address diff --git a/sys/boot/i386/btx/btx/btx.s b/sys/boot/i386/btx/btx/btx.s index 48729cf..72ba555 100644 --- a/sys/boot/i386/btx/btx/btx.s +++ b/sys/boot/i386/btx/btx/btx.s @@ -104,7 +104,7 @@ btx_hdr: .byte 0xeb # Machine ID .ascii "BTX" # Magic .byte 0x1 # Major version .byte 0x1 # Minor version - .byte 0x0 # Flags + .byte BTX_FLAGS # Flags .word PAG_CNT-MEM_ORG>>0xc # Paging control .word break-start # Text size .long 0x0 # Entry address -- cgit v1.1