summaryrefslogtreecommitdiffstats
path: root/MdePkg/Include/Ppi/SecPlatformInformation.h
blob: bcba5dbf2af6f5d0cce9b2aac81c79257f54a66c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/** @file
  This file declares Sec Platform Information PPI.

  Copyright (c) 2006, 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        
  http://opensource.org/licenses/bsd-license.php                                            

  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             

  Module Name:  SecPlatformInformation.h

  @par Revision Reference:
  This PPI is defined in PEI CIS.
  Version 0.91.

**/

#ifndef __SEC_PLATFORM_INFORMATION_PPI_H__
#define __SEC_PLATFORM_INFORMATION_PPI_H__

#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;

extern EFI_GUID gEfiSecPlatformInformationPpiGuid;

typedef struct {
  UINTN BootPhase;      // entry r20 value
  UINTN UniqueId;       // PAL arbitration ID
  UINTN HealthStat;     // Health Status
  UINTN PALRetAddress;  // return address to PAL
} IPF_HANDOFF_STATUS;

///
/// EFI_HEALTH_FLAGS
///
typedef union {
  struct {
    UINT32   Status                   : 2;
    UINT32   Tested                   : 1;
    UINT32   Reserved1                :13;
    UINT32   VirtualMemoryUnavailable : 1;
    UINT32   Ia32ExecutionUnavailable : 1;
    UINT32   FloatingPointUnavailable : 1;
    UINT32   MiscFeaturesUnavailable  : 1;
    UINT32   Reserved2                :12;
  }                     Bits;
  UINT32                Uint32;
} EFI_HEALTH_FLAGS;

typedef struct {
  EFI_HEALTH_FLAGS HealthFlags;
} EFI_SEC_PLATFORM_INFORMATION_RECORD;

/**
  This interface conveys state information out of the Security (SEC) phase into PEI.

  @param  PeiServices               Pointer to the PEI Services Table.
  @param  StructureSize             Pointer to the variable describing size of the input buffer.
  @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.

**/
typedef
EFI_STATUS
(EFIAPI *EFI_SEC_PLATFORM_INFORMATION) (
  IN EFI_PEI_SERVICES                      **PeiServices,
  IN OUT UINT64                            *StructureSize,
  OUT EFI_SEC_PLATFORM_INFORMATION_RECORD  *PlatformInformationRecord
  );

/**
  @par Ppi Description:

  @param Name

**/
struct _EFI_SEC_PLATFORM_INFORMATION_PPI {
  EFI_SEC_PLATFORM_INFORMATION  PlatformInformation;
};

#endif