//! Device-access scenarios shared with the kernel checker.

/// Register operation and capability configuration selected by the parent.
export union Scenario: Copy {
    /// Read and write all supported register widths.
    Widths = 0,
    /// Access through the absent handle.
    MissingHandle = 1,
    /// Write through read-only authority.
    ReadOnly = 2,
    /// Read through write-only authority.
    WriteOnly = 3,
    /// Write at an address that is not naturally aligned.
    Misaligned = 4,
    /// Read beyond the device region.
    OutOfBounds = 5,
    /// Access through a dropped capability.
    DroppedHandle = 6,
    /// Use a page capability as a device.
    WrongKind = 7,
    /// Overflow the device address calculation.
    AddressOverflow = 8,
}

/// Status returned after all valid register accesses pass.
export constant EXIT_STATUS: u32 = 61;
/// Emulator success value used to expose an unauthorized device write.
export constant FINISH_VALUE: u32 = 0x5555;
/// Byte offset just beyond the synthetic device page.
export constant REGION_SIZE: u64 = 4096;
