878ddf1f |
1 | /*++\r |
2 | \r |
3 | Copyright (c) 2006, Intel Corporation \r |
4 | All rights reserved. This program and the accompanying materials \r |
5 | are licensed and made available under the terms and conditions of the BSD License \r |
6 | which accompanies this distribution. The full text of the license may be found at \r |
7 | http://opensource.org/licenses/bsd-license.php \r |
8 | \r |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r |
11 | \r |
12 | Module Name:\r |
13 | \r |
14 | EdkDxeSalLib.h\r |
15 | \r |
16 | Abstract:\r |
17 | \r |
18 | --*/\r |
19 | \r |
20 | #ifndef _ESAL_SERVICE_LIB_H__\r |
21 | #define _ESAL_SERVICE_LIB_H__\r |
22 | \r |
23 | //#include <Ipf/SalApi.h>\r |
24 | \r |
25 | EFI_STATUS\r |
56836fe9 |
26 | EFIAPI\r |
878ddf1f |
27 | RegisterEsalFunction (\r |
28 | IN UINT64 FunctionId,\r |
29 | IN EFI_GUID *ClassGuid,\r |
30 | IN SAL_INTERNAL_EXTENDED_SAL_PROC Function,\r |
31 | IN VOID *ModuleGlobal\r |
32 | )\r |
33 | /*++\r |
34 | \r |
35 | Routine Description:\r |
36 | \r |
37 | Register ESAL Class Function and it's asociated global.\r |
38 | This function is boot service only!\r |
39 | \r |
40 | Arguments:\r |
41 | FunctionId - ID of function to register\r |
42 | ClassGuid - GUID of function class \r |
43 | Function - Function to register under ClassGuid/FunctionId pair\r |
44 | ModuleGlobal - Module global for Function.\r |
45 | \r |
46 | Returns: \r |
47 | EFI_SUCCESS - If ClassGuid/FunctionId Function was registered.\r |
48 | \r |
49 | --*/\r |
50 | ;\r |
51 | \r |
52 | EFI_STATUS\r |
56836fe9 |
53 | EFIAPI\r |
878ddf1f |
54 | RegisterEsalClass (\r |
55 | IN EFI_GUID *ClassGuid,\r |
56 | IN VOID *ModuleGlobal,\r |
57 | ...\r |
58 | )\r |
59 | /*++\r |
60 | \r |
61 | Routine Description:\r |
62 | \r |
63 | Register ESAL Class and it's asociated global.\r |
64 | This function is boot service only!\r |
65 | \r |
66 | Arguments:\r |
67 | ClassGuid - GUID of function class \r |
68 | ModuleGlobal - Module global for Function.\r |
69 | .. - SAL_INTERNAL_EXTENDED_SAL_PROC and FunctionId pairs. NULL \r |
70 | indicates the end of the list.\r |
71 | \r |
72 | Returns: \r |
73 | EFI_SUCCESS - All members of ClassGuid registered\r |
74 | \r |
75 | --*/\r |
76 | ;\r |
77 | \r |
78 | SAL_RETURN_REGS\r |
56836fe9 |
79 | EFIAPI\r |
878ddf1f |
80 | EfiCallEsalService (\r |
81 | IN EFI_GUID *ClassGuid,\r |
82 | IN UINT64 FunctionId,\r |
83 | IN UINT64 Arg2,\r |
84 | IN UINT64 Arg3,\r |
85 | IN UINT64 Arg4,\r |
86 | IN UINT64 Arg5,\r |
87 | IN UINT64 Arg6,\r |
88 | IN UINT64 Arg7,\r |
89 | IN UINT64 Arg8\r |
90 | )\r |
91 | /*++\r |
92 | \r |
93 | Routine Description:\r |
94 | \r |
95 | Call module that is not linked direclty to this module. This code is IP \r |
96 | relative and hides the binding issues of virtual or physical calling. The\r |
97 | function that gets dispatched has extra arguments that include the registered\r |
98 | module global and a boolean flag to indicate if the system is in virutal mode.\r |
99 | \r |
100 | Arguments:\r |
101 | ClassGuid - GUID of function\r |
102 | FunctionId - Function in ClassGuid to call\r |
103 | Arg2 - Argument 2 ClassGuid/FunctionId defined\r |
104 | Arg3 - Argument 3 ClassGuid/FunctionId defined\r |
105 | Arg4 - Argument 4 ClassGuid/FunctionId defined\r |
106 | Arg5 - Argument 5 ClassGuid/FunctionId defined\r |
107 | Arg6 - Argument 6 ClassGuid/FunctionId defined\r |
108 | Arg7 - Argument 7 ClassGuid/FunctionId defined\r |
109 | Arg8 - Argument 8 ClassGuid/FunctionId defined\r |
110 | \r |
111 | Returns: \r |
112 | Status of ClassGuid/FuncitonId\r |
113 | \r |
114 | --*/\r |
115 | ;\r |
116 | \r |
117 | SAL_RETURN_REGS\r |
56836fe9 |
118 | EFIAPI\r |
878ddf1f |
119 | SetEsalVirtualEntryPoint (\r |
120 | IN UINT64 EntryPoint,\r |
121 | IN UINT64 Gp\r |
122 | )\r |
123 | ;\r |
124 | \r |
125 | SAL_RETURN_REGS\r |
56836fe9 |
126 | EFIAPI\r |
878ddf1f |
127 | SetEsalPhysicalEntryPoint (\r |
128 | IN UINT64 EntryPoint,\r |
129 | IN UINT64 Gp\r |
130 | )\r |
131 | ;\r |
132 | \r |
133 | SAL_RETURN_REGS\r |
56836fe9 |
134 | EFIAPI\r |
878ddf1f |
135 | GetEsalEntryPoint (\r |
136 | VOID\r |
137 | )\r |
138 | ;\r |
139 | \r |
140 | VOID\r |
56836fe9 |
141 | EFIAPI\r |
878ddf1f |
142 | SalFlushCache (\r |
143 | IN EFI_PHYSICAL_ADDRESS Start,\r |
144 | IN UINT64 Length\r |
145 | )\r |
146 | ;\r |
147 | \r |
148 | #endif\r |