]> Joshua Wise's Git repositories - netwatch.git/commitdiff
add serial output to aseg-paging
authorJoshua Wise <joshua@rebirth.joshuawise.com>
Fri, 7 Nov 2008 20:08:28 +0000 (15:08 -0500)
committerJoshua Wise <joshua@rebirth.joshuawise.com>
Fri, 7 Nov 2008 20:08:28 +0000 (15:08 -0500)
aseg-paging/Makefile
aseg-paging/firstrun.c
aseg-paging/vga-overlay.c
include/serial.h [new file with mode: 0644]

index ec2474e3d278ac4ead29185e2f8aeac9fc3ec634..a3a52f8a1c65cd1823f09ab576d0c862b2807fb1 100644 (file)
@@ -6,7 +6,7 @@ CFLAGS=-I../include -I../include/raw \
 
 STUBOBJS=entry.o pagingstub-asm.o pagingstub.o
 
-OBJS=smi.o ../ich2/smi.o ../ich2/smram-ich2.o vga-overlay.o ../pci/pci-raw.o ../lib/minilib.o ../lib/doprnt.o ../lib/sprintf.o ../lib/console.o
+OBJS=smi.o ../ich2/smi.o ../ich2/smram-ich2.o vga-overlay.o ../pci/pci-raw.o ../lib/minilib.o ../lib/doprnt.o ../lib/sprintf.o ../lib/console.o ../lib/serial.o
 
 all: aseg.elf
 
index 649583b0fad39fa1e1085303d132344fcdc09e55..97e86920215f8d661a9a9feb711a13c5554cef6a 100644 (file)
@@ -19,6 +19,7 @@ void __firstrun_start() {
        
        smram = smram_save_state();
        smram_tseg_set_state(SMRAM_TSEG_OPEN);
+       serial_init();
 /*     
        for (bp = (void *)&_bss; (void *)bp < (void *)&_bssend; bp++)
                *bp = 0;
index 4d19c3bd6366f18a02ae899ce89190e848dacd72..7b33a7bd03f09dfd691516ea61b8fbca3eaa6de5 100644 (file)
@@ -4,6 +4,7 @@
 #include <minilib.h>
 #include <stdarg.h>
 #include <output.h>
+#include <serial.h>
 
 #define LOGLEN 96
 #define LOG_ONSCREEN 4
@@ -86,6 +87,8 @@ void dolog(const char *s)
 {
        strcpy(logents[prodptr], s);
        prodptr = (prodptr + 1) % LOGLEN;
+       while (*s)
+               serial_tx(*s);
        if (flush_imm)
                outlog();
 }
diff --git a/include/serial.h b/include/serial.h
new file mode 100644 (file)
index 0000000..dcb5921
--- /dev/null
@@ -0,0 +1,7 @@
+#ifndef SERIAL_H
+#define SERIAL_H
+
+extern void serial_init();
+extern void serial_tx(unsigned char c);
+
+#endif
This page took 0.025788 seconds and 4 git commands to generate.