1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
//! PMMU emulation for the M68030, M68040, and M68060.
//!
//! The 68030 path implements its programmable multi-level table format,
//! CRP/SRP selection, function-code lookup, transparent translation, PTEST,
//! and accumulated write/supervisor protection. The 68040 and 68060 use the
//! fixed root/pointer/page table format, instruction/data transparent
//! translation registers, and a direct-mapped address-translation cache.
//!
//! Table-walk bus errors and protection failures retain enough cause detail
//! for generation-specific exception frames. Used/modified descriptor
//! write-back, 68030 root-descriptor limit checks, and a DT=1 page descriptor
//! directly in the 68030 root pointer are not modeled.
use crateCpuCore;
use crateAddressBus;
pub use Atc;
pub use ptest_030;
pub use translate;
/// Architectural class of an MMU operation or translation fault.
/// Why a translation failed, at the granularity the 68060 FSLW reports:
/// which walk level held the invalid descriptor, or which protection or
/// bus condition stopped the access. The 030/040 frames do not consume
/// this detail; the 68060 access-error frame does.
/// MMU failure returned to the CPU's exception-delivery path.
/// Result of an MMU translation or PMMU operation.
pub type MmuResult<T> = ;
/// Translate a logical address using the configured CPU's PMMU state.
///
/// `write` selects read versus write permission checking, `supervisor`
/// selects the user/supervisor root and protection domain, and `instruction`
/// selects instruction versus data transparent-translation registers.
/// Disabled or absent PMMUs return the logical address unchanged.