audk/MdeModulePkg
Jian J Wang 8f2613628a 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>
2018-08-30 07:22:29 +08:00
..
Application MdeModulePkg UiApp: Remove a redundant function and a variable 2018-08-21 16:29:11 +08:00
Bus MdeModulePkg/PciBus: Restrict one VGA per HostBridge not Segment 2018-08-27 09:40:22 +08:00
Core MdeModulePkg/PiSmmCore: Check valid memory range. 2018-08-28 10:24:25 +08:00
Include MdeModulePkg/PlatformBootManager: Add PlatformBootManagerUnableToBoot 2018-07-27 15:47:50 +08:00
Library MdeModulePkg/SmmCorePerfLib: Add DxeServicesLib library class in INF 2018-08-22 10:29:28 +08:00
Logo MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
Universal MdeModulePkg SetupBrowserDxe: Remove a redundant function 2018-08-21 16:29:11 +08:00
MdeModulePkg.dec MdeModulePkg/MdeModulePkg.dec: add new settings for PCDs 2018-08-30 07:22:29 +08:00
MdeModulePkg.dsc MdeModulePkg: Remove DxeSmmPerformanceLib 2018-08-06 13:58:54 +08:00
MdeModulePkg.uni MdeModulePkg/Variable/RuntimeDxe: introduce PcdMaxVolatileVariableSize 2018-03-30 21:17:07 +02:00
MdeModulePkgExtra.uni MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00