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ยง
- Local
Map - Local Map. Provides a VA region where arbitrary physical addresses can be mapped into the virtual address space on the current processor.
- Local
MapMapping - Page
Table ๐ - Page
Table ๐Entry
Enumsยง
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ยง
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