# @ValidList 0x80000006 | 0x03058002\r
gEfiMdeModulePkgTokenSpaceGuid.PcdErrorCodeSetVariable|0x03058002|UINT32|0x30001040\r
\r
+ ## Mask to control the NULL address detection in code for different phases.\r
+ # If enabled, accessing NULL address in UEFI or SMM code can be caught.<BR><BR>\r
+ # BIT0 - Enable NULL pointer detection for UEFI.<BR>\r
+ # BIT1 - Enable NULL pointer detection for SMM.<BR>\r
+ # BIT2..6 - Reserved for future uses.<BR>\r
+ # BIT7 - Disable NULL pointer detection just after EndOfDxe. <BR>\r
+ # This is a workaround for those unsolvable NULL access issues in\r
+ # OptionROM, boot loader, etc. It can also help to avoid unnecessary\r
+ # exception caused by legacy memory (0-4095) access after EndOfDxe,\r
+ # such as Windows 7 boot on Qemu.<BR>\r
+ # @Prompt Enable NULL address detection.\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdNullPointerDetectionPropertyMask|0x0|UINT8|0x30001050\r
+\r
[PcdsFixedAtBuild, PcdsPatchableInModule]\r
## Dynamic type PCD can be registered callback function for Pcd setting action.\r
# PcdMaxPeiPcdCallBackNumberPerPcdEntry indicates the maximum number of callback function\r
"enabled on AMD processors supporting the Secure Encrypted Virtualization (SEV) feature.\n"\r
"This mask should be applied when creating 1:1 virtual to physical mapping tables."\r
\r
+#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdNullPointerDetectionPropertyMask_PROMPT #language en-US "Enable NULL pointer detection"\r
+\r
+#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdNullPointerDetectionPropertyMask_HELP #language en-US "Mask to control the NULL address detection in code for different phases.\n"\r
+ " If enabled, accessing NULL address in UEFI or SMM code can be caught.\n\n"\r
+ " BIT0 - Enable NULL pointer detection for UEFI.\n"\r
+ " BIT1 - Enable NULL pointer detection for SMM.\n"\r
+ " BIT2..6 - Reserved for future uses.\n"\r
+ " BIT7 - Disable NULL pointer detection just after EndOfDxe."\r
+ " This is a workaround for those unsolvable NULL access issues in"\r
+ " OptionROM, boot loader, etc. It can also help to avoid unnecessary"\r
+ " exception caused by legacy memory (0-4095) access after EndOfDxe,"\r
+ " such as Windows 7 boot on Qemu.\n"\r
+\r