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