2007-06-08 13:31:52 +02:00
|
|
|
/** @file
|
|
|
|
Include file matches things in PI for multiple module types.
|
|
|
|
|
2018-06-27 15:11:33 +02:00
|
|
|
Copyright (c) 2006 - 2018, 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
|
2018-06-27 15:11:33 +02:00
|
|
|
http://opensource.org/licenses/bsd-license.php.
|
2007-06-08 13:31:52 +02:00
|
|
|
|
2018-06-27 15:11:33 +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-08 13:31:52 +02:00
|
|
|
|
|
|
|
@par Revision Reference:
|
2010-03-12 23:19:12 +01:00
|
|
|
These elements are defined in UEFI Platform Initialization Specification 1.2.
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
|
|
|
|
#ifndef __PI_MULTIPHASE_H__
|
|
|
|
#define __PI_MULTIPHASE_H__
|
|
|
|
|
|
|
|
#include <Pi/PiFirmwareVolume.h>
|
|
|
|
#include <Pi/PiFirmwareFile.h>
|
|
|
|
#include <Pi/PiBootMode.h>
|
|
|
|
#include <Pi/PiHob.h>
|
|
|
|
#include <Pi/PiDependency.h>
|
2009-05-18 11:13:49 +02:00
|
|
|
#include <Pi/PiStatusCode.h>
|
2009-11-26 06:24:31 +01:00
|
|
|
#include <Pi/PiS3BootScript.h>
|
2007-07-04 11:04:40 +02:00
|
|
|
|
2009-07-24 05:26:30 +02:00
|
|
|
/**
|
|
|
|
Produces an error code in the range reserved for use by the Platform Initialization
|
|
|
|
Architecture Specification.
|
|
|
|
|
2018-06-27 15:11:33 +02:00
|
|
|
The supported 32-bit range is 0xA0000000-0xBFFFFFFF
|
|
|
|
The supported 64-bit range is 0xA000000000000000-0xBFFFFFFFFFFFFFFF
|
2009-07-24 05:26:30 +02:00
|
|
|
|
2018-06-27 15:11:33 +02:00
|
|
|
@param StatusCode The status code value to convert into a warning code.
|
2009-07-24 05:26:30 +02:00
|
|
|
StatusCode must be in the range 0x00000000..0x1FFFFFFF.
|
|
|
|
|
|
|
|
@return The value specified by StatusCode in the PI reserved range.
|
|
|
|
|
|
|
|
**/
|
|
|
|
#define DXE_ERROR(StatusCode) (MAX_BIT | (MAX_BIT >> 2) | StatusCode)
|
|
|
|
|
|
|
|
///
|
|
|
|
/// If this value is returned by an EFI image, then the image should be unloaded.
|
|
|
|
///
|
|
|
|
#define EFI_REQUEST_UNLOAD_IMAGE DXE_ERROR (1)
|
|
|
|
|
|
|
|
///
|
2018-06-27 15:11:33 +02:00
|
|
|
/// If this value is returned by an API, it means the capability is not yet
|
2009-07-24 05:26:30 +02:00
|
|
|
/// installed/available/ready to use.
|
|
|
|
///
|
|
|
|
#define EFI_NOT_AVAILABLE_YET DXE_ERROR (2)
|
|
|
|
|
2009-09-01 04:47:57 +02:00
|
|
|
///
|
2010-03-12 23:19:12 +01:00
|
|
|
/// Success and warning codes reserved for use by PI.
|
|
|
|
/// Supported 32-bit range is 0x20000000-0x3fffffff.
|
|
|
|
/// Supported 64-bit range is 0x2000000000000000-0x3fffffffffffffff.
|
2009-09-01 04:47:57 +02:00
|
|
|
///
|
|
|
|
#define PI_ENCODE_WARNING(a) ((MAX_BIT >> 2) | (a))
|
|
|
|
|
|
|
|
///
|
2010-03-12 23:19:12 +01:00
|
|
|
/// Error codes reserved for use by PI.
|
|
|
|
/// Supported 32-bit range is 0xa0000000-0xbfffffff.
|
|
|
|
/// Supported 64-bit range is 0xa000000000000000-0xbfffffffffffffff.
|
2009-09-01 04:47:57 +02:00
|
|
|
///
|
|
|
|
#define PI_ENCODE_ERROR(a) (MAX_BIT | (MAX_BIT >> 2) | (a))
|
|
|
|
|
2018-06-27 15:11:33 +02:00
|
|
|
///
|
2010-03-12 23:19:12 +01:00
|
|
|
/// Return status codes defined in SMM CIS.
|
2018-06-27 15:11:33 +02:00
|
|
|
///
|
2009-09-01 04:47:57 +02:00
|
|
|
#define EFI_INTERRUPT_PENDING PI_ENCODE_ERROR (0)
|
|
|
|
|
|
|
|
#define EFI_WARN_INTERRUPT_SOURCE_PENDING PI_ENCODE_WARNING (0)
|
|
|
|
#define EFI_WARN_INTERRUPT_SOURCE_QUIESCED PI_ENCODE_WARNING (1)
|
|
|
|
|
2009-07-24 05:26:30 +02:00
|
|
|
///
|
|
|
|
/// Bitmask of values for Authentication Status.
|
2018-06-27 15:11:33 +02:00
|
|
|
/// Authentication Status is returned from EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL
|
2009-07-24 05:26:30 +02:00
|
|
|
/// and the EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI
|
|
|
|
///
|
|
|
|
/// xx00 Image was not signed.
|
2010-03-12 23:19:12 +01:00
|
|
|
/// xxx1 Platform security policy override. Assumes the same meaning as 0010 (the image was signed, the
|
2009-07-24 05:26:30 +02:00
|
|
|
/// signature was tested, and the signature passed authentication test).
|
|
|
|
/// 0010 Image was signed, the signature was tested, and the signature passed authentication test.
|
|
|
|
/// 0110 Image was signed and the signature was not tested.
|
|
|
|
/// 1010 Image was signed, the signature was tested, and the signature failed the authentication test.
|
|
|
|
///
|
|
|
|
///@{
|
|
|
|
#define EFI_AUTH_STATUS_PLATFORM_OVERRIDE 0x01
|
|
|
|
#define EFI_AUTH_STATUS_IMAGE_SIGNED 0x02
|
|
|
|
#define EFI_AUTH_STATUS_NOT_TESTED 0x04
|
|
|
|
#define EFI_AUTH_STATUS_TEST_FAILED 0x08
|
|
|
|
#define EFI_AUTH_STATUS_ALL 0x0f
|
|
|
|
///@}
|
2007-07-04 11:04:40 +02:00
|
|
|
|
2010-02-26 07:09:57 +01:00
|
|
|
///
|
2017-08-28 08:35:08 +02:00
|
|
|
/// MMRAM states and capabilities
|
2010-02-26 07:09:57 +01:00
|
|
|
///
|
2017-08-28 08:35:08 +02:00
|
|
|
#define EFI_MMRAM_OPEN 0x00000001
|
|
|
|
#define EFI_MMRAM_CLOSED 0x00000002
|
|
|
|
#define EFI_MMRAM_LOCKED 0x00000004
|
2010-02-26 07:09:57 +01:00
|
|
|
#define EFI_CACHEABLE 0x00000008
|
|
|
|
#define EFI_ALLOCATED 0x00000010
|
|
|
|
#define EFI_NEEDS_TESTING 0x00000020
|
|
|
|
#define EFI_NEEDS_ECC_INITIALIZATION 0x00000040
|
|
|
|
|
2017-08-28 08:35:08 +02:00
|
|
|
#define EFI_SMRAM_OPEN EFI_MMRAM_OPEN
|
|
|
|
#define EFI_SMRAM_CLOSED EFI_MMRAM_CLOSED
|
|
|
|
#define EFI_SMRAM_LOCKED EFI_MMRAM_LOCKED
|
|
|
|
|
2010-02-26 07:09:57 +01:00
|
|
|
///
|
2017-08-28 08:35:08 +02:00
|
|
|
/// Structure describing a MMRAM region and its accessibility attributes.
|
2010-02-26 07:09:57 +01:00
|
|
|
///
|
|
|
|
typedef struct {
|
|
|
|
///
|
2017-08-28 08:35:08 +02:00
|
|
|
/// Designates the physical address of the MMRAM in memory. This view of memory is
|
|
|
|
/// the same as seen by I/O-based agents, for example, but it may not be the address seen
|
2010-02-26 07:09:57 +01:00
|
|
|
/// by the processors.
|
|
|
|
///
|
|
|
|
EFI_PHYSICAL_ADDRESS PhysicalStart;
|
|
|
|
///
|
2017-08-28 08:35:08 +02:00
|
|
|
/// Designates the address of the MMRAM, as seen by software executing on the
|
2010-02-26 07:09:57 +01:00
|
|
|
/// processors. This address may or may not match PhysicalStart.
|
|
|
|
///
|
2018-06-27 15:11:33 +02:00
|
|
|
EFI_PHYSICAL_ADDRESS CpuStart;
|
2010-02-26 07:09:57 +01:00
|
|
|
///
|
2017-08-28 08:35:08 +02:00
|
|
|
/// Describes the number of bytes in the MMRAM region.
|
2010-02-26 07:09:57 +01:00
|
|
|
///
|
|
|
|
UINT64 PhysicalSize;
|
|
|
|
///
|
2017-08-28 08:35:08 +02:00
|
|
|
/// Describes the accessibility attributes of the MMRAM. These attributes include the
|
|
|
|
/// hardware state (e.g., Open/Closed/Locked), capability (e.g., cacheable), logical
|
|
|
|
/// allocation (e.g., allocated), and pre-use initialization (e.g., needs testing/ECC
|
2010-02-26 07:09:57 +01:00
|
|
|
/// initialization).
|
|
|
|
///
|
|
|
|
UINT64 RegionState;
|
2017-08-28 08:35:08 +02:00
|
|
|
} EFI_MMRAM_DESCRIPTOR;
|
|
|
|
|
|
|
|
typedef EFI_MMRAM_DESCRIPTOR EFI_SMRAM_DESCRIPTOR;
|
2010-02-26 07:09:57 +01:00
|
|
|
|
2013-11-20 01:44:25 +01:00
|
|
|
typedef enum {
|
|
|
|
EFI_PCD_TYPE_8,
|
|
|
|
EFI_PCD_TYPE_16,
|
|
|
|
EFI_PCD_TYPE_32,
|
|
|
|
EFI_PCD_TYPE_64,
|
|
|
|
EFI_PCD_TYPE_BOOL,
|
|
|
|
EFI_PCD_TYPE_PTR
|
|
|
|
} EFI_PCD_TYPE;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
///
|
|
|
|
/// The returned information associated with the requested TokenNumber. If
|
|
|
|
/// TokenNumber is 0, then PcdType is set to EFI_PCD_TYPE_8.
|
|
|
|
///
|
|
|
|
EFI_PCD_TYPE PcdType;
|
|
|
|
///
|
|
|
|
/// The size of the data in bytes associated with the TokenNumber specified. If
|
|
|
|
/// TokenNumber is 0, then PcdSize is set 0.
|
|
|
|
///
|
|
|
|
UINTN PcdSize;
|
|
|
|
///
|
|
|
|
/// The null-terminated ASCII string associated with a given token. If the
|
|
|
|
/// TokenNumber specified was 0, then this field corresponds to the null-terminated
|
|
|
|
/// ASCII string associated with the token's namespace Guid. If NULL, there is no
|
|
|
|
/// name associated with this request.
|
|
|
|
///
|
|
|
|
CHAR8 *PcdName;
|
|
|
|
} EFI_PCD_INFO;
|
|
|
|
|
2015-05-15 02:40:29 +02:00
|
|
|
/**
|
|
|
|
The function prototype for invoking a function on an Application Processor.
|
|
|
|
|
|
|
|
This definition is used by the UEFI MP Serices Protocol, and the
|
|
|
|
PI SMM System Table.
|
|
|
|
|
|
|
|
@param[in,out] Buffer The pointer to private data buffer.
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
VOID
|
|
|
|
(EFIAPI *EFI_AP_PROCEDURE)(
|
|
|
|
IN OUT VOID *Buffer
|
|
|
|
);
|
|
|
|
|
2007-06-08 13:31:52 +02:00
|
|
|
#endif
|