]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/CpuDxe/CpuDxe.h
UefiCpuPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / UefiCpuPkg / CpuDxe / CpuDxe.h
index 540f5f2dbf0fe4e8a4671c3e77d183f5ef281429..b029be430b4c5ea1497dcf8a3b1ec9cd152d3856 100644 (file)
@@ -2,13 +2,7 @@
   CPU DXE Module to produce CPU ARCH Protocol and CPU MP Protocol.\r
 \r
   Copyright (c) 2008 - 2017, Intel Corporation. All rights reserved.<BR>\r
-  This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
                                        EFI_MEMORY_RO    \\r
                                        )\r
 \r
+#define HEAP_GUARD_NONSTOP_MODE       \\r
+        ((PcdGet8 (PcdHeapGuardPropertyMask) & (BIT6|BIT4|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
@@ -273,7 +273,40 @@ RefreshGcdMemoryAttributesFromPaging (
   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