TianoCore EDK2 master
Loading...
Searching...
No Matches
BaseLibInternals.h
Go to the documentation of this file.
1
9#ifndef __BASE_LIB_INTERNALS__
10#define __BASE_LIB_INTERNALS__
11
12#include <Base.h>
13#include <Library/BaseLib.h>
15#include <Library/DebugLib.h>
16#include <Library/PcdLib.h>
17
18//
19// Math functions
20//
21
35UINT64
36EFIAPI
38 IN UINT64 Operand,
39 IN UINTN Count
40 );
41
55UINT64
56EFIAPI
58 IN UINT64 Operand,
59 IN UINTN Count
60 );
61
75UINT64
76EFIAPI
78 IN UINT64 Operand,
79 IN UINTN Count
80 );
81
96UINT64
97EFIAPI
99 IN UINT64 Operand,
100 IN UINTN Count
101 );
102
117UINT64
118EFIAPI
120 IN UINT64 Operand,
121 IN UINTN Count
122 );
123
136UINT64
137EFIAPI
139 IN UINT64 Operand
140 );
141
156UINT64
157EFIAPI
159 IN UINT64 Multiplicand,
160 IN UINT32 Multiplier
161 );
162
177UINT64
178EFIAPI
180 IN UINT64 Multiplicand,
181 IN UINT64 Multiplier
182 );
183
198UINT64
199EFIAPI
201 IN UINT64 Dividend,
202 IN UINT32 Divisor
203 );
204
219UINT32
220EFIAPI
222 IN UINT64 Dividend,
223 IN UINT32 Divisor
224 );
225
243UINT64
244EFIAPI
246 IN UINT64 Dividend,
247 IN UINT32 Divisor,
248 OUT UINT32 *Remainder OPTIONAL
249 );
250
268UINT64
269EFIAPI
271 IN UINT64 Dividend,
272 IN UINT64 Divisor,
273 OUT UINT64 *Remainder OPTIONAL
274 );
275
293INT64
294EFIAPI
296 IN INT64 Dividend,
297 IN INT64 Divisor,
298 OUT INT64 *Remainder OPTIONAL
299 );
300
325VOID
326EFIAPI
328 IN SWITCH_STACK_ENTRY_POINT EntryPoint,
329 IN VOID *Context1 OPTIONAL,
330 IN VOID *Context2 OPTIONAL,
331 IN VOID *NewStack,
332 IN VA_LIST Marker
333 );
334
347UINTN
348EFIAPI
350 IN UINTN Operand,
351 IN UINTN StartBit,
352 IN UINTN EndBit
353 );
354
371UINTN
372EFIAPI
374 IN UINTN Operand,
375 IN UINTN StartBit,
376 IN UINTN EndBit,
377 IN UINTN OrData
378 );
379
396UINTN
397EFIAPI
399 IN UINTN Operand,
400 IN UINTN StartBit,
401 IN UINTN EndBit,
402 IN UINTN AndData
403 );
404
416VOID
417EFIAPI
419 IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer
420 );
421
433VOID
434EFIAPI
436 IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer,
437 IN UINTN Value
438 );
439
453BOOLEAN
454EFIAPI
456 IN CHAR16 Char
457 );
458
472UINTN
473EFIAPI
475 IN CHAR16 Char
476 );
477
492BOOLEAN
493EFIAPI
495 IN CHAR16 Char
496 );
497
511BOOLEAN
512EFIAPI
514 IN CHAR8 Char
515 );
516
531BOOLEAN
532EFIAPI
534 IN CHAR8 Char
535 );
536
550UINTN
551EFIAPI
553 IN CHAR8 Char
554 );
555
556//
557// Ia32 and x64 specific functions
558//
559#if defined (MDE_CPU_IA32) || defined (MDE_CPU_X64)
560
570VOID
571EFIAPI
573 OUT IA32_DESCRIPTOR *Gdtr
574 );
575
585VOID
586EFIAPI
588 IN CONST IA32_DESCRIPTOR *Gdtr
589 );
590
600VOID
601EFIAPI
603 OUT IA32_DESCRIPTOR *Idtr
604 );
605
615VOID
616EFIAPI
618 IN CONST IA32_DESCRIPTOR *Idtr
619 );
620
631VOID
632EFIAPI
634 OUT IA32_FX_BUFFER *Buffer
635 );
636
647VOID
648EFIAPI
650 IN CONST IA32_FX_BUFFER *Buffer
651 );
652
686VOID
687EFIAPI
689 IN SWITCH_STACK_ENTRY_POINT EntryPoint,
690 IN VOID *Context1 OPTIONAL,
691 IN VOID *Context2 OPTIONAL,
692 IN VOID *NewStack
693 );
694
725VOID
726EFIAPI
728 IN SWITCH_STACK_ENTRY_POINT EntryPoint,
729 IN VOID *Context1 OPTIONAL,
730 IN VOID *Context2 OPTIONAL,
731 IN VOID *NewStack
732 );
733
761VOID
762EFIAPI
764 IN UINT16 Cs,
765 IN UINT64 EntryPoint,
766 IN UINT64 Context1 OPTIONAL,
767 IN UINT64 Context2 OPTIONAL,
768 IN UINT64 NewStack
769 );
770
797VOID
798EFIAPI
800 IN UINT16 Cs,
801 IN UINT32 EntryPoint,
802 IN UINT32 Context1 OPTIONAL,
803 IN UINT32 Context2 OPTIONAL,
804 IN UINT32 NewStack
805 );
806
816BOOLEAN
817EFIAPI
818InternalX86RdRand16 (
819 OUT UINT16 *Rand
820 );
821
831BOOLEAN
832EFIAPI
833InternalX86RdRand32 (
834 OUT UINT32 *Rand
835 );
836
847BOOLEAN
848EFIAPI
849InternalX86RdRand64 (
850 OUT UINT64 *Rand
851 );
852
853#else
854
855#endif
856
857#endif
UINT64 UINTN
VOID(EFIAPI * SWITCH_STACK_ENTRY_POINT)(IN VOID *Context1 OPTIONAL, IN VOID *Context2 OPTIONAL)
Definition: BaseLib.h:5019
UINT64 EFIAPI InternalMathMultU64x64(IN UINT64 Multiplicand, IN UINT64 Multiplier)
Definition: MultU64x64.c:25
UINTN EFIAPI BitFieldOrUint(IN UINTN Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINTN OrData)
BOOLEAN EFIAPI InternalAsciiIsDecimalDigitCharacter(IN CHAR8 Char)
Definition: String.c:590
UINT64 EFIAPI InternalMathDivRemU64x64(IN UINT64 Dividend, IN UINT64 Divisor, OUT UINT64 *Remainder OPTIONAL)
Definition: Math64.c:320
UINT64 EFIAPI InternalMathRRotU64(IN UINT64 Operand, IN UINTN Count)
Definition: RRotU64.c:25
BOOLEAN EFIAPI InternalIsDecimalDigitCharacter(IN CHAR16 Char)
Definition: String.c:283
UINTN EFIAPI BitFieldAndUint(IN UINTN Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINTN AndData)
BOOLEAN EFIAPI InternalAsciiIsHexaDecimalDigitCharacter(IN CHAR8 Char)
Definition: String.c:613
UINT64 EFIAPI InternalMathSwapBytes64(IN UINT64 Operand)
Definition: SwapBytes64.c:23
UINTN EFIAPI InternalAsciiHexCharToUintn(IN CHAR8 Char)
Definition: String.c:772
UINT64 EFIAPI InternalMathDivU64x32(IN UINT64 Dividend, IN UINT32 Divisor)
Definition: DivU64x32.c:25
UINT64 EFIAPI InternalMathLShiftU64(IN UINT64 Operand, IN UINTN Count)
Definition: LShiftU64.c:24
INT64 EFIAPI InternalMathDivRemS64x64(IN INT64 Dividend, IN INT64 Divisor, OUT INT64 *Remainder OPTIONAL)
UINT64 EFIAPI InternalMathDivRemU64x32(IN UINT64 Dividend, IN UINT32 Divisor, OUT UINT32 *Remainder OPTIONAL)
Definition: Math64.c:288
UINTN EFIAPI InternalHexCharToUintn(IN CHAR16 Char)
Definition: String.c:333
UINT32 EFIAPI InternalMathModU64x32(IN UINT64 Dividend, IN UINT32 Divisor)
Definition: ModU64x32.c:25
VOID EFIAPI InternalLongJump(IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer, IN UINTN Value)
UINTN EFIAPI BitFieldReadUint(IN UINTN Operand, IN UINTN StartBit, IN UINTN EndBit)
VOID EFIAPI InternalAssertJumpBuffer(IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer)
Definition: SetJump.c:24
UINT64 EFIAPI InternalMathMultU64x32(IN UINT64 Multiplicand, IN UINT32 Multiplier)
Definition: MultU64x32.c:25
UINT64 EFIAPI InternalMathRShiftU64(IN UINT64 Operand, IN UINTN Count)
Definition: RShiftU64.c:24
VOID EFIAPI InternalSwitchStack(IN SWITCH_STACK_ENTRY_POINT EntryPoint, IN VOID *Context1 OPTIONAL, IN VOID *Context2 OPTIONAL, IN VOID *NewStack, IN VA_LIST Marker)
UINT64 EFIAPI InternalMathLRotU64(IN UINT64 Operand, IN UINTN Count)
Definition: LRotU64.c:25
UINT64 EFIAPI InternalMathARShiftU64(IN UINT64 Operand, IN UINTN Count)
Definition: ARShiftU64.c:24
BOOLEAN EFIAPI InternalIsHexaDecimalDigitCharacter(IN CHAR16 Char)
Definition: String.c:360
VOID EFIAPI InternalX86FxRestore(IN CONST IA32_FX_BUFFER *Buffer)
Definition: FxRestore.c:23
VOID EFIAPI InternalX86FxSave(OUT IA32_FX_BUFFER *Buffer)
Definition: FxSave.c:23
VOID EFIAPI InternalX86ReadGdtr(OUT IA32_DESCRIPTOR *Gdtr)
VOID EFIAPI InternalX86ReadIdtr(OUT IA32_DESCRIPTOR *Idtr)
VOID EFIAPI InternalX86WriteIdtr(IN CONST IA32_DESCRIPTOR *Idtr)
VOID EFIAPI InternalX86WriteGdtr(IN CONST IA32_DESCRIPTOR *Gdtr)
VOID EFIAPI InternalX86DisablePaging64(IN UINT16 CodeSelector, IN UINT32 EntryPoint, IN UINT32 Context1 OPTIONAL, IN UINT32 Context2 OPTIONAL, IN UINT32 NewStack)
Definition: Non-existing.c:39
#define CONST
Definition: Base.h:259
CHAR8 * VA_LIST
Definition: Base.h:643
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
UINTN Rand(VOID)
Definition: Support.c:39
VOID EFIAPI InternalX86EnablePaging32(IN SWITCH_STACK_ENTRY_POINT EntryPoint, IN VOID *Context1 OPTIONAL, IN VOID *Context2 OPTIONAL, IN VOID *NewStack)
Definition: Non-existing.c:47
VOID EFIAPI InternalX86DisablePaging32(IN SWITCH_STACK_ENTRY_POINT EntryPoint, IN VOID *Context1 OPTIONAL, IN VOID *Context2 OPTIONAL, IN VOID *NewStack)
Definition: Non-existing.c:92
VOID EFIAPI InternalX86EnablePaging64(IN UINT16 Cs, IN UINT64 EntryPoint, IN UINT64 Context1 OPTIONAL, IN UINT64 Context2 OPTIONAL, IN UINT64 NewStack)
Definition: Non-existing.c:134