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/lib There are other systems besides the ...
details: https://anonhg.NetBSD.org/src/rev/7d0dc8870f47
branches: trunk
changeset: 535221:7d0dc8870f47
user: thorpej <thorpej%NetBSD.org@localhost>
date: Mon Aug 12 14:27:34 2002 +0000
description:
There are other systems besides the PS/2 L40 that enable A20
via the Configuration Port, so restructure the code a little
to allow for them, and list at least one other system that does
(anything based on AMD Elan SC520).
XXX We don't actually check for Elan SC520 yet.
diffstat:
sys/arch/i386/stand/lib/gatea20.c | 38 ++++++++++++++++++++------------------
1 files changed, 20 insertions(+), 18 deletions(-)
diffs (56 lines):
diff -r f1cc6ad404cc -r 7d0dc8870f47 sys/arch/i386/stand/lib/gatea20.c
--- a/sys/arch/i386/stand/lib/gatea20.c Mon Aug 12 14:20:44 2002 +0000
+++ b/sys/arch/i386/stand/lib/gatea20.c Mon Aug 12 14:27:34 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gatea20.c,v 1.4 2001/05/19 18:15:14 jdolecek Exp $ */
+/* $NetBSD: gatea20.c,v 1.5 2002/08/12 14:27:34 thorpej Exp $ */
/* extracted from freebsd:sys/i386/boot/biosboot/io.c */
@@ -32,27 +32,29 @@
void gateA20()
{
__asm("pushfl ; cli");
-#ifdef SUPPORT_PS2
/*
- * Check if the machine is PS/2 L40 via biosmca_model, which is
- * initialized before gateA20() is called.
+ * Not all systems enable A20 via the keyboard controller.
+ * * IBM PS/2 L40
+ * * AMD Elan SC520-based systems
*/
- if (biosmca_ps2model == 0xf82)
- outb(0x92, 0x2);
- else {
+ if (
+#ifdef SUPPORT_PS2
+ biosmca_ps2model == 0xf82 ||
#endif
- while (inb(K_STATUS) & K_IBUF_FUL);
- while (inb(K_STATUS) & K_OBUF_FUL)
- (void)inb(K_RDWR);
+ /* XXX How to check for AMD Elan SC520? */
+ 0) {
+ outb(0x92, 0x2);
+ } else {
+ while (inb(K_STATUS) & K_IBUF_FUL);
+ while (inb(K_STATUS) & K_OBUF_FUL)
+ (void)inb(K_RDWR);
- outb(K_CMD, KC_CMD_WOUT);
- delay(100);
- while (inb(K_STATUS) & K_IBUF_FUL);
- outb(K_RDWR, x_20);
- delay(100);
- while (inb(K_STATUS) & K_IBUF_FUL);
-#ifdef SUPPORT_PS2
+ outb(K_CMD, KC_CMD_WOUT);
+ delay(100);
+ while (inb(K_STATUS) & K_IBUF_FUL);
+ outb(K_RDWR, x_20);
+ delay(100);
+ while (inb(K_STATUS) & K_IBUF_FUL);
}
-#endif
__asm("popfl");
}
Home |
Main Index |
Thread Index |
Old Index