]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/Ebc.h
Fix doxygen issue:
[mirror_edk2.git] / MdePkg / Include / Protocol / Ebc.h
CommitLineData
d1f95000 1/** @file\r
2 Describes the protocol interface to the EBC interpreter.\r
3\r
4 Copyright (c) 2006, Intel Corporation \r
5 All rights reserved. This program and the accompanying materials \r
6 are licensed and made available under the terms and conditions of the BSD License \r
7 which accompanies this distribution. The full text of the license may be found at \r
8 http://opensource.org/licenses/bsd-license.php \r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
12\r
d1f95000 13**/\r
14\r
15#ifndef __EFI_EBC_PROTOCOL_H__\r
16#define __EFI_EBC_PROTOCOL_H__\r
17\r
18#define EFI_EBC_INTERPRETER_PROTOCOL_GUID \\r
19 { \\r
20 0x13AC6DD1, 0x73D0, 0x11D4, {0xB0, 0x6B, 0x00, 0xAA, 0x00, 0xBD, 0x6D, 0xE7 } \\r
21 }\r
22\r
23//\r
24// Protocol Guid Name defined in spec.\r
25//\r
26#define EFI_EBC_PROTOCOL_GUID EFI_EBC_INTERPRETER_PROTOCOL_GUID\r
27\r
28//\r
29// Define for forward reference.\r
30//\r
31typedef struct _EFI_EBC_PROTOCOL EFI_EBC_PROTOCOL;\r
32\r
33/**\r
34 Create a thunk for an image entry point. In short, given the physical address\r
35 of the entry point for a loaded image, create a thunk that does some \r
36 fixup of arguments (and perform any other necessary overhead) and then\r
37 calls the original entry point. The caller can then use the returned pointer\r
38 to the created thunk as the new entry point to image.\r
39\r
40 @param This protocol instance pointer\r
41 @param ImageHandle handle to the image. The EBC interpreter may use this to keep\r
42 track of any resource allocations performed in loading and\r
43 executing the image.\r
44 @param EbcEntryPoint the entry point for the image (as defined in the file header)\r
45 @param Thunk pointer to thunk pointer where the address of the created\r
46 thunk is returned.\r
47\r
48 @return Standard EFI_STATUS\r
49\r
50**/\r
51typedef\r
52EFI_STATUS\r
8b13229b 53(EFIAPI *EFI_EBC_CREATE_THUNK)(\r
d1f95000 54 IN EFI_EBC_PROTOCOL *This,\r
55 IN EFI_HANDLE ImageHandle,\r
56 IN VOID *EbcEntryPoint,\r
57 OUT VOID **Thunk\r
58 );\r
59\r
60/**\r
61 Perform any cleanup necessary when an image is unloaded. Basically it gives\r
62 the EBC interpreter the chance to free up any resources allocated during\r
63 load and execution of an EBC image.\r
64\r
65 @param This protocol instance pointer\r
66 @param ImageHandle the handle of the image being unloaded.\r
67\r
68 @return Standard EFI_STATUS.\r
69\r
70**/\r
71typedef\r
72EFI_STATUS\r
8b13229b 73(EFIAPI *EFI_EBC_UNLOAD_IMAGE)(\r
d1f95000 74 IN EFI_EBC_PROTOCOL *This,\r
75 IN EFI_HANDLE ImageHandle\r
76 );\r
77\r
78/**\r
79 The I-Cache-flush registration service takes a pointer to a function to\r
80 call to flush the I-Cache. Here's the prototype for that function pointer.\r
81\r
82 @param Start physical start address of CPU instruction cache to flush.\r
83 @param Length how many bytes to flush of the instruction cache.\r
84\r
85 @return Standard EFI_STATUS.\r
86\r
87**/\r
88typedef\r
89EFI_STATUS\r
8b13229b 90(EFIAPI *EBC_ICACHE_FLUSH)(\r
d1f95000 91 IN EFI_PHYSICAL_ADDRESS Start,\r
92 IN UINT64 Length\r
93 );\r
94\r
95/**\r
96 This routine is called by the core firmware to provide the EBC driver with\r
97 a function to call to flush the CPU's instruction cache following creation\r
98 of a thunk. It is not required.\r
99\r
100 @param This protocol instance pointer\r
101 @param Flush pointer to the function to call to flush the CPU instruction\r
102 cache.\r
103\r
104 @return Standard EFI_STATUS.\r
105\r
106**/\r
107typedef\r
108EFI_STATUS\r
8b13229b 109(EFIAPI *EFI_EBC_REGISTER_ICACHE_FLUSH)(\r
d1f95000 110 IN EFI_EBC_PROTOCOL *This,\r
111 IN EBC_ICACHE_FLUSH Flush\r
112 );\r
113\r
114/**\r
115 This routine can be called to get the VM revision. It returns the same\r
116 value as the EBC BREAK 1 instruction returns.\r
117\r
118 @param This protocol instance pointer\r
119 @param Version pointer to where to return the VM version\r
120\r
121 @return Standard EFI_STATUS.\r
122\r
123**/\r
124typedef\r
125EFI_STATUS\r
8b13229b 126(EFIAPI *EFI_EBC_GET_VERSION)(\r
d1f95000 127 IN EFI_EBC_PROTOCOL *This,\r
128 IN OUT UINT64 *Version\r
129 );\r
130\r
131//\r
132// Prototype for the actual EBC protocol interface\r
133//\r
134struct _EFI_EBC_PROTOCOL {\r
135 EFI_EBC_CREATE_THUNK CreateThunk;\r
136 EFI_EBC_UNLOAD_IMAGE UnloadImage;\r
137 EFI_EBC_REGISTER_ICACHE_FLUSH RegisterICacheFlush;\r
138 EFI_EBC_GET_VERSION GetVersion;\r
139};\r
140\r
141//\r
142// Extern the global EBC protocol GUID\r
143//\r
144extern EFI_GUID gEfiEbcProtocolGuid;\r
145\r
146#endif\r