diff options
author | John Baldwin <jhb@FreeBSD.org> | 2004-11-24 15:39:04 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2004-11-24 15:39:04 +0000 |
commit | 4e38f13b5b37168f75e81b9d5db4147bcdbb14dd (patch) | |
tree | a0fea8cfc6131cd6145b88294704e9690b857202 /sys | |
parent | 95e583726f7fee42316f43501717ba6046f24ce6 (diff) | |
download | src-4e38f13b5b37168f75e81b9d5db4147bcdbb14dd.tar.gz src-4e38f13b5b37168f75e81b9d5db4147bcdbb14dd.zip |
- 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
Notes
Notes:
svn path=/head/; revision=138048
Diffstat (limited to 'sys')
-rw-r--r-- | sys/boot/i386/boot0/boot0.S | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/boot/i386/boot0/boot0.S b/sys/boot/i386/boot0/boot0.S index 7b957adf655f..de3ed5477524 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 |