MdeModulePkg/MdeModulePkg.dec: add new settings for PCDs

The change is part of requirement tracked by #BZ1095

    https://bugzilla.tianocore.org/show_bug.cgi?id=1095

Background:
Heap Guard and NULL Pointer Detection are very useful features to detect
code flaw in EDK II. If an issue is detected, #PF exception will be
triggered and the BIOS will enter into dead loop, which is the default
behavior of exception handling. From QA perspective, this default behavior
will block them to collect all tests result in reasonable time.

The solution is to introduce non-stop mode to Heap Guard and NULL Pointer
Detection features. This needs to update CpuDxe, PiSmmCpuDxeSmm and
CpuExceptionHandlerLib to allow the code to continue execution after #PF.
The mechanism behind it is the same as SMM Profile feature, in which a
special #PF handler is registered to set the page causing #PF to be
'present' and setup single steop trap, then return the control back to
the instruction accessing that page. Once the instruction is re-executed,
a #DB is triggered and a special handler for it will be called to reset
the page back to 'not-present'.

The non-stop mode is controlled by BIT6 of following PCDs

  gEfiMdeModulePkgTokenSpaceGuid.PcdHeapGuardPropertyMask
  gEfiMdeModulePkgTokenSpaceGuid.PcdNullPointerDetectionPropertyMask

BIT6 of PcdHeapGuardPropertyMask is used to enable/disable non-stop mode
of Heap Guard feature. It applies to both UEFI and SMM heap guard, if
any of them is enabled.

BIT6 of PcdNullPointerDetectionPropertyMask is used to enable/disable
non-stop mode of NULL Pointer Detection feature. It applies to both
UEFI and SMM NULL Pointer Detection, if any of them is enabled.

The default setting is 'disable', meaning the boot will stop at #PF
exception.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
1 file changed
tree: 187199bfd88971255ff4dba5ee3251341d730472
  1. AppPkg/
  2. ArmPkg/
  3. ArmPlatformPkg/
  4. ArmVirtPkg/
  5. BaseTools/
  6. BeagleBoardPkg/
  7. Conf/
  8. CorebootModulePkg/
  9. CorebootPayloadPkg/
  10. CryptoPkg/
  11. DuetPkg/
  12. EdkCompatibilityPkg/
  13. EdkShellBinPkg/
  14. EdkShellPkg/
  15. EmbeddedPkg/
  16. EmulatorPkg/
  17. FatBinPkg/
  18. FatPkg/
  19. FmpDevicePkg/
  20. IntelFrameworkModulePkg/
  21. IntelFrameworkPkg/
  22. IntelFsp2Pkg/
  23. IntelFsp2WrapperPkg/
  24. IntelFspPkg/
  25. IntelFspWrapperPkg/
  26. IntelSiliconPkg/
  27. MdeModulePkg/
  28. MdePkg/
  29. NetworkPkg/
  30. Nt32Pkg/
  31. Omap35xxPkg/
  32. OptionRomPkg/
  33. OvmfPkg/
  34. PcAtChipsetPkg/
  35. QuarkPlatformPkg/
  36. QuarkSocPkg/
  37. SecurityPkg/
  38. ShellBinPkg/
  39. ShellPkg/
  40. SignedCapsulePkg/
  41. SourceLevelDebugPkg/
  42. StandaloneMmPkg/
  43. StdLib/
  44. StdLibPrivateInternalFiles/
  45. UefiCpuPkg/
  46. UnixPkg/
  47. Vlv2DeviceRefCodePkg/
  48. Vlv2TbltDevicePkg/
  49. .gitignore
  50. .gitmodules
  51. BuildNotes2.txt
  52. Contributions.txt
  53. edksetup.bat
  54. edksetup.sh
  55. License.txt
  56. Maintainers.txt
  57. Readme.md
Readme.md

EDK II Project

A modern, feature-rich, cross-platform firmware development environment for the UEFI and PI specifications from www.uefi.org.

Contributions to the EDK II open source project are covered by the TianoCore Contribution Agreement 1.1

The majority of the content in the EDK II open source project uses a BSD 2-Clause License. The EDK II open source project contains the following components that are covered by additional licenses:

The EDK II Project is composed of packages. The maintainers for each package are listed in Maintainers.txt.

Resources