summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2021-04-05 17:20:03 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2021-04-05 17:20:03 +0200
commitf040677be3c0eec63a5bd013a092ac5182790a50 (patch)
tree92802f7fe914f55b3348b56f44edc06890638c8c
parent305c9dcf20c06b07183a09131225248be80cfb8a (diff)
kd: Do not read the CMOS ram
This could conflict with read/writing the RTC. * i386/i386at/kd.c (kd_xga_init): Do not read the CRAM. We were always assuming VGA anyway.
-rw-r--r--i386/i386at/cram.h2
-rw-r--r--i386/i386at/kd.c11
2 files changed, 10 insertions, 3 deletions
diff --git a/i386/i386at/cram.h b/i386/i386at/cram.h
index 40f3f0a5..8a3a6ec9 100644
--- a/i386/i386at/cram.h
+++ b/i386/i386at/cram.h
@@ -53,6 +53,8 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef _CRAM_H_
#define _CRAM_H_
+/* XXX: this conflicts with read/writing the RTC */
+
/*
* outb(CMOS_ADDR, addr);
* result = inb(CMOS_DATA);
diff --git a/i386/i386at/kd.c b/i386/i386at/kd.c
index 8e9222a0..b5501873 100644
--- a/i386/i386at/kd.c
+++ b/i386/i386at/kd.c
@@ -2489,9 +2489,13 @@ void
kd_xga_init(void)
{
csrpos_t xga_getpos();
- unsigned char screen;
unsigned char start, stop;
+#if 0
+ unsigned char screen;
+
+ /* XXX: this conflicts with read/writing the RTC */
+
outb(CMOS_ADDR, CMOS_EB);
screen = inb(CMOS_DATA) & CM_SCRMSK;
switch(screen) {
@@ -2499,6 +2503,7 @@ kd_xga_init(void)
printf("kd: unknown screen type, defaulting to EGA\n");
/* FALLTHROUGH */
case CM_EGA_VGA:
+#endif
/*
* Here we'll want to query to bios on the card
* itself, because then we can figure out what
@@ -2522,8 +2527,8 @@ kd_xga_init(void)
for (i = 0; i < 200; i++)
addr[i] = 0x00;
}
- break;
#if 0
+ break;
/* XXX: some buggy BIOSes report these... */
case CM_CGA_40:
vid_start = (u_char *)phystokv(CGA_START);
@@ -2546,8 +2551,8 @@ kd_xga_init(void)
kd_lines = 25;
kd_cols = 80;
break;
-#endif
}
+#endif
outb(kd_index_reg, C_START);
start = inb(kd_io_reg);