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