From c72a688c10373ff4bf3bd6ac99a02ebd3bb96047 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Sat, 18 Apr 1992 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1992-04-18 --- pc/vga.c | 15 +++++++++------ power/bboot.c | 11 +++++++++++ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/pc/vga.c b/pc/vga.c index 3f65d4fa31a705af51527e0797b1972cfd3bbb45..4535fc5b196c07699c5968aeacfa44be752b3f17 100644 --- a/pc/vga.c +++ b/pc/vga.c @@ -108,16 +108,18 @@ VGAmode mode12 = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff, /* attribute */ - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07, - 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, - 0x01, 0x07, 0x0f, 0x00, 0x00, + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0d, 0x0f, + 0x01, 0x10, 0x0f, 0x00, 0x00, }; #endif +#define TESTDELAY 1 + void genout(int reg, int val) { -delay(1000); +delay(TESTDELAY); if(reg == 0) outb(EMISCW, val); else if (reg == 1) @@ -129,7 +131,7 @@ srout(int reg, int val) /* * needed or the screen goes blank on an ultra VGA card */ - delay(1000); + delay(TESTDELAY); outb(SRX, reg); outb(SR, val); } @@ -153,7 +155,7 @@ arout(int reg, int val) void crout(int reg, int val) { - delay(1000); /* needed for 16bit VGA path on Ultra SVGA */ + delay(TESTDELAY); /* needed for 16bit VGA path on Ultra SVGA */ outb(CRX, reg); outb(CR, val); } @@ -224,6 +226,7 @@ screeninit(void) out.pos.x = MINX; out.pos.y = 0; out.bwid = defont0.info[' '].width; +print("PEL Mask Register = %02x\n", inb(0x3c6)&0xff); } void diff --git a/power/bboot.c b/power/bboot.c index 551c2397a320a0bc7d6940808b88d66eceaefafe..d811ad7eac594a200bea3ae9ba64c758ba59f89f 100644 --- a/power/bboot.c +++ b/power/bboot.c @@ -99,6 +99,17 @@ main(int argc, char *argv[]) (*mp->config)(mp); islocal = strcmp(mp->name, "local") == 0; + /* + * set user to none + */ + fd = open("#c/user", OWRITE|OTRUNC); + if(fd >= 0){ + if(write(fd, "none", 4) < 0) + warning("write user name"); + close(fd); + }else + warning("open #c/user"); + /* * connect to the root file system */