]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/CpuDxe/Ia32/PagingAttribute.c
UefiCpuPkg/CpuDxe: clean up PAGE_TABLE_LIB_PAGING_CONTEXT usage.
[mirror_edk2.git] / UefiCpuPkg / CpuDxe / Ia32 / PagingAttribute.c
diff --git a/UefiCpuPkg/CpuDxe/Ia32/PagingAttribute.c b/UefiCpuPkg/CpuDxe/Ia32/PagingAttribute.c
new file mode 100644 (file)
index 0000000..3325a42
--- /dev/null
@@ -0,0 +1,34 @@
+/** @file\r
+  Return Paging attribute.\r
+\r
+  Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+#include "CpuPageTable.h"\r
+\r
+\r
+/**\r
+  Get paging details.\r
+\r
+  @param  PagingContextData      The paging context.\r
+  @param  PageTableBase          Return PageTableBase field.\r
+  @param  Attributes             Return Attributes field.\r
+\r
+**/\r
+VOID\r
+GetPagingDetails (\r
+  IN  PAGE_TABLE_LIB_PAGING_CONTEXT_DATA *PagingContextData,\r
+  OUT UINTN                              **PageTableBase     OPTIONAL,\r
+  OUT UINT32                             **Attributes        OPTIONAL\r
+  )\r
+{\r
+  if (PageTableBase != NULL) {\r
+    *PageTableBase = &PagingContextData->Ia32.PageTableBase;\r
+  }\r
+  if (Attributes != NULL) {\r
+    *Attributes = &PagingContextData->Ia32.Attributes;\r
+  }\r
+}\r
+\r