From 35aedf1ba64de6f51029da9e2f2c67dc21318c06 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Tue, 13 Oct 2020 19:26:29 -0300 Subject: [PATCH] Add special case on NVR register 0D for VIA 686A/B --- src/nvr_at.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/nvr_at.c b/src/nvr_at.c index d95a6d7c0..17504f64e 100644 --- a/src/nvr_at.c +++ b/src/nvr_at.c @@ -580,7 +580,17 @@ nvr_reg_write(uint16_t reg, uint8_t val, void *priv) break; case RTC_REGC: /* R/O */ + break; + case RTC_REGD: /* R/O */ + /* VT82C686A/B have an ACPI register bit controlled by 0D bit 7. + This is overwritten on read, but testing shows BIOSes will + immediately check the ACPI register after writing to this. */ + if (local->cent == RTC_CENTURY_VIA) { + nvr->regs[RTC_REGD] &= ~0x80; + if (val & 0x80) + nvr->regs[RTC_REGD] |= 0x80; + } break; case 0x2e: