1
2
3
4
5
6
7
8
9
10
11
12
use crate::tt::IntermediateLevel;

use super::*;

impl<L: IntermediateLevel> DescriptorBuilder<L> {
    pub fn block(&mut self, pa: usize) -> BlockDescriptor<L> {
        // TODO: verify PA alignment and size, attributes
        let bits = pa | 0b01;

        unsafe { BlockDescriptor::from_bits_unchecked(bits as u64) }
    }
}