Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Confusion about virtual memory mapping#231

Unanswered
Discussion options

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],

/// Table descriptors, covering 512 MiB windows.lvl2: [TableDescriptor; NUM_TABLES],

}

/// A translation table type for the kernel space.
pub type KernelTranslationTable = FixedSizeTranslationTable<NUM_LVL2_TABLES>;

You must be logged in to vote

Replies: 1 comment

Comment options

I'm not quite sure how to answer your questions. I will try to take a look at this sometime soon.

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Labels
None yet
2 participants
@FallenStarAngelFox@BartMassey

[8]ページ先頭

©2009-2025 Movatter.jp