From 5ebc4910dbbbefbd05374269e4a6422af40b39ea Mon Sep 17 00:00:00 2001 From: OBattler Date: Fri, 22 Jul 2022 18:51:16 +0200 Subject: [PATCH] Disabled two new ALi M6117 features on M1217, fixes #2494. --- src/chipset/ali6117.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/chipset/ali6117.c b/src/chipset/ali6117.c index 224d448a2..612970e45 100644 --- a/src/chipset/ali6117.c +++ b/src/chipset/ali6117.c @@ -219,12 +219,14 @@ ali6117_reg_write(uint16_t addr, uint8_t val, void *priv) refresh_at_enable = !(val & 0x02) || !!(dev->regs[0x20] & 0x80); dev->regs[dev->reg_offset] = val; - if (val & 0x04) - mem_set_mem_state_both(0x00f00000, 0x00100000, MEM_READ_EXTANY | MEM_WRITE_EXTANY); - else - mem_set_mem_state_both(0x00f00000, 0x00100000, MEM_READ_INTERNAL | MEM_WRITE_INTERNAL); + if (dev->local != 0x8) { + if (val & 0x04) + mem_set_mem_state_both(0x00f00000, 0x00100000, MEM_READ_EXTANY | MEM_WRITE_EXTANY); + else + mem_set_mem_state_both(0x00f00000, 0x00100000, MEM_READ_INTERNAL | MEM_WRITE_INTERNAL); - ali6117_bank_recalc(dev); + ali6117_bank_recalc(dev); + } break; case 0x12: @@ -417,9 +419,11 @@ ali6117_reset(void *priv) refresh_at_enable = 1; - /* On-board memory 15-16M is enabled by default. */ - mem_set_mem_state_both(0x00f00000, 0x00100000, MEM_READ_INTERNAL | MEM_WRITE_INTERNAL); - ali6117_bank_recalc(dev); + if (dev->local != 0x8) { + /* On-board memory 15-16M is enabled by default. */ + mem_set_mem_state_both(0x00f00000, 0x00100000, MEM_READ_INTERNAL | MEM_WRITE_INTERNAL); + ali6117_bank_recalc(dev); + } }