TianoCore EDK2 master
|
Go to the source code of this file.
Macros | |
#define | IA32_PAE_RESERVED_MASK 0x7FF0000000000000ull |
Functions | |
VOID | InitGlobalData (UINTN MemorySpace) |
UNIT_TEST_STATUS | IsPageTableEntryValid (IN IA32_PAGING_ENTRY *PagingEntry, IN UINTN Level, IN UINTN MaxLeafLevel, IN UINT64 Address, IN PAGING_MODE PagingMode) |
UNIT_TEST_STATUS | IsPageTableValid (IN UINTN PageTable, IN PAGING_MODE PagingMode) |
UINT64 | GetEntryFromSubPageTable (IN IA32_PAGING_ENTRY *PagingEntry, IN OUT UINTN *Level, IN UINTN MaxLeafLevel, IN UINT64 Address) |
UINT64 | GetEntryFromPageTable (IN UINTN PageTable, IN PAGING_MODE PagingMode, IN UINT64 Address, OUT UINTN *Level) |
UINT64 | GetMaxAddress (IN PAGING_MODE Mode) |
Variables | |
IA32_PAGING_ENTRY | mValidMaskNoLeaf [6] |
IA32_PAGING_ENTRY | mValidMaskLeaf [6] |
IA32_PAGING_ENTRY | mValidMaskLeafFlag [6] |
helper file for Unit tests of the CpuPageTableLib instance of the CpuPageTableLib class
Copyright (c) 2022 - 2023, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file TestHelper.c.
#define IA32_PAE_RESERVED_MASK 0x7FF0000000000000ull |
Definition at line 12 of file TestHelper.c.
UINT64 GetEntryFromPageTable | ( | IN UINTN | PageTable, |
IN PAGING_MODE | PagingMode, | ||
IN UINT64 | Address, | ||
OUT UINTN * | Level | ||
) |
Get the leaf entry for a given linear address from a page table
[in] | PageTable | The pointer to the page table. |
[in] | PagingMode | The paging mode. |
[in] | LinearAddress | The linear address. |
[out] | Level | leaf entry's level. |
Leaf | entry. |
Definition at line 267 of file TestHelper.c.
UINT64 GetEntryFromSubPageTable | ( | IN IA32_PAGING_ENTRY * | PagingEntry, |
IN OUT UINTN * | Level, | ||
IN UINTN | MaxLeafLevel, | ||
IN UINT64 | Address | ||
) |
Get the leaf entry for a given linear address from one entry in page table
[in] | PagingEntry | The entry in page table which covers the linear address |
[in,out] | Level | On input, is the level of PagingEntry. On outout, is the level of the leaf entry |
[in] | MaxLeafLevel | Max leaf entry level. |
[in] | LinearAddress | The linear address. |
Leaf | entry. |
Definition at line 224 of file TestHelper.c.
UINT64 GetMaxAddress | ( | IN PAGING_MODE | Mode | ) |
Get max physical adrress supported by specific page mode
[in] | Mode | The paging mode. |
max | address. |
Definition at line 306 of file TestHelper.c.
VOID InitGlobalData | ( | UINTN | MemorySpace | ) |
Init global data.
[in] | MemorySpace | Memory space |
Definition at line 31 of file TestHelper.c.
UNIT_TEST_STATUS IsPageTableEntryValid | ( | IN IA32_PAGING_ENTRY * | PagingEntry, |
IN UINTN | Level, | ||
IN UINTN | MaxLeafLevel, | ||
IN UINT64 | Address, | ||
IN PAGING_MODE | PagingMode | ||
) |
Check if the Page table entry is valid
[in] | PagingEntry | The entry in page table to verify |
[in] | Level | the level of PagingEntry. |
[in] | MaxLeafLevel | Max leaf entry level. |
[in] | LinearAddress | The linear address verified. |
[in] | PagingMode | The paging mode. |
Leaf | entry. |
Definition at line 104 of file TestHelper.c.
UNIT_TEST_STATUS IsPageTableValid | ( | IN UINTN | PageTable, |
IN PAGING_MODE | PagingMode | ||
) |
Check if the Page table is valid
[in] | PageTable | The pointer to the page table. |
[in] | PagingMode | The paging mode. |
UNIT_TEST_PASSED | It is a valid Page Table |
Definition at line 170 of file TestHelper.c.
IA32_PAGING_ENTRY mValidMaskLeaf[6] |
Definition at line 22 of file TestHelper.c.
IA32_PAGING_ENTRY mValidMaskLeafFlag[6] |
Definition at line 23 of file TestHelper.c.
IA32_PAGING_ENTRY mValidMaskNoLeaf[6] |
Definition at line 21 of file TestHelper.c.