From f7e077768fe47075130bfa774c88c331d2ad54ff Mon Sep 17 00:00:00 2001 From: "Wang, Jian J" Date: Sat, 26 Aug 2017 09:08:10 +0800 Subject: MdeModulePkg/MdeModulePkg.dec,.uni: Add NULL pointer detection PCD PCD PcdNullPointerDetectionPropertyMask is a bitmask used to control the NULL address detection functionality in code for different phases. If enabled, accessing NULL address in UEFI or SMM code can be caught as a page fault exception. BIT0 - Enable NULL pointer detection for UEFI. BIT1 - Enable NULL pointer detection for SMM. BIT2..6 - Reserved for future uses. BIT7 - Disable NULL pointer detection just after EndOfDxe. This is a workaround for those unsolvable NULL access issues in OptionROM, boot loader, etc. It can also help to avoid unnecessary exception caused by legacy memory (0-4095) access after EndOfDxe, such as Windows 7 boot on Qemu. Cc: Star Zeng Cc: Eric Dong Cc: Jiewen Yao Cc: Michael Kinney Cc: Ayellet Wolman Suggested-by: Ayellet Wolman Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang Reviewed-by: Star Zeng Reviewed-by: Jiewen Yao --- MdeModulePkg/MdeModulePkg.uni | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'MdeModulePkg/MdeModulePkg.uni') diff --git a/MdeModulePkg/MdeModulePkg.uni b/MdeModulePkg/MdeModulePkg.uni index d6015de75f..f8b31694ba 100644 --- a/MdeModulePkg/MdeModulePkg.uni +++ b/MdeModulePkg/MdeModulePkg.uni @@ -1127,3 +1127,16 @@ "enabled on AMD processors supporting the Secure Encrypted Virtualization (SEV) feature.\n" "This mask should be applied when creating 1:1 virtual to physical mapping tables." +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdNullPointerDetectionPropertyMask_PROMPT #language en-US "Enable NULL pointer detection" + +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdNullPointerDetectionPropertyMask_HELP #language en-US "Mask to control the NULL address detection in code for different phases.\n" + " If enabled, accessing NULL address in UEFI or SMM code can be caught.\n\n" + " BIT0 - Enable NULL pointer detection for UEFI.\n" + " BIT1 - Enable NULL pointer detection for SMM.\n" + " BIT2..6 - Reserved for future uses.\n" + " BIT7 - Disable NULL pointer detection just after EndOfDxe." + " This is a workaround for those unsolvable NULL access issues in" + " OptionROM, boot loader, etc. It can also help to avoid unnecessary" + " exception caused by legacy memory (0-4095) access after EndOfDxe," + " such as Windows 7 boot on Qemu.\n" + -- cgit v1.2.3