From b06cf654be3ded238b43e144b7ae78836cff7ef1 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Tue, 6 Jan 2004 18:46:35 +0000 Subject: [PATCH] Allow one to specify the com port settings for boot0sio. --- sys/boot/i386/boot0/Makefile | 10 +++++++++- sys/boot/i386/boot0/boot0.S | 3 +-- sys/boot/i386/boot0/boot0sio.s | 3 +-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/sys/boot/i386/boot0/Makefile b/sys/boot/i386/boot0/Makefile index 825e50c2854..057268b94e9 100644 --- a/sys/boot/i386/boot0/Makefile +++ b/sys/boot/i386/boot0/Makefile @@ -23,13 +23,21 @@ BOOT_BOOT0_TICKS?= 0xb6 # unless you are glutton for punishment. BOOT_BOOT0_ORG?= 0x600 +# Comm settings for boot0sio. 0xE3 => 9600 8-N-1 +# XXX: We should create a build-tool or something to convert BOOT_CONSOLE_SPEED +# and BOOT_COMCONSOLE_PORT into the correct values to define on the build +# command line +BOOT_BOOT0_COMCONSOLE_SPEED?= 0xE3 + ${PROG}: ${PROG}.o ${LD} -N -e start -Ttext ${BOOT_BOOT0_ORG} -o ${PROG}.out ${PROG}.o objcopy -S -O binary ${PROG}.out ${.TARGET} ${PROG}.o: ${PROG}.s ${AS} ${AFLAGS} --defsym FLAGS=${BOOT_BOOT0_FLAGS} \ - --defsym TICKS=${BOOT_BOOT0_TICKS} ${.IMPSRC} -o ${.TARGET} + --defsym TICKS=${BOOT_BOOT0_TICKS} \ + --defsym COMSPEED=${BOOT_BOOT0_COMCONSOLE_SPEED} \ + ${.IMPSRC} -o ${.TARGET} CLEANFILES+= ${PROG}.out ${PROG}.o diff --git a/sys/boot/i386/boot0/boot0.S b/sys/boot/i386/boot0/boot0.S index c60e512f54c..17305d86fd6 100644 --- a/sys/boot/i386/boot0/boot0.S +++ b/sys/boot/i386/boot0/boot0.S @@ -95,8 +95,7 @@ start: cld # String ops inc # main: pushw %dx # Save xorw %dx,%dx # Port: COM1 - movb $0xE3,%al # 9600 8-N-1 - + movb COMSPEED,%al # defined by Makefile movb $0x00,%ah # BIOS: Set COM Port int $0x14 # Parameters popw %dx # Restore diff --git a/sys/boot/i386/boot0/boot0sio.s b/sys/boot/i386/boot0/boot0sio.s index c60e512f54c..17305d86fd6 100644 --- a/sys/boot/i386/boot0/boot0sio.s +++ b/sys/boot/i386/boot0/boot0sio.s @@ -95,8 +95,7 @@ start: cld # String ops inc # main: pushw %dx # Save xorw %dx,%dx # Port: COM1 - movb $0xE3,%al # 9600 8-N-1 - + movb COMSPEED,%al # defined by Makefile movb $0x00,%ah # BIOS: Set COM Port int $0x14 # Parameters popw %dx # Restore -- 2.45.2