]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/BaseLibInternals.h
Removed file/folder
[mirror_edk2.git] / MdePkg / Library / BaseLib / BaseLibInternals.h
1 /** @file
2 Declaration of internal functions in BaseLib.
3
4 Copyright (c) 2006, Intel Corporation<BR>
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 Module Name: BaseLibInternals.h
14
15 **/
16
17 #ifndef __BASE_LIB_INTERNALS__
18 #define __BASE_LIB_INTERNALS__
19
20 //
21 // Math functions
22 //
23
24 UINT64
25 EFIAPI
26 InternalMathLShiftU64 (
27 IN UINT64 Operand,
28 IN UINTN Count
29 );
30
31 UINT64
32 EFIAPI
33 InternalMathRShiftU64 (
34 IN UINT64 Operand,
35 IN UINTN Count
36 );
37
38 UINT64
39 EFIAPI
40 InternalMathARShiftU64 (
41 IN UINT64 Operand,
42 IN UINTN Count
43 );
44
45 UINT64
46 EFIAPI
47 InternalMathLRotU64 (
48 IN UINT64 Operand,
49 IN UINTN Count
50 );
51
52 UINT64
53 EFIAPI
54 InternalMathRRotU64 (
55 IN UINT64 Operand,
56 IN UINTN Count
57 );
58
59 UINT64
60 EFIAPI
61 InternalMathSwapBytes64 (
62 IN UINT64 Operand
63 );
64
65 UINT64
66 EFIAPI
67 InternalMathMultU64x32 (
68 IN UINT64 Multiplicand,
69 IN UINT32 Multiplier
70 );
71
72 UINT64
73 EFIAPI
74 InternalMathMultU64x64 (
75 IN UINT64 Multiplicand,
76 IN UINT64 Multiplier
77 );
78
79 UINT64
80 EFIAPI
81 InternalMathDivU64x32 (
82 IN UINT64 Dividend,
83 IN UINT32 Divisor
84 );
85
86 UINT32
87 EFIAPI
88 InternalMathModU64x32 (
89 IN UINT64 Dividend,
90 IN UINT32 Divisor
91 );
92
93 UINT64
94 EFIAPI
95 InternalMathDivRemU64x32 (
96 IN UINT64 Dividend,
97 IN UINT32 Divisor,
98 OUT UINT32 *Remainder
99 );
100
101 UINT64
102 EFIAPI
103 InternalMathDivRemU64x64 (
104 IN UINT64 Dividend,
105 IN UINT64 Divisor,
106 OUT UINT64 *Remainder
107 );
108
109 INT64
110 EFIAPI
111 InternalMathDivRemS64x64 (
112 IN INT64 Dividend,
113 IN INT64 Divisor,
114 OUT INT64 *Remainder
115 );
116
117 //
118 // Ia32 and x64 specific functions
119 //
120
121 VOID
122 EFIAPI
123 InternalX86ReadGdtr (
124 OUT IA32_DESCRIPTOR *Gdtr
125 );
126
127 VOID
128 EFIAPI
129 InternalX86WriteGdtr (
130 IN CONST IA32_DESCRIPTOR *Gdtr
131 );
132
133 VOID
134 EFIAPI
135 InternalX86ReadIdtr (
136 OUT IA32_DESCRIPTOR *Idtr
137 );
138
139 VOID
140 EFIAPI
141 InternalX86WriteIdtr (
142 IN CONST IA32_DESCRIPTOR *Idtr
143 );
144
145 VOID
146 EFIAPI
147 InternalX86FxSave (
148 OUT IA32_FX_BUFFER *Buffer
149 );
150
151 VOID
152 EFIAPI
153 InternalX86FxRestore (
154 IN CONST IA32_FX_BUFFER *Buffer
155 );
156
157 VOID
158 EFIAPI
159 InternalX86EnablePaging32 (
160 IN SWITCH_STACK_ENTRY_POINT EntryPoint,
161 IN VOID *Context1, OPTIONAL
162 IN VOID *Context2, OPTIONAL
163 IN VOID *NewStack
164 );
165
166 VOID
167 EFIAPI
168 InternalX86DisablePaging32 (
169 IN SWITCH_STACK_ENTRY_POINT EntryPoint,
170 IN VOID *Context1, OPTIONAL
171 IN VOID *Context2, OPTIONAL
172 IN VOID *NewStack
173 );
174
175 VOID
176 EFIAPI
177 InternalX86EnablePaging64 (
178 IN UINT16 Cs,
179 IN UINT64 EntryPoint,
180 IN UINT64 Context1, OPTIONAL
181 IN UINT64 Context2, OPTIONAL
182 IN UINT64 NewStack
183 );
184
185 VOID
186 EFIAPI
187 InternalX86DisablePaging64 (
188 IN UINT16 Cs,
189 IN UINT32 EntryPoint,
190 IN UINT32 Context1, OPTIONAL
191 IN UINT32 Context2, OPTIONAL
192 IN UINT32 NewStack
193 );
194
195 #endif