Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/stand Move code for outputting directly to the...



details:   https://anonhg.NetBSD.org/src/rev/3416390a5847
branches:  trunk
changeset: 749162:3416390a5847
user:      dsl <dsl%NetBSD.org@localhost>
date:      Thu Nov 19 22:10:03 2009 +0000

description:
Move code for outputting directly to the serial port into message.S
Allows it to be enabled for other parts of the boot sequence.

diffstat:

 sys/arch/i386/stand/lib/message.S |  15 ++++++++++++++-
 sys/arch/i386/stand/mbr/mbr.S     |  21 +--------------------
 2 files changed, 15 insertions(+), 21 deletions(-)

diffs (75 lines):

diff -r b723cffe0edc -r 3416390a5847 sys/arch/i386/stand/lib/message.S
--- a/sys/arch/i386/stand/lib/message.S Thu Nov 19 22:08:14 2009 +0000
+++ b/sys/arch/i386/stand/lib/message.S Thu Nov 19 22:10:03 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: message.S,v 1.3 2008/04/28 20:23:25 martin Exp $       */
+/*     $NetBSD: message.S,v 1.4 2009/11/19 22:10:03 dsl Exp $  */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -33,6 +33,10 @@
 
        .global message, message_1
 
+#if defined(BOOT_MSG_COM0) && !defined(COM_PORT_VAL)
+#define COM_PORT_VAL $0x3f8            /* Value for COM1 */
+#endif
+
 /*
  * message: write the error message in %ds:%esi to the console
  */
@@ -49,9 +53,18 @@
 message_1:                     /* for dump_eax */
        lodsb
 1:
+#ifdef COM_PORT_VAL
+       mov     COM_PORT_VAL, %dx
+       outb    %al, %dx
+       add     $5, %dl
+2:     inb     %dx
+       test    $0x40, %al
+       jz      2b
+#else
        movb    $0x0e, %ah
        movw    $0x0001, %bx
        int     $0x10
+#endif
        lodsb
        testb   %al, %al
        jnz     1b
diff -r b723cffe0edc -r 3416390a5847 sys/arch/i386/stand/mbr/mbr.S
--- a/sys/arch/i386/stand/mbr/mbr.S     Thu Nov 19 22:08:14 2009 +0000
+++ b/sys/arch/i386/stand/mbr/mbr.S     Thu Nov 19 22:10:03 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mbr.S,v 1.21 2009/11/18 20:51:22 dsl Exp $     */
+/*     $NetBSD: mbr.S,v 1.22 2009/11/19 22:10:03 dsl Exp $     */
 
 /*
  * Copyright (c) 1999-2004 The NetBSD Foundation, Inc. 
@@ -602,26 +602,7 @@
 message_crlf:
        call    message
        movw    $crlf, %si
-#ifdef COM_PORT_VAL
-message:
-       pusha
-message_1:
-       lodsb
-       test    %al, %al
-       jz      3f
-       mov     COM_PORT_VAL, %dx
-       outb    %al, %dx
-       add     $5, %dl
-2:     inb     %dx
-       test    $0x40, %al
-       jz      2b
-       jmp     message_1
-3:     popa
-       ret
-#else
 #include <message.S>
-#endif
-
 #if 0
 #include <dump_eax.S>
 #endif



Home | Main Index | Thread Index | Old Index