27 lines
513 B
Rust
27 lines
513 B
Rust
use bytemuck::{Pod, Zeroable};
|
|
|
|
use crate::RawTable;
|
|
|
|
pub const KERNEL_L3_COUNT: usize = 4;
|
|
|
|
#[derive(Clone, Copy, Pod, Zeroable)]
|
|
#[repr(C)]
|
|
pub struct FixedTables {
|
|
// 1GiB entries
|
|
pub l1: RawTable,
|
|
|
|
// 2MiB entries
|
|
pub l2: RawTable,
|
|
pub l3s: [RawTable; KERNEL_L3_COUNT],
|
|
}
|
|
|
|
impl FixedTables {
|
|
pub const fn zeroed() -> Self {
|
|
Self {
|
|
l1: RawTable::zeroed(),
|
|
l2: RawTable::zeroed(),
|
|
l3s: [RawTable::zeroed(); KERNEL_L3_COUNT],
|
|
}
|
|
}
|
|
}
|