BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 An SEV-ES guest will generate a #VC exception when it encounters a non-automatic exit (NAE) event. It is expected that the #VC exception handler will communicate with the hypervisor using the GHCB to handle the NAE event. NAE events can occur during the Sec phase, so initialize exception handling early in the OVMF Sec support. Before establishing the exception handling, validate that the supported version of the SEV-ES protocol in OVMF is supported by the hypervisor. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
		
			
				
	
	
		
			76 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			INI
		
	
	
	
	
	
			
		
		
	
	
			76 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			INI
		
	
	
	
	
	
| ## @file
 | |
| #  SEC Driver
 | |
| #
 | |
| #  Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
 | |
| #
 | |
| #  SPDX-License-Identifier: BSD-2-Clause-Patent
 | |
| #
 | |
| ##
 | |
| 
 | |
| [Defines]
 | |
|   INF_VERSION                    = 0x00010005
 | |
|   BASE_NAME                      = SecMain
 | |
|   FILE_GUID                      = df1ccef6-f301-4a63-9661-fc6030dcc880
 | |
|   MODULE_TYPE                    = SEC
 | |
|   VERSION_STRING                 = 1.0
 | |
|   ENTRY_POINT                    = SecMain
 | |
| 
 | |
| #
 | |
| # The following information is for reference only and not required by the build tools.
 | |
| #
 | |
| #  VALID_ARCHITECTURES           = IA32 X64 EBC
 | |
| #
 | |
| 
 | |
| [Sources]
 | |
|   SecMain.c
 | |
| 
 | |
| [Sources.IA32]
 | |
|   Ia32/SecEntry.nasm
 | |
| 
 | |
| [Sources.X64]
 | |
|   X64/SecEntry.nasm
 | |
| 
 | |
| [Packages]
 | |
|   MdePkg/MdePkg.dec
 | |
|   MdeModulePkg/MdeModulePkg.dec
 | |
|   UefiCpuPkg/UefiCpuPkg.dec
 | |
|   OvmfPkg/OvmfPkg.dec
 | |
| 
 | |
| [LibraryClasses]
 | |
|   BaseLib
 | |
|   DebugLib
 | |
|   BaseMemoryLib
 | |
|   PeiServicesLib
 | |
|   PcdLib
 | |
|   UefiCpuLib
 | |
|   DebugAgentLib
 | |
|   IoLib
 | |
|   PeCoffLib
 | |
|   PeCoffGetEntryPointLib
 | |
|   PeCoffExtraActionLib
 | |
|   ExtractGuidedSectionLib
 | |
|   LocalApicLib
 | |
|   CpuExceptionHandlerLib
 | |
| 
 | |
| [Ppis]
 | |
|   gEfiTemporaryRamSupportPpiGuid                # PPI ALWAYS_PRODUCED
 | |
| 
 | |
| [Pcd]
 | |
|   gUefiCpuPkgTokenSpaceGuid.PcdSevEsWorkAreaBase
 | |
|   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfPeiMemFvBase
 | |
|   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfPeiMemFvSize
 | |
|   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDxeMemFvBase
 | |
|   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDxeMemFvSize
 | |
|   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecGhcbBase
 | |
|   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecGhcbSize
 | |
|   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPageTablesBase
 | |
|   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamBase
 | |
|   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamSize
 | |
|   gEfiMdePkgTokenSpaceGuid.PcdGuidedExtractHandlerTableAddress
 | |
|   gUefiOvmfPkgTokenSpaceGuid.PcdGuidedExtractHandlerTableSize
 | |
|   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDecompressionScratchEnd
 | |
|   gEfiMdeModulePkgTokenSpaceGuid.PcdInitValueInTempStack
 | |
| 
 | |
| [FeaturePcd]
 | |
|   gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire
 |