Module address_space

Source
Expand description

Local map and limited virtual address space manipulation support for the bootshim. Certain configurations of the bootshim need the ability to map in arbitrary GPAs to process their contents in various ways. Additionally, certain VAs need to be made host visible for certain periods of time. This module provides the necessary support for manipulating the paging structures involved.

Structsยง

LocalMap
Local Map. Provides a VA region where arbitrary physical addresses can be mapped into the virtual address space on the current processor.
LocalMapMapping
PageTable ๐Ÿ”’
PageTableEntry ๐Ÿ”’

Enumsยง

PageTableEntryType

Constantsยง

PAGE_TABLE_ENTRY_COUNT ๐Ÿ”’
X64_PAGE_SHIFT ๐Ÿ”’
X64_PTE_ACCESSED ๐Ÿ”’
X64_PTE_BITS ๐Ÿ”’
X64_PTE_CONFIDENTIAL ๐Ÿ”’
X64_PTE_DIRTY ๐Ÿ”’
X64_PTE_LARGE_PAGE ๐Ÿ”’
X64_PTE_PRESENT ๐Ÿ”’
X64_PTE_READ_WRITE ๐Ÿ”’

Staticsยง

LOCAL_MAP_INITIALIZED ๐Ÿ”’

Functionsยง

get_amd64_pte_index ๐Ÿ”’
Get an AMD64 PTE index based on page table level.
get_pde_for_va ๐Ÿ”’ โš 
Returns a reference to the PDE corresponding to a virtual address.
init_local_map
Initializes the local map. This function should only be called once. It returns a LocalMap structure with a static lifetime. va is the virtual address of the local map region. It must be 2MB aligned.
page_table_at_address ๐Ÿ”’ โš 
Returns a reference to the page table page located at the specified physical address.
unmap_page_helper ๐Ÿ”’