sel4/arch/riscv/
mod.rs

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
//
// Copyright 2023, Colias Group, LLC
//
// SPDX-License-Identifier: MIT
//

mod invocations;
mod object;
mod user_context;
mod vm_attributes;
mod vspace;

pub(crate) mod fault;

pub(crate) mod top_level {
    pub use super::{
        object::{ObjectBlueprintArch, ObjectBlueprintRiscV, ObjectTypeArch, ObjectTypeRISCV},
        user_context::UserContext,
        vm_attributes::VmAttributes,
        vspace::{FrameObjectType, TranslationTableObjectType},
        NUM_FAST_MESSAGE_REGISTERS,
    };
}

pub(crate) use vspace::vspace_levels;

pub const NUM_FAST_MESSAGE_REGISTERS: usize = 4;

pub(crate) mod cap_type_arch {
    use crate::declare_cap_type_for_object_of_fixed_size;

    declare_cap_type_for_object_of_fixed_size!(_4kPage {
        ObjectTypeArch,
        ObjectBlueprintArch
    });
    declare_cap_type_for_object_of_fixed_size!(MegaPage {
        ObjectTypeArch,
        ObjectBlueprintArch
    });

    #[sel4_config::sel4_cfg(any(PT_LEVELS = "3", PT_LEVELS = "4"))]
    declare_cap_type_for_object_of_fixed_size!(GigaPage {
        ObjectTypeArch,
        ObjectBlueprintArch
    });

    declare_cap_type_for_object_of_fixed_size!(PageTable {
        ObjectTypeArch,
        ObjectBlueprintArch
    });

    pub type VSpace = PageTable;
    pub type Granule = _4kPage;
}

pub(crate) mod cap_arch {
    use crate::declare_cap_alias;

    declare_cap_alias!(_4kPage);
    declare_cap_alias!(MegaPage);

    #[sel4_config::sel4_cfg(any(PT_LEVELS = "3", PT_LEVELS = "4"))]
    declare_cap_alias!(GigaPage);

    declare_cap_alias!(PageTable);
}