Commit 5e4f15e
[#877] Bus: Set IO_MEM_EXECUTABLE_IO for all non-IMapped peripherals
Previously, only ArrayMemory peripherals had the IO_MEM_EXECUTABLE_IO
flag set, allowing instruction fetch via I/O callbacks. Any other
non-IMapped peripheral (e.g. dynamically compiled C# peripherals)
would trigger cpu_abort when the CPU tried to execute code from their
address range.
Generalize the check from `peripheral is ArrayMemory` to
`!(peripheral is IMapped)` in three places:
- SystemBus.RegisterInner: set flag when peripheral is first registered
- SystemBus.MoveRegistrationWithinContext: preserve flag on re-registration
- Machine.PostCreationActions: set flag for peripherals registered before CPU
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 3a50186 commit 5e4f15e
File tree
2 files changed
+14
-3
lines changed- src/Emulator/Main
- Core
- Peripherals/Bus
2 files changed
+14
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1027 | 1027 | | |
1028 | 1028 | | |
1029 | 1029 | | |
1030 | | - | |
| 1030 | + | |
| 1031 | + | |
1031 | 1032 | | |
1032 | 1033 | | |
1033 | | - | |
| 1034 | + | |
1034 | 1035 | | |
1035 | 1036 | | |
1036 | 1037 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1260 | 1260 | | |
1261 | 1261 | | |
1262 | 1262 | | |
1263 | | - | |
| 1263 | + | |
1264 | 1264 | | |
1265 | 1265 | | |
1266 | 1266 | | |
| |||
2054 | 2054 | | |
2055 | 2055 | | |
2056 | 2056 | | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
2057 | 2067 | | |
2058 | 2068 | | |
2059 | 2069 | | |
| |||
0 commit comments