]> git.proxmox.com Git - mirror_edk2.git/blob - Vlv2TbltDevicePkg/MonoStatusCode/PlatformStatusCode.h
MdeModulePkg/CapsuleApp: Center bitmap at bottom of screen
[mirror_edk2.git] / Vlv2TbltDevicePkg / MonoStatusCode / PlatformStatusCode.h
1 /*++
2
3 Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
4
5 This program and the accompanying materials are licensed and made available under
6 the terms and conditions of the BSD License that accompanies this distribution.
7 The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13
14 Module Name:
15
16 PlatformStatusCode.h
17
18 Abstract:
19
20 Contains Platform specific implementations required to use status codes.
21
22 --*/
23
24 #ifndef _PLATFORM_STATUS_CODE_H_
25 #define _PLATFORM_STATUS_CODE_H_
26
27
28 #define CONFIG_PORT0 0x4E
29 #define INDEX_PORT0 0x4E
30 #define DATA_PORT0 0x4F
31 #define PCI_IDX 0xCF8
32 #define PCI_DAT 0xCFC
33
34 #include "MonoStatusCode.h"
35 #ifndef _PEI_PORT_80_STATUS_CODE_H_
36 #define _PEI_PORT_80_STATUS_CODE_H_
37
38
39
40 //
41 // Status code reporting function
42 //
43 EFI_STATUS
44 Port80ReportStatusCode (
45 IN CONST EFI_PEI_SERVICES **PeiServices,
46 IN EFI_STATUS_CODE_TYPE CodeType,
47 IN EFI_STATUS_CODE_VALUE Value,
48 IN UINT32 Instance,
49 IN CONST EFI_GUID * CallerId,
50 IN CONST EFI_STATUS_CODE_DATA * Data OPTIONAL
51 );
52
53 #endif
54
55 #ifndef _PEI_SERIAL_STATUS_CODE_LIB_H_
56 #define _PEI_SERIAL_STATUS_CODE_LIB_H_
57
58
59 #include <Guid/StatusCodeDataTypeId.h>
60 #include <Guid/StatusCodeDataTypeDebug.h>
61 #include <Library/ReportStatusCodeLib.h>
62 #include <Library/PrintLib.h>
63 #include <Library/BaseMemoryLib.h>
64
65 //
66 // Initialization function
67 //
68 VOID
69 SerialInitializeStatusCode (
70 VOID
71 );
72
73 //
74 // Status code reporting function
75 //
76 EFI_STATUS
77 SerialReportStatusCode (
78 IN CONST EFI_PEI_SERVICES **PeiServices,
79 IN EFI_STATUS_CODE_TYPE CodeType,
80 IN EFI_STATUS_CODE_VALUE Value,
81 IN UINT32 Instance,
82 IN CONST EFI_GUID * CallerId,
83 IN CONST EFI_STATUS_CODE_DATA * Data OPTIONAL
84 );
85
86 #endif
87
88 extern EFI_PEI_PROGRESS_CODE_PPI mStatusCodePpi;
89 extern EFI_PEI_PPI_DESCRIPTOR mPpiListStatusCode;
90 #define EFI_SIGNATURE_16(A, B) ((A) | (B << 8))
91 #define EFI_SIGNATURE_32(A, B, C, D) (EFI_SIGNATURE_16 (A, B) | (EFI_SIGNATURE_16 (C, D) << 16))
92 #define STATUSCODE_PEIM_SIGNATURE EFI_SIGNATURE_32 ('p', 's', 't', 'c')
93
94 typedef struct {
95 UINT32 Signature;
96 EFI_FFS_FILE_HEADER *FfsHeader;
97 EFI_PEI_NOTIFY_DESCRIPTOR StatusCodeNotify;
98 } STATUSCODE_CALLBACK_STATE_INFORMATION;
99
100 #pragma pack(1)
101 typedef struct {
102 UINT16 Limit;
103 UINT32 Base;
104 } GDT_DSCRIPTOR;
105 #pragma pack()
106
107 #define STATUSCODE_PEIM_FROM_THIS(a) \
108 BASE_CR ( \
109 a, \
110 STATUSCODE_CALLBACK_STATE_INFORMATION, \
111 StatusCodeNotify \
112 )
113
114 VOID
115 EFIAPI
116 PlatformInitializeStatusCode (
117 IN EFI_FFS_FILE_HEADER *FfsHeader,
118 IN CONST EFI_PEI_SERVICES **PeiServices
119 );
120
121
122 //
123 // Function declarations
124 //
125 /**
126 Install Firmware Volume Hob's once there is main memory
127
128 @param PeiServices General purpose services available to every PEIM.
129 @param NotifyDescriptor Not Used
130 @param Ppi Not Used
131
132 @retval Status EFI_SUCCESS if the interface could be successfully
133 installed
134
135 **/
136 EFI_STATUS
137 EFIAPI
138 MemoryDiscoveredPpiNotifyCallback (
139 IN EFI_PEI_SERVICES **PeiServices,
140 IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,
141 IN VOID *Ppi
142 );
143
144 #endif