mirror of
				https://git.proxmox.com/git/mirror_edk2
				synced 2025-11-04 14:48:56 +00:00 
			
		
		
		
	BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Add base support to handle #VC exceptions. Update the common exception handlers to invoke the VmgExitHandleVc () function of the VmgExitLib library when a #VC is encountered. A non-zero return code will propagate to the targeted exception handler. Under SEV-ES, a DR7 read or write intercept generates a #VC exception. To avoid exception recursion, a #VC exception will not try to read and push the actual debug registers into the EFI_SYSTEM_CONTEXT_X64 struct and instead push zeroes. The #VC exception handler does not make use of the debug registers from the saved context and the exception processing exit code does not attempt to restore the debug register values. Cc: Eric Dong <eric.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
		
			
				
	
	
		
			60 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			INI
		
	
	
	
	
	
			
		
		
	
	
			60 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			INI
		
	
	
	
	
	
## @file
 | 
						|
#  CPU Exception Handler library instance for PEI module.
 | 
						|
#
 | 
						|
#  Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
 | 
						|
#  SPDX-License-Identifier: BSD-2-Clause-Patent
 | 
						|
#
 | 
						|
##
 | 
						|
 | 
						|
[Defines]
 | 
						|
  INF_VERSION                    = 0x00010005
 | 
						|
  BASE_NAME                      = PeiCpuExceptionHandlerLib
 | 
						|
  MODULE_UNI_FILE                = PeiCpuExceptionHandlerLib.uni
 | 
						|
  FILE_GUID                      = 980DDA67-44A6-4897-99E6-275290B71F9E
 | 
						|
  MODULE_TYPE                    = PEIM
 | 
						|
  VERSION_STRING                 = 1.1
 | 
						|
  LIBRARY_CLASS                  = CpuExceptionHandlerLib|PEI_CORE PEIM
 | 
						|
 | 
						|
#
 | 
						|
# The following information is for reference only and not required by the build tools.
 | 
						|
#
 | 
						|
#  VALID_ARCHITECTURES           = IA32 X64
 | 
						|
#
 | 
						|
 | 
						|
[Sources.Ia32]
 | 
						|
  Ia32/ExceptionHandlerAsm.nasm
 | 
						|
  Ia32/ExceptionTssEntryAsm.nasm
 | 
						|
  Ia32/ArchExceptionHandler.c
 | 
						|
  Ia32/ArchInterruptDefs.h
 | 
						|
 | 
						|
[Sources.X64]
 | 
						|
  X64/Xcode5ExceptionHandlerAsm.nasm
 | 
						|
  X64/ArchExceptionHandler.c
 | 
						|
  X64/ArchInterruptDefs.h
 | 
						|
 | 
						|
[Sources.common]
 | 
						|
  CpuExceptionCommon.h
 | 
						|
  CpuExceptionCommon.c
 | 
						|
  PeiCpuException.c
 | 
						|
  PeiDxeSmmCpuException.c
 | 
						|
 | 
						|
[Packages]
 | 
						|
  MdePkg/MdePkg.dec
 | 
						|
  MdeModulePkg/MdeModulePkg.dec
 | 
						|
  UefiCpuPkg/UefiCpuPkg.dec
 | 
						|
 | 
						|
[LibraryClasses]
 | 
						|
  BaseLib
 | 
						|
  SerialPortLib
 | 
						|
  PrintLib
 | 
						|
  LocalApicLib
 | 
						|
  PeCoffGetEntryPointLib
 | 
						|
  HobLib
 | 
						|
  MemoryAllocationLib
 | 
						|
  SynchronizationLib
 | 
						|
  VmgExitLib
 | 
						|
 | 
						|
[Pcd]
 | 
						|
  gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard    # CONSUMES
 | 
						|
 |