2007-06-13 13:11:23 +02:00
|
|
|
/** @file
|
|
|
|
This file declares Sec Platform Information PPI.
|
|
|
|
|
2015-06-16 04:52:46 +02:00
|
|
|
This service is the primary handoff state into the PEI Foundation.
|
|
|
|
The Security (SEC) component creates the early, transitory memory
|
|
|
|
environment and also encapsulates knowledge of at least the
|
2008-07-16 12:44:37 +02:00
|
|
|
location of the Boot Firmware Volume (BFV).
|
|
|
|
|
2015-06-16 04:52:46 +02:00
|
|
|
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
|
|
|
|
This program and the accompanying materials are licensed and made available under
|
|
|
|
the terms and conditions of the BSD License that accompanies this distribution.
|
2010-03-12 23:19:12 +01:00
|
|
|
The full text of the license may be found at
|
2015-06-16 04:52:46 +02:00
|
|
|
http://opensource.org/licenses/bsd-license.php.
|
2007-06-13 13:11:23 +02:00
|
|
|
|
2015-06-16 04:52:46 +02:00
|
|
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
2007-06-13 13:11:23 +02:00
|
|
|
|
|
|
|
@par Revision Reference:
|
2008-10-28 14:04:40 +01:00
|
|
|
This PPI is introduced in PI Version 1.0.
|
2007-06-13 13:11:23 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
|
|
|
|
#ifndef __SEC_PLATFORM_INFORMATION_PPI_H__
|
|
|
|
#define __SEC_PLATFORM_INFORMATION_PPI_H__
|
|
|
|
|
2015-06-16 04:52:46 +02:00
|
|
|
#include <Pi/PiPeiCis.h>
|
|
|
|
|
2007-06-13 13:11:23 +02:00
|
|
|
#define EFI_SEC_PLATFORM_INFORMATION_GUID \
|
|
|
|
{ \
|
|
|
|
0x6f8c2b35, 0xfef4, 0x448d, {0x82, 0x56, 0xe1, 0x1b, 0x19, 0xd6, 0x10, 0x77 } \
|
|
|
|
}
|
|
|
|
|
|
|
|
typedef struct _EFI_SEC_PLATFORM_INFORMATION_PPI EFI_SEC_PLATFORM_INFORMATION_PPI;
|
|
|
|
|
|
|
|
|
2008-08-14 06:11:35 +02:00
|
|
|
///
|
|
|
|
/// EFI_HEALTH_FLAGS
|
|
|
|
/// Contains information generated by microcode, hardware, and/or the Itanium
|
|
|
|
/// processor PAL code about the state of the processor upon reset.
|
|
|
|
///
|
2007-06-13 13:11:23 +02:00
|
|
|
typedef union {
|
|
|
|
struct {
|
2008-09-23 09:55:57 +02:00
|
|
|
///
|
|
|
|
/// A 2-bit field indicating self-test state after reset.
|
|
|
|
///
|
2007-06-13 13:11:23 +02:00
|
|
|
UINT32 Status : 2;
|
2008-09-23 09:55:57 +02:00
|
|
|
///
|
|
|
|
/// A 1-bit field indicating whether testing has occurred.
|
|
|
|
/// If this field is zero, the processor has not been tested,
|
|
|
|
/// and no further fields in the self-test State parameter are valid.
|
|
|
|
///
|
2007-06-13 13:11:23 +02:00
|
|
|
UINT32 Tested : 1;
|
2008-09-23 09:55:57 +02:00
|
|
|
///
|
|
|
|
/// Reserved 13 bits.
|
|
|
|
///
|
2007-06-13 13:11:23 +02:00
|
|
|
UINT32 Reserved1 :13;
|
2008-09-23 09:55:57 +02:00
|
|
|
///
|
2010-03-12 23:19:12 +01:00
|
|
|
/// A 1-bit field. If set to 1, this indicates that virtual
|
2008-09-23 09:55:57 +02:00
|
|
|
/// memory features are not available.
|
|
|
|
///
|
2007-06-13 13:11:23 +02:00
|
|
|
UINT32 VirtualMemoryUnavailable : 1;
|
2008-09-23 09:55:57 +02:00
|
|
|
///
|
2010-03-12 23:19:12 +01:00
|
|
|
/// A 1-bit field. If set to 1, this indicates that IA-32 execution
|
2008-09-23 09:55:57 +02:00
|
|
|
/// is not available.
|
|
|
|
///
|
2007-06-13 13:11:23 +02:00
|
|
|
UINT32 Ia32ExecutionUnavailable : 1;
|
2008-09-23 09:55:57 +02:00
|
|
|
///
|
2010-03-12 23:19:12 +01:00
|
|
|
/// A 1-bit field. If set to 1, this indicates that the floating
|
2008-09-23 09:55:57 +02:00
|
|
|
/// point unit is not available.
|
|
|
|
///
|
2007-06-13 13:11:23 +02:00
|
|
|
UINT32 FloatingPointUnavailable : 1;
|
2008-09-23 09:55:57 +02:00
|
|
|
///
|
2010-03-12 23:19:12 +01:00
|
|
|
/// A 1-bit field. If set to 1, this indicates miscellaneous
|
2008-09-23 09:55:57 +02:00
|
|
|
/// functional failure other than vm, ia, or fp.
|
|
|
|
/// The test status field provides additional information on
|
|
|
|
/// test failures when the State field returns a value of
|
|
|
|
/// performance restricted or functionally restricted.
|
|
|
|
/// The value returned is implementation dependent.
|
|
|
|
///
|
2007-06-13 13:11:23 +02:00
|
|
|
UINT32 MiscFeaturesUnavailable : 1;
|
2008-09-23 09:55:57 +02:00
|
|
|
///
|
|
|
|
/// Reserved 12 bits.
|
|
|
|
///
|
2007-06-13 13:11:23 +02:00
|
|
|
UINT32 Reserved2 :12;
|
|
|
|
} Bits;
|
|
|
|
UINT32 Uint32;
|
|
|
|
} EFI_HEALTH_FLAGS;
|
|
|
|
|
2007-10-11 20:02:59 +02:00
|
|
|
#define NORMAL_BOOT_CALL 0x0
|
|
|
|
#define RECOVERY_CHECK_CALL 0x3
|
|
|
|
|
2010-02-27 16:37:52 +01:00
|
|
|
typedef EFI_HEALTH_FLAGS X64_HANDOFF_STATUS;
|
|
|
|
typedef EFI_HEALTH_FLAGS IA32_HANDOFF_STATUS;
|
|
|
|
///
|
|
|
|
/// The hand-off status structure for Itanium architecture.
|
|
|
|
///
|
2007-10-11 20:02:59 +02:00
|
|
|
typedef struct {
|
2010-02-27 16:37:52 +01:00
|
|
|
///
|
|
|
|
/// SALE_ENTRY state : 3 = Recovery_Check
|
|
|
|
/// and 0 = RESET or Normal_Boot phase.
|
|
|
|
///
|
2007-10-11 20:02:59 +02:00
|
|
|
UINT8 BootPhase;
|
2010-02-27 16:37:52 +01:00
|
|
|
///
|
|
|
|
/// Firmware status on entry to SALE.
|
|
|
|
///
|
2007-10-11 20:02:59 +02:00
|
|
|
UINT8 FWStatus;
|
|
|
|
UINT16 Reserved1;
|
|
|
|
UINT32 Reserved2;
|
2010-02-27 16:37:52 +01:00
|
|
|
///
|
|
|
|
/// Geographically significant unique processor ID assigned by PAL.
|
|
|
|
///
|
2007-10-11 20:02:59 +02:00
|
|
|
UINT16 ProcId;
|
|
|
|
UINT16 Reserved3;
|
|
|
|
UINT8 IdMask;
|
|
|
|
UINT8 EidMask;
|
|
|
|
UINT16 Reserved4;
|
2010-02-27 16:37:52 +01:00
|
|
|
///
|
2010-03-12 23:19:12 +01:00
|
|
|
/// Address to make PAL calls.
|
2010-02-27 16:37:52 +01:00
|
|
|
///
|
2007-10-11 20:02:59 +02:00
|
|
|
UINT64 PalCallAddress;
|
2010-02-27 16:37:52 +01:00
|
|
|
///
|
|
|
|
/// 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.
|
|
|
|
///
|
2007-10-11 20:02:59 +02:00
|
|
|
UINT64 PalSpecialAddress;
|
2010-02-27 16:37:52 +01:00
|
|
|
///
|
2010-03-12 23:19:12 +01:00
|
|
|
/// GR35 from PALE_EXIT state.
|
2010-02-27 16:37:52 +01:00
|
|
|
///
|
2007-10-11 20:02:59 +02:00
|
|
|
UINT64 SelfTestStatus;
|
2010-02-27 16:37:52 +01:00
|
|
|
///
|
|
|
|
/// GR37 from PALE_EXIT state.
|
|
|
|
///
|
2007-10-11 20:02:59 +02:00
|
|
|
UINT64 SelfTestControl;
|
|
|
|
UINT64 MemoryBufferRequired;
|
2010-02-27 16:37:52 +01:00
|
|
|
} ITANIUM_HANDOFF_STATUS;
|
2007-10-11 20:02:59 +02:00
|
|
|
|
2008-09-23 09:55:57 +02:00
|
|
|
///
|
2010-03-12 23:19:12 +01:00
|
|
|
/// EFI_SEC_PLATFORM_INFORMATION_RECORD.
|
2008-09-23 09:55:57 +02:00
|
|
|
///
|
2010-02-27 16:37:52 +01:00
|
|
|
typedef union {
|
|
|
|
IA32_HANDOFF_STATUS IA32HealthFlags;
|
|
|
|
X64_HANDOFF_STATUS x64HealthFlags;
|
|
|
|
ITANIUM_HANDOFF_STATUS ItaniumHealthFlags;
|
2007-06-13 13:11:23 +02:00
|
|
|
} EFI_SEC_PLATFORM_INFORMATION_RECORD;
|
|
|
|
|
|
|
|
/**
|
|
|
|
This interface conveys state information out of the Security (SEC) phase into PEI.
|
|
|
|
|
2008-09-23 09:55:57 +02:00
|
|
|
This service is published by the SEC phase. The SEC phase handoff has an optional
|
|
|
|
EFI_PEI_PPI_DESCRIPTOR list as its final argument when control is passed from SEC into the
|
|
|
|
PEI Foundation. As such, if the platform supports the built-in self test (BIST) on IA-32 Intel
|
|
|
|
architecture or the PAL-A handoff state for Itanium architecture, this information is encapsulated
|
|
|
|
into the data structure abstracted by this service. This information is collected for the boot-strap
|
2010-03-12 23:19:12 +01:00
|
|
|
processor (BSP) on IA-32. For Itanium architecture, it is available on all processors that execute
|
2008-09-23 09:55:57 +02:00
|
|
|
the PEI Foundation.
|
|
|
|
|
2010-03-12 23:19:12 +01:00
|
|
|
@param PeiServices The pointer to the PEI Services Table.
|
|
|
|
@param StructureSize The pointer to the variable describing size of the input buffer.
|
|
|
|
@param PlatformInformationRecord The pointer to the EFI_SEC_PLATFORM_INFORMATION_RECORD.
|
2007-06-13 13:11:23 +02:00
|
|
|
|
2008-09-23 09:55:57 +02:00
|
|
|
@retval EFI_SUCCESS The data was successfully returned.
|
2010-02-27 16:37:52 +01:00
|
|
|
@retval EFI_BUFFER_TOO_SMALL The buffer was too small. The current buffer size needed to
|
|
|
|
hold the record is returned in StructureSize.
|
2007-06-13 13:11:23 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-06-24 09:14:18 +02:00
|
|
|
(EFIAPI *EFI_SEC_PLATFORM_INFORMATION)(
|
2007-06-18 22:28:02 +02:00
|
|
|
IN CONST EFI_PEI_SERVICES **PeiServices,
|
|
|
|
IN OUT UINT64 *StructureSize,
|
|
|
|
OUT EFI_SEC_PLATFORM_INFORMATION_RECORD *PlatformInformationRecord
|
2007-06-13 13:11:23 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
|
2008-09-23 09:55:57 +02:00
|
|
|
///
|
2015-06-16 04:52:46 +02:00
|
|
|
/// This service abstracts platform-specific information. It is necessary
|
|
|
|
/// to convey this information to the PEI Foundation so that it can
|
2008-09-23 09:55:57 +02:00
|
|
|
/// discover where to begin dispatching PEIMs.
|
|
|
|
///
|
2007-06-13 13:11:23 +02:00
|
|
|
struct _EFI_SEC_PLATFORM_INFORMATION_PPI {
|
|
|
|
EFI_SEC_PLATFORM_INFORMATION PlatformInformation;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
extern EFI_GUID gEfiSecPlatformInformationPpiGuid;
|
|
|
|
|
|
|
|
#endif
|