From: xli24 Date: Sat, 27 Feb 2010 15:37:52 +0000 (+0000) Subject: Update SEC Platform Information PPI according to PI 1.2 errata A. X-Git-Tag: edk2-stable201903~16218 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=53f32495953afac85b4c85c52dcf0595a4b1999e Update SEC Platform Information PPI according to PI 1.2 errata A. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10118 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/MdePkg/Include/Ppi/SecPlatformInformation.h b/MdePkg/Include/Ppi/SecPlatformInformation.h index 46d845f6d6..78d41c161d 100644 --- a/MdePkg/Include/Ppi/SecPlatformInformation.h +++ b/MdePkg/Include/Ppi/SecPlatformInformation.h @@ -6,7 +6,7 @@ environment and also encapsulates knowledge of at least the location of the Boot Firmware Volume (BFV). - Copyright (c) 2006 - 2008, Intel Corporation + Copyright (c) 2006 - 2010, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -87,40 +87,61 @@ typedef union { #define NORMAL_BOOT_CALL 0x0 #define RECOVERY_CHECK_CALL 0x3 +typedef EFI_HEALTH_FLAGS X64_HANDOFF_STATUS; +typedef EFI_HEALTH_FLAGS IA32_HANDOFF_STATUS; +/// +/// The hand-off status structure for Itanium architecture. +/// typedef struct { + /// + /// SALE_ENTRY state : 3 = Recovery_Check + /// and 0 = RESET or Normal_Boot phase. + /// UINT8 BootPhase; + /// + /// Firmware status on entry to SALE. + /// UINT8 FWStatus; UINT16 Reserved1; UINT32 Reserved2; - + /// + /// Geographically significant unique processor ID assigned by PAL. + /// UINT16 ProcId; UINT16 Reserved3; UINT8 IdMask; UINT8 EidMask; UINT16 Reserved4; - + /// + /// Address to make PAL calls + /// UINT64 PalCallAddress; + /// + /// If the entry state is RECOVERY_CHECK, this contains the PAL_RESET + /// return address, and if entry state is RESET, this contains + /// address for PAL_authentication call. + /// UINT64 PalSpecialAddress; + /// + /// GR35 from PALE_EXIT state + /// UINT64 SelfTestStatus; + /// + /// GR37 from PALE_EXIT state. + /// UINT64 SelfTestControl; UINT64 MemoryBufferRequired; - -} IPF_HANDOFF_STATUS; +} ITANIUM_HANDOFF_STATUS; /// /// EFI_SEC_PLATFORM_INFORMATION_RECORD /// -typedef struct { - /// - /// Contains information generated by microcode, hardware, - /// and/or the Itanium processor PAL code about the state - /// of the processor upon reset. - /// - EFI_HEALTH_FLAGS HealthFlags; +typedef union { + IA32_HANDOFF_STATUS IA32HealthFlags; + X64_HANDOFF_STATUS x64HealthFlags; + ITANIUM_HANDOFF_STATUS ItaniumHealthFlags; } EFI_SEC_PLATFORM_INFORMATION_RECORD; - - /** This interface conveys state information out of the Security (SEC) phase into PEI. @@ -137,7 +158,8 @@ typedef struct { @param PlatformInformationRecord Pointer to the EFI_SEC_PLATFORM_INFORMATION_RECORD. @retval EFI_SUCCESS The data was successfully returned. - @retval EFI_BUFFER_TOO_SMALL The buffer was too small. + @retval EFI_BUFFER_TOO_SMALL The buffer was too small. The current buffer size needed to + hold the record is returned in StructureSize. **/ typedef diff --git a/MdePkg/Library/PeiPalLib/PeiPalLib.c b/MdePkg/Library/PeiPalLib/PeiPalLib.c index d0d9b3ddd3..f47ed35b9b 100644 --- a/MdePkg/Library/PeiPalLib/PeiPalLib.c +++ b/MdePkg/Library/PeiPalLib/PeiPalLib.c @@ -1,7 +1,7 @@ /** @file PAL Call Services Function. - Copyright (c) 2006 - 2008, Intel Corporation
+ Copyright (c) 2006 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -57,13 +57,13 @@ PalCall ( IN UINT64 Arg4 ) { - UINT64 PalCallAddress; - PAL_CALL_RETURN ReturnVal; - CONST EFI_PEI_SERVICES **PeiServices; - EFI_STATUS Status; - EFI_SEC_PLATFORM_INFORMATION_PPI *SecPlatformPpi; - IPF_HANDOFF_STATUS IpfStatus; - UINT64 RecordSize; + UINT64 PalCallAddress; + PAL_CALL_RETURN ReturnVal; + CONST EFI_PEI_SERVICES **PeiServices; + EFI_STATUS Status; + EFI_SEC_PLATFORM_INFORMATION_PPI *SecPlatformPpi; + EFI_SEC_PLATFORM_INFORMATION_RECORD SecPlatformInfoRecord; + UINT64 RecordSize; // // Get PEI Service Table Pointer @@ -84,13 +84,13 @@ PalCall ( // // Retrieve PAL call address from platform information reported by the PPI // - RecordSize = sizeof (IpfStatus); + RecordSize = sizeof (SecPlatformInfoRecord); SecPlatformPpi->PlatformInformation ( PeiServices, &RecordSize, - (EFI_SEC_PLATFORM_INFORMATION_RECORD *) &IpfStatus + &SecPlatformInfoRecord ); - PalCallAddress = IpfStatus.PalCallAddress; + PalCallAddress = SecPlatformInfoRecord.ItaniumHealthFlags.PalCallAddress; ReturnVal = AsmPalCall (PalCallAddress, Index, Arg2, Arg3, Arg4);