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.

This commit is contained in:
SarahW 2017-01-29 20:49:04 +00:00
commit 96ae5e84e3
2 changed files with 6 additions and 3 deletions

View file

@ -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();
}

View file

@ -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();
}