Confusion about virtual memory mapping #231
Unanswered
FallenStarAngelFox
asked this question in
Tutorial Questions
Replies: 1 comment
-
I'm not quite sure how to answer your questions. I will try to take a look at this sometime soon. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to implement a 4kib Translation Granule Size instead of 64Kib, I am a little confused as to how translation works despite having gone through the armv8a documentation. Could someone please help me understand the difference between page,block,table descriptors, their permissions and how to create a translation table?
const NUM_LVL2_TABLES: usize = bsp::memory::mmu::KernelAddrSpace::SIZE >> Granule512MiB::SHIFT;
//--------------------------------------------------------------------------------------------------
// Public Definitions
//--------------------------------------------------------------------------------------------------
/// Big monolithic struct for storing the translation tables. Individual levels must be 64 KiB
/// aligned, so the lvl3 is put first.
#[repr(C)]
#[repr(align(65536))]
pub struct FixedSizeTranslationTable {
/// Page descriptors, covering 64 KiB windows per entry.
lvl3: [[PageDescriptor; 8192]; NUM_TABLES],
}
/// A translation table type for the kernel space.
pub type KernelTranslationTable = FixedSizeTranslationTable<NUM_LVL2_TABLES>;
Beta Was this translation helpful? Give feedback.
All reactions