PagingAttribute.c 842 B

123456789101112131415161718192021222324252627282930313233
  1. /** @file
  2. Return Paging attribute.
  3. Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. #include "CpuPageTable.h"
  7. /**
  8. Get paging details.
  9. @param PagingContextData The paging context.
  10. @param PageTableBase Return PageTableBase field.
  11. @param Attributes Return Attributes field.
  12. **/
  13. VOID
  14. GetPagingDetails (
  15. IN PAGE_TABLE_LIB_PAGING_CONTEXT_DATA *PagingContextData,
  16. OUT UINTN **PageTableBase OPTIONAL,
  17. OUT UINT32 **Attributes OPTIONAL
  18. )
  19. {
  20. if (PageTableBase != NULL) {
  21. *PageTableBase = &PagingContextData->Ia32.PageTableBase;
  22. }
  23. if (Attributes != NULL) {
  24. *Attributes = &PagingContextData->Ia32.Attributes;
  25. }
  26. }