From f4c59e907da2d1366ede222fba05bf0515979a01 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 11 Jun 2023 22:07:32 +0200 Subject: [PATCH] Removed mmu_invalidate(). --- src/cpu/x86_ops_pmode.h | 2 +- src/include/86box/mem.h | 1 - src/mem/mem.c | 6 ------ src/video/vid_sigma.c | 4 ++-- 4 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/cpu/x86_ops_pmode.h b/src/cpu/x86_ops_pmode.h index 4fee881ea..7e9f05a63 100644 --- a/src/cpu/x86_ops_pmode.h +++ b/src/cpu/x86_ops_pmode.h @@ -461,7 +461,7 @@ op0F01_common(uint32_t fetchdat, int is32, int is286, int ea32) break; } SEG_CHECK_READ(cpu_state.ea_seg); - mmu_invalidate(ds + cpu_state.eaaddr); + flushmmucache_cr3(); CLOCK_CYCLES(12); PREFETCH_RUN(12, 2, rmdat, 0, 0, 0, 0, ea32); break; diff --git a/src/include/86box/mem.h b/src/include/86box/mem.h index 0f4f0b62e..4bdf185af 100644 --- a/src/include/86box/mem.h +++ b/src/include/86box/mem.h @@ -415,7 +415,6 @@ extern void mem_reset_page_blocks(void); extern void flushmmucache(void); extern void flushmmucache_nopc(void); -extern void mmu_invalidate(uint32_t addr); extern void mem_a20_init(void); extern void mem_a20_recalc(void); diff --git a/src/mem/mem.c b/src/mem/mem.c index 6c994d156..68a66922f 100644 --- a/src/mem/mem.c +++ b/src/mem/mem.c @@ -544,12 +544,6 @@ mmutranslate_noabrt(uint32_t addr, int rw) return mmutranslate_noabrt_normal(addr, rw); } -void -mmu_invalidate(uint32_t addr) -{ - flushmmucache_cr3(); -} - uint8_t mem_addr_range_match(uint32_t addr, uint32_t start, uint32_t len) { diff --git a/src/video/vid_sigma.c b/src/video/vid_sigma.c index a8f946e25..125626007 100644 --- a/src/video/vid_sigma.c +++ b/src/video/vid_sigma.c @@ -246,7 +246,7 @@ sigma_out(uint16_t addr, uint8_t val, void *p) return; case 0x2DD: /* Page in RAM at 0xC1800 */ if (sigma->rom_paged != 0) - mmu_invalidate(0xC0000); + flushmmucache_cr3(); sigma->rom_paged = 0x00; return; @@ -290,7 +290,7 @@ sigma_in(uint16_t addr, void *p) case 0x2DD: /* Page in ROM at 0xC1800 */ result = (sigma->rom_paged ? 0x80 : 0); if (sigma->rom_paged != 0x80) - mmu_invalidate(0xC0000); + flushmmucache_cr3(); sigma->rom_paged = 0x80; break; case 0x3D1: