]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/CpuDxe/CpuDxe.h
UefiCpuPkg/CpuDxe: fix ECC reported issues
[mirror_edk2.git] / UefiCpuPkg / CpuDxe / CpuDxe.h
index a25b35c6ebf01d6f844a2dd6582b1778a3d997dd..064ea05bbacec4a9556e9dbe494e1edfc90cd27c 100644 (file)
                                        EFI_MEMORY_RO    \\r
                                        )\r
 \r
+#define HEAP_GUARD_NONSTOP_MODE       \\r
+        ((PcdGet8 (PcdHeapGuardPropertyMask) & (BIT6|BIT1|BIT0)) > BIT6)\r
+\r
+#define NULL_DETECTION_NONSTOP_MODE   \\r
+        ((PcdGet8 (PcdNullPointerDetectionPropertyMask) & (BIT6|BIT0)) > BIT6)\r
+\r
 /**\r
   Flush CPU data cache. If the instruction cache is fully coherent\r
   with all DMA operations then function can just return EFI_SUCCESS.\r
@@ -265,10 +271,48 @@ SetDataSelectors (
   UINT16 Selector\r
   );\r
 \r
+/**\r
+  Update GCD memory space attributes according to current page table setup.\r
+**/\r
 VOID\r
 RefreshGcdMemoryAttributesFromPaging (\r
   VOID\r
   );\r
 \r
+/**\r
+  Special handler for #DB exception, which will restore the page attributes\r
+  (not-present). It should work with #PF handler which will set pages to\r
+  'present'.\r
+\r
+  @param ExceptionType  Exception type.\r
+  @param SystemContext  Pointer to EFI_SYSTEM_CONTEXT.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+DebugExceptionHandler (\r
+  IN EFI_EXCEPTION_TYPE   ExceptionType,\r
+  IN EFI_SYSTEM_CONTEXT   SystemContext\r
+  );\r
+\r
+/**\r
+  Special handler for #PF exception, which will set the pages which caused\r
+  #PF to be 'present'. The attribute of those pages should be restored in\r
+  the subsequent #DB handler.\r
+\r
+  @param ExceptionType  Exception type.\r
+  @param SystemContext  Pointer to EFI_SYSTEM_CONTEXT.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+PageFaultExceptionHandler (\r
+  IN EFI_EXCEPTION_TYPE   ExceptionType,\r
+  IN EFI_SYSTEM_CONTEXT   SystemContext\r
+  );\r
+\r
+extern BOOLEAN mIsAllocatingPageTable;\r
+extern UINTN   mNumberOfProcessors;\r
+\r
 #endif\r
 \r