From 7400b3fdd1820ef3602b6117ffa36bc703bc3280 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Fri, 7 Oct 1994 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1994-10-07 --- carrera/segment.h | 1 + pc/main.c | 1 + pc/ns16552.h | 13 ++++++++++++- pc/trap.c | 1 + 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/carrera/segment.h b/carrera/segment.h index 86af5480493a3717886739913f423a0718db4d17..8ec9fe906f69922bd13eb1e6aae7710d965cd03a 100644 --- a/carrera/segment.h +++ b/carrera/segment.h @@ -10,5 +10,6 @@ Physseg physseg[] = { SG_PHYSICAL, "eisavga", Eisavgaphys, 128*1024, 0, 0 }, { SG_PHYSICAL, "bootrom", 0x1fc00000, 256*1024, 0, 0 }, { SG_PHYSICAL, "nvram", 0xe0009000, 12*1024, 0, 0 }, + { SG_PHYSICAL, "fb", 0xe2000000, 4*1024*1024, 0, 0 }, { 0, 0, 0, 0, 0, 0 }, }; diff --git a/pc/main.c b/pc/main.c index 840d4ebab689ec0178cd347d85748eaf5f9cd365..60d2038a75fe7be1cbbb1191e8d1a07caedcd42c 100644 --- a/pc/main.c +++ b/pc/main.c @@ -50,6 +50,7 @@ main(void) screeninit(); printinit(); mmuinit(); + ns16552install(); pageinit(); trapinit(); mathinit(); diff --git a/pc/ns16552.h b/pc/ns16552.h index 0c310fdd4361890d613147f169be2de70593ae4a..f63f6bca326829c7b5e9007f4bc22ae0ed52733d 100644 --- a/pc/ns16552.h +++ b/pc/ns16552.h @@ -81,11 +81,17 @@ mp008intr(Ureg *ur, void *arg) /* * install the uarts (called by reset) */ -static void +void ns16552install(void) { int i, j, port; + char *p; Scard *sc; + static int already; + + if(already) + return; + already = 1; /* first two ports are always there and always the normal frequency */ ns16552setup(0x3F8, UartFREQ); @@ -93,6 +99,11 @@ ns16552install(void) ns16552setup(0x2F8, UartFREQ); setvec(Uart1vec, ns16552intrx, (void*)1); + /* set up a serial console */ + p = getconf("console"); + if(p) + ns16552special(atoi(p), 9600, &kbdq, &printq, kbdcr2nl); + /* the rest come out of plan9.ini */ for(i = 0; i < Maxcard; i++){ sc = scard[i] = xalloc(sizeof(Scard)); diff --git a/pc/trap.c b/pc/trap.c index 23b67b2066e89ed66422e25ce54a427862b68313..0e27bfa0181dd4ba05c538bc1a111d37f97f003b 100644 --- a/pc/trap.c +++ b/pc/trap.c @@ -172,6 +172,7 @@ trapinit(void) sethvec(Bptvec, intr3, SEGIG, 3); setvec(Bptvec, debugbpt, 0); + /* * tell the hardware where the table is (and how long) */