]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Update SEC Platform Information PPI according to PI 1.2 errata A.
authorxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>
Sat, 27 Feb 2010 15:37:52 +0000 (15:37 +0000)
committerxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>
Sat, 27 Feb 2010 15:37:52 +0000 (15:37 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10118 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Include/Ppi/SecPlatformInformation.h
MdePkg/Library/PeiPalLib/PeiPalLib.c

index 46d845f6d6affa515ab078dc814dae504a73ee70..78d41c161d5e16d1ebb2444d2397bf2c70fbc18e 100644 (file)
@@ -6,7 +6,7 @@
   environment and also encapsulates knowledge of at least the \r
   location of the Boot Firmware Volume (BFV).\r
 \r
   environment and also encapsulates knowledge of at least the \r
   location of the Boot Firmware Volume (BFV).\r
 \r
-  Copyright (c) 2006 - 2008, Intel Corporation                                                         \r
+  Copyright (c) 2006 - 2010, Intel Corporation                                                         \r
   All rights reserved. This program and the accompanying materials                          \r
   are licensed and made available under the terms and conditions of the BSD License         \r
   which accompanies this distribution.  The full text of the license may be found at        \r
   All rights reserved. This program and the accompanying materials                          \r
   are licensed and made available under the terms and conditions of the BSD License         \r
   which accompanies this distribution.  The full text of the license may be found at        \r
@@ -87,40 +87,61 @@ typedef union {
 #define NORMAL_BOOT_CALL    0x0\r
 #define RECOVERY_CHECK_CALL 0x3\r
 \r
 #define NORMAL_BOOT_CALL    0x0\r
 #define RECOVERY_CHECK_CALL 0x3\r
 \r
+typedef EFI_HEALTH_FLAGS X64_HANDOFF_STATUS;\r
+typedef EFI_HEALTH_FLAGS IA32_HANDOFF_STATUS;\r
+///\r
+/// The hand-off status structure for Itanium architecture.\r
+///\r
 typedef struct {\r
 typedef struct {\r
+  ///\r
+  /// SALE_ENTRY state : 3 = Recovery_Check\r
+  /// and 0 = RESET or Normal_Boot phase.\r
+  ///\r
   UINT8 BootPhase;\r
   UINT8 BootPhase;\r
+  ///\r
+  /// Firmware status on entry to SALE.\r
+  ///\r
   UINT8 FWStatus;\r
   UINT16 Reserved1;\r
   UINT32 Reserved2;\r
   UINT8 FWStatus;\r
   UINT16 Reserved1;\r
   UINT32 Reserved2;\r
-\r
+  ///\r
+  /// Geographically significant unique processor ID assigned by PAL.\r
+  ///\r
   UINT16 ProcId;\r
   UINT16 Reserved3;\r
   UINT8  IdMask;\r
   UINT8  EidMask;\r
   UINT16 Reserved4;\r
   UINT16 ProcId;\r
   UINT16 Reserved3;\r
   UINT8  IdMask;\r
   UINT8  EidMask;\r
   UINT16 Reserved4;\r
-\r
+  ///\r
+  /// Address to make PAL calls\r
+  ///\r
   UINT64 PalCallAddress;\r
   UINT64 PalCallAddress;\r
+  ///\r
+  /// If the entry state is RECOVERY_CHECK, this contains the PAL_RESET\r
+  /// return address, and if entry state is RESET, this contains\r
+  /// address for PAL_authentication call.\r
+  ///\r
   UINT64 PalSpecialAddress;\r
   UINT64 PalSpecialAddress;\r
+  ///\r
+  /// GR35 from PALE_EXIT state\r
+  ///\r
   UINT64 SelfTestStatus;\r
   UINT64 SelfTestStatus;\r
+  ///\r
+  /// GR37 from PALE_EXIT state.\r
+  ///\r
   UINT64 SelfTestControl;\r
   UINT64 MemoryBufferRequired;\r
   UINT64 SelfTestControl;\r
   UINT64 MemoryBufferRequired;\r
-\r
-} IPF_HANDOFF_STATUS;\r
+} ITANIUM_HANDOFF_STATUS;\r
 \r
 ///\r
 /// EFI_SEC_PLATFORM_INFORMATION_RECORD\r
 ///\r
 \r
 ///\r
 /// EFI_SEC_PLATFORM_INFORMATION_RECORD\r
 ///\r
-typedef struct {\r
-  ///\r
-  /// Contains information generated by microcode, hardware,\r
-  /// and/or the Itanium processor PAL code about the state\r
-  /// of the processor upon reset.\r
-  ///\r
-  EFI_HEALTH_FLAGS HealthFlags;\r
+typedef union {\r
+  IA32_HANDOFF_STATUS    IA32HealthFlags;\r
+  X64_HANDOFF_STATUS     x64HealthFlags;\r
+  ITANIUM_HANDOFF_STATUS ItaniumHealthFlags;\r
 } EFI_SEC_PLATFORM_INFORMATION_RECORD;\r
 \r
 } EFI_SEC_PLATFORM_INFORMATION_RECORD;\r
 \r
-\r
-\r
 /**\r
   This interface conveys state information out of the Security (SEC) phase into PEI.\r
 \r
 /**\r
   This interface conveys state information out of the Security (SEC) phase into PEI.\r
 \r
@@ -137,7 +158,8 @@ typedef struct {
   @param  PlatformInformationRecord Pointer to the EFI_SEC_PLATFORM_INFORMATION_RECORD.\r
 \r
   @retval EFI_SUCCESS               The data was successfully returned.\r
   @param  PlatformInformationRecord Pointer to the EFI_SEC_PLATFORM_INFORMATION_RECORD.\r
 \r
   @retval EFI_SUCCESS               The data was successfully returned.\r
-  @retval EFI_BUFFER_TOO_SMALL      The buffer was too small.\r
+  @retval EFI_BUFFER_TOO_SMALL      The buffer was too small. The current buffer size needed to\r
+                                    hold the record is returned in StructureSize.\r
 \r
 **/\r
 typedef\r
 \r
 **/\r
 typedef\r
index d0d9b3ddd3b212921803008ab2ba0e7e0c73bf81..f47ed35b9bd62bdce417048ca231263836aba1cd 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   PAL Call Services Function.\r
 \r
 /** @file\r
   PAL Call Services Function.\r
 \r
-  Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2010, Intel Corporation<BR>\r
   All rights reserved. This program and the accompanying materials                          \r
   are licensed and made available under the terms and conditions of the BSD License         \r
   which accompanies this distribution.  The full text of the license may be found at        \r
   All rights reserved. This program and the accompanying materials                          \r
   are licensed and made available under the terms and conditions of the BSD License         \r
   which accompanies this distribution.  The full text of the license may be found at        \r
@@ -57,13 +57,13 @@ PalCall (
   IN UINT64                  Arg4\r
   )\r
 {\r
   IN UINT64                  Arg4\r
   )\r
 {\r
-  UINT64                            PalCallAddress;\r
-  PAL_CALL_RETURN                   ReturnVal;\r
-  CONST EFI_PEI_SERVICES            **PeiServices;\r
-  EFI_STATUS                        Status;\r
-  EFI_SEC_PLATFORM_INFORMATION_PPI  *SecPlatformPpi;\r
-  IPF_HANDOFF_STATUS                IpfStatus;\r
-  UINT64                            RecordSize;\r
+  UINT64                              PalCallAddress;\r
+  PAL_CALL_RETURN                     ReturnVal;\r
+  CONST EFI_PEI_SERVICES              **PeiServices;\r
+  EFI_STATUS                          Status;\r
+  EFI_SEC_PLATFORM_INFORMATION_PPI    *SecPlatformPpi;\r
+  EFI_SEC_PLATFORM_INFORMATION_RECORD SecPlatformInfoRecord;\r
+  UINT64                              RecordSize;\r
 \r
   //\r
   // Get PEI Service Table Pointer\r
 \r
   //\r
   // Get PEI Service Table Pointer\r
@@ -84,13 +84,13 @@ PalCall (
   //\r
   // Retrieve PAL call address from platform information reported by the PPI\r
   //\r
   //\r
   // Retrieve PAL call address from platform information reported by the PPI\r
   //\r
-  RecordSize = sizeof (IpfStatus);\r
+  RecordSize = sizeof (SecPlatformInfoRecord);\r
   SecPlatformPpi->PlatformInformation (\r
                     PeiServices,\r
                     &RecordSize,\r
   SecPlatformPpi->PlatformInformation (\r
                     PeiServices,\r
                     &RecordSize,\r
-                    (EFI_SEC_PLATFORM_INFORMATION_RECORD *) &IpfStatus\r
+                    &SecPlatformInfoRecord\r
                     );\r
                     );\r
-  PalCallAddress = IpfStatus.PalCallAddress;\r
+  PalCallAddress = SecPlatformInfoRecord.ItaniumHealthFlags.PalCallAddress;\r
 \r
   ReturnVal = AsmPalCall (PalCallAddress, Index, Arg2, Arg3, Arg4);\r
 \r
 \r
   ReturnVal = AsmPalCall (PalCallAddress, Index, Arg2, Arg3, Arg4);\r
 \r