summaryrefslogtreecommitdiffstats
path: root/sys/boot
diff options
context:
space:
mode:
authorrnordier <rnordier@FreeBSD.org>1999-01-10 14:48:05 +0000
committerrnordier <rnordier@FreeBSD.org>1999-01-10 14:48:05 +0000
commit7f3d2452320394dccd35802fb6ca523094e5ef8a (patch)
tree299a4d4116a863a6fb06a86b43b6d7b31d97cc49 /sys/boot
parent7694f216801b3a5fc116cc0959125be152f955a9 (diff)
downloadFreeBSD-src-7f3d2452320394dccd35802fb6ca523094e5ef8a.zip
FreeBSD-src-7f3d2452320394dccd35802fb6ca523094e5ef8a.tar.gz
Use etc/make.conf settings for serial port and speed.
Submitted by: rvb Reviewed by: bde
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/i386/boot2/Makefile11
-rw-r--r--sys/boot/i386/boot2/sio.S4
-rw-r--r--sys/boot/i386/boot2/sio.s4
-rw-r--r--sys/boot/i386/gptboot/Makefile11
-rw-r--r--sys/boot/i386/libi386/Makefile8
-rw-r--r--sys/boot/i386/libi386/comconsole.c6
6 files changed, 28 insertions, 16 deletions
diff --git a/sys/boot/i386/boot2/Makefile b/sys/boot/i386/boot2/Makefile
index d3711b0..2b581ec 100644
--- a/sys/boot/i386/boot2/Makefile
+++ b/sys/boot/i386/boot2/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.9 1998/11/05 20:52:25 rnordier Exp $
+# $Id: Makefile,v 1.10 1998/11/08 15:36:34 rnordier Exp $
PROG= boot2
NOMAN=
@@ -11,9 +11,9 @@ CLEANFILES+= boot1 boot1.out boot1.o \
M4?= m4
-B2SIOPRT?= 0x3f8
+BOOT_COMCONSOLE_PORT?= 0x3f8
+BOOT_COMCONSOLE_SPEED?= 9600
B2SIOFMT?= 0x3
-B2SIODIV?= 0xc
.if exists(${.OBJDIR}/../btx)
BTX= ${.OBJDIR}/../btx
@@ -62,8 +62,9 @@ boot2.out: boot2.o sio.o
${BTX}/lib/crt0.o boot2.o sio.o
sio.o: sio.s
- (cd ${.CURDIR}; ${M4} -DSIOPRT=${B2SIOPRT} \
- -DSIOFMT=${B2SIOFMT} -DSIODIV=${B2SIODIV} sio.s) | \
+ (cd ${.CURDIR}; ${M4} -DSIOPRT=${BOOT_COMCONSOLE_PORT} \
+ -DSIOFMT=${B2SIOFMT} \
+ -DSIOSPD=${BOOT_COMCONSOLE_SPEED} sio.s) | \
${AS} ${AFLAGS} -o ${.TARGET}
install:
diff --git a/sys/boot/i386/boot2/sio.S b/sys/boot/i386/boot2/sio.S
index bc68bf5..92237b8 100644
--- a/sys/boot/i386/boot2/sio.S
+++ b/sys/boot/i386/boot2/sio.S
@@ -13,11 +13,11 @@
# purpose.
#
-# $Id: sio.s,v 1.1 1998/10/15 20:04:21 rnordier Exp $
+# $Id: sio.s,v 1.2 1998/10/20 20:20:48 rnordier Exp $
.set SIO_PRT,SIOPRT # Base port
.set SIO_FMT,SIOFMT # 8N1
- .set SIO_DIV,SIODIV # 115200 / BPS
+ .set SIO_DIV,(115200/SIOSPD) # 115200 / SPD
.globl sio_init
.globl sio_flush
diff --git a/sys/boot/i386/boot2/sio.s b/sys/boot/i386/boot2/sio.s
index bc68bf5..92237b8 100644
--- a/sys/boot/i386/boot2/sio.s
+++ b/sys/boot/i386/boot2/sio.s
@@ -13,11 +13,11 @@
# purpose.
#
-# $Id: sio.s,v 1.1 1998/10/15 20:04:21 rnordier Exp $
+# $Id: sio.s,v 1.2 1998/10/20 20:20:48 rnordier Exp $
.set SIO_PRT,SIOPRT # Base port
.set SIO_FMT,SIOFMT # 8N1
- .set SIO_DIV,SIODIV # 115200 / BPS
+ .set SIO_DIV,(115200/SIOSPD) # 115200 / SPD
.globl sio_init
.globl sio_flush
diff --git a/sys/boot/i386/gptboot/Makefile b/sys/boot/i386/gptboot/Makefile
index d3711b0..2b581ec 100644
--- a/sys/boot/i386/gptboot/Makefile
+++ b/sys/boot/i386/gptboot/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.9 1998/11/05 20:52:25 rnordier Exp $
+# $Id: Makefile,v 1.10 1998/11/08 15:36:34 rnordier Exp $
PROG= boot2
NOMAN=
@@ -11,9 +11,9 @@ CLEANFILES+= boot1 boot1.out boot1.o \
M4?= m4
-B2SIOPRT?= 0x3f8
+BOOT_COMCONSOLE_PORT?= 0x3f8
+BOOT_COMCONSOLE_SPEED?= 9600
B2SIOFMT?= 0x3
-B2SIODIV?= 0xc
.if exists(${.OBJDIR}/../btx)
BTX= ${.OBJDIR}/../btx
@@ -62,8 +62,9 @@ boot2.out: boot2.o sio.o
${BTX}/lib/crt0.o boot2.o sio.o
sio.o: sio.s
- (cd ${.CURDIR}; ${M4} -DSIOPRT=${B2SIOPRT} \
- -DSIOFMT=${B2SIOFMT} -DSIODIV=${B2SIODIV} sio.s) | \
+ (cd ${.CURDIR}; ${M4} -DSIOPRT=${BOOT_COMCONSOLE_PORT} \
+ -DSIOFMT=${B2SIOFMT} \
+ -DSIOSPD=${BOOT_COMCONSOLE_SPEED} sio.s) | \
${AS} ${AFLAGS} -o ${.TARGET}
install:
diff --git a/sys/boot/i386/libi386/Makefile b/sys/boot/i386/libi386/Makefile
index e1276fe..2cfd2e3 100644
--- a/sys/boot/i386/libi386/Makefile
+++ b/sys/boot/i386/libi386/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.11 1998/10/23 22:29:08 msmith Exp $
+# $Id: Makefile,v 1.12 1998/12/22 11:51:25 abial Exp $
#
LIB= i386
NOPIC=
@@ -13,6 +13,12 @@ SRCS= aout_freebsd.c biosdisk.c biosmem.c biospnp.c biospci.c \
CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../btx/lib \
-I${.CURDIR}/../../.. -I.
+BOOT_COMCONSOLE_PORT?= 0x3f8
+CFLAGS+= -DCOMPORT=${BOOT_COMCONSOLE_PORT}
+
+BOOT_COMCONSOLE_SPEED?= 9600
+CFLAGS+= -DCOMSPEED=${BOOT_COMCONSOLE_SPEED}
+
# Make the disk code more talkative
#CFLAGS+= -DDISK_DEBUG
diff --git a/sys/boot/i386/libi386/comconsole.c b/sys/boot/i386/libi386/comconsole.c
index b530eeb..7b35d1d 100644
--- a/sys/boot/i386/libi386/comconsole.c
+++ b/sys/boot/i386/libi386/comconsole.c
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: comconsole.c,v 1.4 1998/10/11 10:05:13 peter Exp $
+ * $Id: comconsole.c,v 1.5 1998/11/22 07:59:16 rnordier Exp $
*/
#include <stand.h>
@@ -54,8 +54,12 @@
#define COMC_TXWAIT 0x40000 /* transmit timeout */
#define COMC_BPS(x) (115200 / (x)) /* speed to DLAB divisor */
+#ifndef COMPORT
#define COMPORT 0x3f8
+#endif
+#ifndef COMSPEED
#define COMSPEED 9600
+#endif
static void comc_probe(struct console *cp);
static int comc_init(int arg);
OpenPOWER on IntegriCloud