]>
Commit | Line | Data |
---|---|---|
878ddf1f | 1 | /** @file\r |
2 | The EFI Legacy BIOS Patform Protocol is used to mate a Legacy16 \r | |
3 | implementation with this EFI code. The EFI driver that produces \r | |
4 | the Legacy BIOS protocol is generic and consumes this protocol.\r | |
5 | A driver that matches the Legacy16 produces this protocol\r | |
6 | \r | |
7 | Copyright (c) 2006, Intel Corporation \r | |
8 | All rights reserved. This program and the accompanying materials \r | |
9 | are licensed and made available under the terms and conditions of the BSD License \r | |
10 | which accompanies this distribution. The full text of the license may be found at \r | |
11 | http://opensource.org/licenses/bsd-license.php \r | |
12 | \r | |
13 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
14 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
15 | \r | |
16 | Module Name: LegacyBiosPlatform.h\r | |
17 | \r | |
18 | @par Revision Reference:\r | |
19 | This protocol is defined in Framework for EFI Compatibility Support Module spec\r | |
20 | Version 0.96\r | |
21 | **/\r | |
22 | \r | |
23 | #ifndef _EFI_LEGACY_BIOS_PLATFORM_H\r | |
24 | #define _EFI_LEGACY_BIOS_PLATFORM_H\r | |
25 | \r | |
26 | #define EFI_LEGACY_BIOS_PLATFORM_PROTOCOL_GUID \\r | |
27 | { \\r | |
28 | 0x783658a3, 0x4172, 0x4421, {0xa2, 0x99, 0xe0, 0x9, 0x7, 0x9c, 0xc, 0xb4 } \\r | |
29 | }\r | |
30 | \r | |
31 | typedef struct _EFI_LEGACY_BIOS_PLATFORM_PROTOCOL EFI_LEGACY_BIOS_PLATFORM_PROTOCOL;\r | |
32 | \r | |
33 | #pragma pack(1)\r | |
34 | //\r | |
35 | // Define structures for GetOemIntData\r | |
36 | // Note:\r | |
37 | // OemIntDataElenent is an array of structures from 0 to Count-1.\r | |
38 | // RawData is an array of bytes from 0 to RamDataLength-1.\r | |
39 | //\r | |
40 | typedef struct {\r | |
41 | UINT16 Int;\r | |
42 | UINT16 Ax;\r | |
43 | UINT32 RawDataLength;\r | |
44 | UINT8 RawData[1];\r | |
45 | } EFI_OEM_INT_DATA_ELEMENT;\r | |
46 | \r | |
47 | typedef struct {\r | |
48 | UINT16 Count;\r | |
49 | EFI_OEM_INT_DATA_ELEMENT OemIntDataElement[1];\r | |
50 | } EFI_OEM_INT_DATA;\r | |
51 | #pragma pack()\r | |
52 | \r | |
53 | typedef enum {\r | |
54 | EfiGetPlatformBinaryMpTable = 0,\r | |
55 | EfiGetPlatformBinaryOemIntData = 1,\r | |
56 | EfiGetPlatformBinaryOem16Data = 2,\r | |
57 | EfiGetPlatformBinaryOem32Data = 3,\r | |
58 | EfiGetPlatformBinaryTpmBinary = 4,\r | |
59 | EfiGetPlatformBinarySystemRom = 5,\r | |
60 | EfiGetPlatformPciExpressBase = 6,\r | |
61 | EfiGetPlatformPmmSize = 7,\r | |
62 | EfiGetPlatformEndOpromShadowAddr = 8,\r | |
63 | \r | |
64 | } EFI_GET_PLATFORM_INFO_MODE;\r | |
65 | \r | |
66 | typedef enum {\r | |
67 | EfiGetPlatformVgaHandle = 0,\r | |
68 | EfiGetPlatformIdeHandle = 1,\r | |
69 | EfiGetPlatformIsaBusHandle = 2,\r | |
70 | EfiGetPlatformUsbHandle = 3\r | |
71 | } EFI_GET_PLATFORM_HANDLE_MODE;\r | |
72 | \r | |
73 | typedef enum {\r | |
74 | EfiPlatformHookPrepareToScanRom = 0,\r | |
75 | EfiPlatformHookShadowServiceRoms= 1,\r | |
76 | EfiPlatformHookAfterRomInit = 2\r | |
77 | } EFI_GET_PLATFORM_HOOK_MODE;\r | |
78 | \r | |
79 | /**\r | |
80 | Finds the binary data or other platform information.\r | |
81 | \r | |
0647c9ad LG |
82 | @param This Protocol instance pointer.\r |
83 | @param Mode Specifies what data to return\r | |
84 | @param Table Pointer to MP table.\r | |
85 | @param TableSize Size in bytes of table.\r | |
86 | @param Location Legacy region requested\r | |
87 | 0x00 = Any location\r | |
88 | Bit 0 = 0xF0000 region\r | |
89 | Bit 1 = 0xE0000 region\r | |
90 | Multiple bits can be set\r | |
91 | @param Alignment Address alignment for allocation.\r | |
92 | Bit mapped. First non-zero bit from right\r | |
93 | is alignment.\r | |
94 | @param LegacySegment Segment in LegacyBios where Table is stored\r | |
95 | @param LegacyOffset Offset in LegacyBios where Table is stored\r | |
96 | \r | |
97 | @retval EFI_SUCCESS Data was returned successfully.\r | |
98 | @retval EFI_UNSUPPORTED Mode is not supported on the platform.\r | |
99 | @retval EFI_NOT_FOUND Binary image or table not found.\r | |
878ddf1f | 100 | \r |
101 | **/\r | |
102 | typedef\r | |
103 | EFI_STATUS\r | |
104 | (EFIAPI *EFI_LEGACY_BIOS_PLATFORM_GET_PLATFORM_INFO) (\r | |
105 | IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This,\r | |
106 | IN EFI_GET_PLATFORM_INFO_MODE Mode,\r | |
107 | OUT VOID **Table,\r | |
108 | OUT UINTN *TableSize,\r | |
109 | OUT UINTN *Location,\r | |
110 | OUT UINTN *Alignment,\r | |
111 | IN UINT16 LegacySegment,\r | |
112 | IN UINT16 LegacyOffset\r | |
113 | )\r | |
114 | ;\r | |
115 | \r | |
116 | /**\r | |
117 | Returns a buffer of handles for the requested sub-function.\r | |
118 | \r | |
0647c9ad LG |
119 | @param This Protocol instance pointer.\r |
120 | @param Mode Specifies what handle to return.\r | |
121 | @param Type Type from Device Path for Handle to represent.\r | |
122 | @param HandleBuffer Handles of the device/controller in priority order\r | |
123 | with HandleBuffer[0] highest priority.\r | |
124 | @param HandleCount Number of handles in the buffer.\r | |
125 | @param AdditionalData Mode specific.\r | |
878ddf1f | 126 | \r |
0647c9ad LG |
127 | @retval EFI_SUCCESS Handle is valid\r |
128 | @retval EFI_UNSUPPORTED Mode is not supported on the platform.\r | |
129 | @retval EFI_NOT_FOUND Handle is not known\r | |
878ddf1f | 130 | \r |
131 | **/\r | |
132 | typedef\r | |
133 | EFI_STATUS\r | |
134 | (EFIAPI *EFI_LEGACY_BIOS_PLATFORM_GET_PLATFORM_HANDLE) (\r | |
135 | IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This,\r | |
136 | IN EFI_GET_PLATFORM_HANDLE_MODE Mode,\r | |
137 | IN UINT16 Type,\r | |
138 | OUT EFI_HANDLE **HandleBuffer,\r | |
139 | OUT UINTN *HandleCount,\r | |
140 | IN VOID **AdditionalData OPTIONAL\r | |
141 | )\r | |
142 | ;\r | |
143 | \r | |
144 | /**\r | |
145 | Load and initialize the Legacy BIOS SMM handler.\r | |
146 | \r | |
0647c9ad | 147 | @param This Protocol instance pointer.\r |
878ddf1f | 148 | @param EfiToLegacy16BootTable Pointer to Legacy16 boot table.\r |
149 | \r | |
0647c9ad LG |
150 | @retval EFI_SUCCESS SMM code loaded.\r |
151 | @retval EFI_DEVICE_ERROR SMM code failed to load\r | |
878ddf1f | 152 | \r |
153 | **/\r | |
154 | typedef\r | |
155 | EFI_STATUS\r | |
156 | (EFIAPI *EFI_LEGACY_BIOS_PLATFORM_SMM_INIT) (\r | |
157 | IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This,\r | |
158 | IN VOID *EfiToLegacy16BootTable\r | |
159 | )\r | |
160 | ;\r | |
161 | \r | |
162 | /**\r | |
163 | Allows platform to perform any required action after a LegacyBios operation.\r | |
164 | \r | |
0647c9ad LG |
165 | @param This Protocol instance pointer.\r |
166 | @param Mode Specifies what handle to return.\r | |
167 | @param Type Mode specific.\r | |
168 | @param DeviceHandle List of PCI devices in the system.\r | |
169 | @param ShadowAddress First free OpROM area, after other OpROMs have been dispatched.\r | |
170 | @param Compatibility16Table Pointer to Compatibility16Table.\r | |
171 | Content-type: text/html ]>