feat(memory): protect CPU BIOS reads with retained ARM prefetch
Retain the supplied image PC+8 snapshot after successful ARM BIOS instructions. CPU data reads from outside BIOS use its byte lanes; reads inside BIOS and host inspection remain mapped reads. Keep nominal timing and diagnostic atomicity. Unknown history, Thumb BIOS execution, and missing lookahead remain explicit limits rather than guessed values. Add original regressions for ARM/Thumb callers, all CPU modes, widths and rotation, synthetic SWI/IRQ returns, original boot provenance, context isolation, history invalidation, and device progress. No Nintendo firmware or opcode constants are used to synthesize results. Darwin arm64 validation: 861 workspace tests and 792 core/demo tests in debug and release; 39 Python tests; native ROM windows; all ten demo smoke tests; fmt, clippy, rustdoc, and docs links. Public ARM, Thumb, and memory ROMs still pass. The public BIOS ROM still fails firmware-specific test 1, now reading its actual replacement-BIOS prefetch rather than raw vector bytes.
This commit is contained in:
parent
6e736c634b
commit
c31a703db4
11 changed files with 399 additions and 16 deletions
|
|
@ -60,9 +60,18 @@ Before BIOS read protection:
|
|||
- The emulator instead exposes the replacement BIOS reset-vector instruction at address zero.
|
||||
- The later post-SWI and IRQ checks are not reached.
|
||||
|
||||
This reveals a missing bus-protection rule and a separate firmware-specific expectation.
|
||||
Implementing protection must not substitute Nintendo opcode constants merely to pass this ROM.
|
||||
The original BIOS has a different layout, so its retained prefetch data can differ even with protection implemented.
|
||||
After the bounded ARM BIOS read-protection implementation:
|
||||
|
||||
- Both builds still report test 1 as failed after 64 steps and 543 nominal cycles.
|
||||
- The protected read now returns `0xe59f1320`, sampled from the original BIOS at its final boot instruction's PC+8.
|
||||
- It no longer exposes address zero's reset-vector word, `0xea000006`.
|
||||
- The test still expects `0xe129f000`. No assertion, checkpoint, ROM byte, or returned constant was changed to force a pass.
|
||||
- Tests 2–4 remain unreached. Their SWI and IRQ cases have not passed independently.
|
||||
|
||||
The initial failure exposed both a missing bus-protection rule and a firmware-specific expectation.
|
||||
The supported protection subset now derives data from the actual supplied image.
|
||||
The original BIOS has a different layout, so its retained prefetch data differs from Nintendo firmware.
|
||||
See [CPU BIOS read protection and its limits](hardware/bios.md#cpu-bios-read-protection).
|
||||
No public BIOS pass is claimed. The ARM, Thumb, and memory suites remain separate passing results.
|
||||
Exact fetch-pipeline behavior and full BIOS compatibility remain unverified.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue