From 96ae5e84e3d49221f14fcb6a59ab74c9e90a381b Mon Sep 17 00:00:00 2001 From: SarahW Date: Sun, 29 Jan 2017 20:49:04 +0000 Subject: [PATCH] Intel Turbo Reset Control register needs to reset keyboard controller on hard reset. Fixes infinite memory count on reset on Advanced/EV and Premiere/PCI. --- src/i430fx.c | 6 +++--- src/i430lx.c | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/i430fx.c b/src/i430fx.c index 1abe254..c5936fe 100644 --- a/src/i430fx.c +++ b/src/i430fx.c @@ -99,9 +99,6 @@ uint8_t i430fx_read(int func, int addr, void *priv) return card_i430fx[addr]; } -/*The Turbo-Reset Control Register isn't listed in the i430FX datasheet, however - the Advanced/EV BIOS seems to assume it exists. It aliases with one of the PCI - registers.*/ static uint8_t trc = 0; void i430fx_trc_write(uint16_t port, uint8_t val, void *p) @@ -109,7 +106,10 @@ void i430fx_trc_write(uint16_t port, uint8_t val, void *p) if ((val & 4) && !(trc & 4)) { if (val & 2) /*Hard reset*/ + { i430fx_write(0, 0x59, 0xf, NULL); /*Should reset all PCI devices, but just set PAM0 to point to ROM for now*/ + keyboard_at_reset(); /*Reset keyboard controller to reset system flag*/ + } resetx86(); } diff --git a/src/i430lx.c b/src/i430lx.c index ec82583..3cfbc22 100644 --- a/src/i430lx.c +++ b/src/i430lx.c @@ -111,7 +111,10 @@ void i430lx_trc_write(uint16_t port, uint8_t val, void *p) if ((val & 4) && !(trc & 4)) { if (val & 2) /*Hard reset*/ + { i430lx_write(0, 0x59, 0xf, NULL); /*Should reset all PCI devices, but just set PAM0 to point to ROM for now*/ + keyboard_at_reset(); /*Reset keyboard controller to reset system flag*/ + } resetx86(); }