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