From 397a084b9ba159050825447db2b6a1177195d0be Mon Sep 17 00:00:00 2001 From: Dun Tan Date: Mon, 5 Feb 2024 11:35:00 +0800 Subject: [PATCH] UefiCpuPkg: Add more Paging mode enumeration Add more Paging mode enumeration in CpuPageTableLib to support forced mapping a range in 4K page granularity. Signed-off-by: Dun Tan Reviewed-by: Ray Ni Reviewed-by: Jiaxin Wu Cc: Laszlo Ersek Cc: Rahul Kumar Cc: Gerd Hoffmann --- UefiCpuPkg/Include/Library/CpuPageTableLib.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/UefiCpuPkg/Include/Library/CpuPageTableLib.h b/UefiCpuPkg/Include/Library/CpuPageTableLib.h index 78aa83b8de..6225a1d8e9 100644 --- a/UefiCpuPkg/Include/Library/CpuPageTableLib.h +++ b/UefiCpuPkg/Include/Library/CpuPageTableLib.h @@ -46,11 +46,17 @@ typedef enum { // High byte in paging mode indicates the max levels of the page table. // Low byte in paging mode indicates the max level that can be a leaf entry. // - PagingPae = 0x0302, + PagingPae4KB = 0x0301, + PagingPae2MB = 0x0302, + PagingPae = 0x0302, + Paging4Level4KB = 0x0401, + Paging4Level2MB = 0x0402, Paging4Level = 0x0402, Paging4Level1GB = 0x0403, + Paging5Level4KB = 0x0501, + Paging5Level2MB = 0x0502, Paging5Level = 0x0502, Paging5Level1GB = 0x0503,