mirror of
https://github.com/Creased/RCM-Emulator.git
synced 2026-12-06 02:48:11 +01:00
Stop the RTC window from shadowing the PMC block
This commit is contained in:
1 parent
265ca5404c
commit
6fb2aecd20
2 files changed
+7
-2
No files matched your search
+6
-1
@@ -74,7 +74,12 @@ constexpr uint64_t PWM_SIZE = 0x1000;
|
||||
|
||||
// RTC
|
||||
constexpr uint64_t RTC_BASE = 0x7000E000;
|
||||
constexpr uint64_t RTC_SIZE = 0x1000;
|
||||
// 0x400, NOT 0x1000: the PMC block starts at 0x7000E400, immediately after the
|
||||
// RTC. A 0x1000-long RTC window swallowed the whole PMC range, and because the
|
||||
// RTC branch is tested first in the MMIO dispatch, every PMC access (reset
|
||||
// status, scratch registers, and the MAIN_RST reboot write) silently went to
|
||||
// the RTC handler instead.
|
||||
constexpr uint64_t RTC_SIZE = 0x400;
|
||||
|
||||
// PMC (Power Management Controller)
|
||||
constexpr uint64_t PMC_BASE = 0x7000E400;
|
||||
|
||||
+1
-1
@@ -2329,7 +2329,7 @@ static void hook_mmio_write(uc_engine *uc, uc_mem_type type, uint64_t address,
|
||||
(address >= I2C1_BASE && address < I2C1_BASE + 0x1000) ||
|
||||
(address >= I2C5_BASE && address < I2C5_BASE + 0x1000) ||
|
||||
(address >= SE_BASE && address < SE_BASE + SE_SIZE) ||
|
||||
(address >= RTC_BASE && address < RTC_BASE + 0x1000))) {
|
||||
(address >= RTC_BASE && address < RTC_BASE + RTC_SIZE))) {
|
||||
printf("[mmio] W: 0x%08llX = 0x%08X (PC=0x%08X)\n",
|
||||
(unsigned long long)address, val, pc);
|
||||
fflush(stdout);
|
||||
|
||||
Reference in new issue
Block a user