test/mmio/cases.rad 1.1 KiB raw
1
//! Device-access scenarios shared with the kernel checker.
2
3
/// Register operation and capability configuration selected by the parent.
4
export union Scenario: Copy {
5
    /// Read and write all supported register widths.
6
    Widths = 0,
7
    /// Access through the absent handle.
8
    MissingHandle = 1,
9
    /// Write through read-only authority.
10
    ReadOnly = 2,
11
    /// Read through write-only authority.
12
    WriteOnly = 3,
13
    /// Write at an address that is not naturally aligned.
14
    Misaligned = 4,
15
    /// Read beyond the device region.
16
    OutOfBounds = 5,
17
    /// Access through a dropped capability.
18
    DroppedHandle = 6,
19
    /// Use a page capability as a device.
20
    WrongKind = 7,
21
    /// Overflow the device address calculation.
22
    AddressOverflow = 8,
23
}
24
25
/// Status returned after all valid register accesses pass.
26
export constant EXIT_STATUS: u32 = 61;
27
/// Emulator success value used to expose an unauthorized device write.
28
export constant FINISH_VALUE: u32 = 0x5555;
29
/// Byte offset just beyond the synthetic device page.
30
export constant REGION_SIZE: u64 = 4096;