]>
Commit | Line | Data |
---|---|---|
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 | |
26 | RegisterEsalFunction (\r | |
27 | IN UINT64 FunctionId,\r | |
28 | IN EFI_GUID *ClassGuid,\r | |
29 | IN SAL_INTERNAL_EXTENDED_SAL_PROC Function,\r | |
30 | IN VOID *ModuleGlobal\r | |
31 | )\r | |
32 | /*++\r | |
33 | \r | |
34 | Routine Description:\r | |
35 | \r | |
36 | Register ESAL Class Function and it's asociated global.\r | |
37 | This function is boot service only!\r | |
38 | \r | |
39 | Arguments:\r | |
40 | FunctionId - ID of function to register\r | |
41 | ClassGuid - GUID of function class \r | |
42 | Function - Function to register under ClassGuid/FunctionId pair\r | |
43 | ModuleGlobal - Module global for Function.\r | |
44 | \r | |
45 | Returns: \r | |
46 | EFI_SUCCESS - If ClassGuid/FunctionId Function was registered.\r | |
47 | \r | |
48 | --*/\r | |
49 | ;\r | |
50 | \r | |
51 | EFI_STATUS\r | |
52 | RegisterEsalClass (\r | |
53 | IN EFI_GUID *ClassGuid,\r | |
54 | IN VOID *ModuleGlobal,\r | |
55 | ...\r | |
56 | )\r | |
57 | /*++\r | |
58 | \r | |
59 | Routine Description:\r | |
60 | \r | |
61 | Register ESAL Class and it's asociated global.\r | |
62 | This function is boot service only!\r | |
63 | \r | |
64 | Arguments:\r | |
65 | ClassGuid - GUID of function class \r | |
66 | ModuleGlobal - Module global for Function.\r | |
67 | .. - SAL_INTERNAL_EXTENDED_SAL_PROC and FunctionId pairs. NULL \r | |
68 | indicates the end of the list.\r | |
69 | \r | |
70 | Returns: \r | |
71 | EFI_SUCCESS - All members of ClassGuid registered\r | |
72 | \r | |
73 | --*/\r | |
74 | ;\r | |
75 | \r | |
76 | SAL_RETURN_REGS\r | |
77 | EfiCallEsalService (\r | |
78 | IN EFI_GUID *ClassGuid,\r | |
79 | IN UINT64 FunctionId,\r | |
80 | IN UINT64 Arg2,\r | |
81 | IN UINT64 Arg3,\r | |
82 | IN UINT64 Arg4,\r | |
83 | IN UINT64 Arg5,\r | |
84 | IN UINT64 Arg6,\r | |
85 | IN UINT64 Arg7,\r | |
86 | IN UINT64 Arg8\r | |
87 | )\r | |
88 | /*++\r | |
89 | \r | |
90 | Routine Description:\r | |
91 | \r | |
92 | Call module that is not linked direclty to this module. This code is IP \r | |
93 | relative and hides the binding issues of virtual or physical calling. The\r | |
94 | function that gets dispatched has extra arguments that include the registered\r | |
95 | module global and a boolean flag to indicate if the system is in virutal mode.\r | |
96 | \r | |
97 | Arguments:\r | |
98 | ClassGuid - GUID of function\r | |
99 | FunctionId - Function in ClassGuid to call\r | |
100 | Arg2 - Argument 2 ClassGuid/FunctionId defined\r | |
101 | Arg3 - Argument 3 ClassGuid/FunctionId defined\r | |
102 | Arg4 - Argument 4 ClassGuid/FunctionId defined\r | |
103 | Arg5 - Argument 5 ClassGuid/FunctionId defined\r | |
104 | Arg6 - Argument 6 ClassGuid/FunctionId defined\r | |
105 | Arg7 - Argument 7 ClassGuid/FunctionId defined\r | |
106 | Arg8 - Argument 8 ClassGuid/FunctionId defined\r | |
107 | \r | |
108 | Returns: \r | |
109 | Status of ClassGuid/FuncitonId\r | |
110 | \r | |
111 | --*/\r | |
112 | ;\r | |
113 | \r | |
114 | SAL_RETURN_REGS\r | |
115 | SetEsalVirtualEntryPoint (\r | |
116 | IN UINT64 EntryPoint,\r | |
117 | IN UINT64 Gp\r | |
118 | )\r | |
119 | ;\r | |
120 | \r | |
121 | SAL_RETURN_REGS\r | |
122 | SetEsalPhysicalEntryPoint (\r | |
123 | IN UINT64 EntryPoint,\r | |
124 | IN UINT64 Gp\r | |
125 | )\r | |
126 | ;\r | |
127 | \r | |
128 | SAL_RETURN_REGS\r | |
129 | GetEsalEntryPoint (\r | |
130 | VOID\r | |
131 | )\r | |
132 | ;\r | |
133 | \r | |
134 | VOID\r | |
135 | SalFlushCache (\r | |
136 | IN EFI_PHYSICAL_ADDRESS Start,\r | |
137 | IN UINT64 Length\r | |
138 | )\r | |
139 | ;\r | |
140 | \r | |
141 | #endif\r |