summaryrefslogtreecommitdiffstats
path: root/sys/boot
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2004-11-24 15:39:04 +0000
committerjhb <jhb@FreeBSD.org>2004-11-24 15:39:04 +0000
commitd9d5c6d6b74aaa2f2f9c921becaab7c8668b8662 (patch)
treea0fea8cfc6131cd6145b88294704e9690b857202 /sys/boot
parentd211cd088bdc99d0652ca133a3d982b42a66b037 (diff)
downloadFreeBSD-src-d9d5c6d6b74aaa2f2f9c921becaab7c8668b8662.zip
FreeBSD-src-d9d5c6d6b74aaa2f2f9c921becaab7c8668b8662.tar.gz
- If the COMSPEED is set to 0, then don't try to initialize the serial port
and assume that the BIOS has set it up for us. This allows folks with a serial-aware BIOS to set the BIOS to speeds above 9600 and allow boot0 to just use the existing settings. - Purge some gratuitous cpp comments as per style(9). Submitted by: Danny Braniss danny at cs dot huji dot ac dot il (1) MFC after: 1 month
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/i386/boot0/boot0.S20
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/boot/i386/boot0/boot0.S b/sys/boot/i386/boot0/boot0.S
index 7b957ad..de3ed54 100644
--- a/sys/boot/i386/boot0/boot0.S
+++ b/sys/boot/i386/boot0/boot0.S
@@ -19,7 +19,7 @@
/* A 512-byte boot manager. */
#ifdef SIO
/* ... using a serial console on COM1. */
-#endif /* SIO */
+#endif
.set NHRDRV,0x475 # Number of hard drives
.set ORIGIN,0x600 # Execution address
@@ -92,13 +92,13 @@ start: cld # String ops inc
jmp main-LOAD+ORIGIN # To relocated code
main:
-#ifdef SIO
+#if defined(SIO) && COMSPEED != 0
/*
* Initialize the serial port. bioscom preserves the driver number in DX.
*/
movw COMSPEED,%ax # defined by Makefile
callw bioscom
-#endif /* SIO */
+#endif
/*
* Check what flags were loaded with us, specifically if a predefined drive
* number should be used. If what the bios gives us is bad, use the '0' in
@@ -235,18 +235,18 @@ main.11:
xorb %ah,%ah # BIOS: Get
int $0x16 # keypress
movb %ah,%al # Scan code
-#else /* SIO */
+#else
movb $0x02,%ah # BIOS: Receive
call bioscom
-#endif /* SIO */
+#endif
/*
* If it's CR act as if timed out.
*/
#ifndef SIO
cmpb $KEY_ENTER,%al # Enter pressed?
-#else /* SIO */
+#else
cmpb $ASCII_CR,%al # Enter pressed?
-#endif /* SIO */
+#endif
je main.9 # Yes
/*
* Otherwise check if legal. If not ask again.
@@ -256,9 +256,9 @@ main.11:
cmpb $0x4,%al # F1..F5?
jna main.12 # Yes
subb $(KEY_1 - KEY_F1),%al # Less #1 scan code
-#else /* SIO */
+#else
subb $'1',%al # Less '1' ascii character
-#endif /* SIO */
+#endif
cmpb $0x4,%al # #1..#5?
ja main.10 # No
/*
@@ -326,7 +326,7 @@ putkey:
#ifndef SIO
movb $'F',%al # Display
callw putchr # 'F'
-#endif /* SIO */
+#endif
movb $'1',%al # Prepare
addb %dl,%al # digit
jmp putstr.1 # Display the rest
OpenPOWER on IntegriCloud