2 Declaration of internal functions in BaseLib.
4 Copyright (c) 2006 - 2008, 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
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.
15 #ifndef __BASE_LIB_INTERNALS__
16 #define __BASE_LIB_INTERNALS__
19 #include <Library/BaseLib.h>
20 #include <Library/BaseMemoryLib.h>
21 #include <Library/DebugLib.h>
22 #include <Library/PcdLib.h>
29 Shifts a 64-bit integer left between 0 and 63 bits. The low bits
30 are filled with zeros. The shifted value is returned.
32 This function shifts the 64-bit value Operand to the left by Count bits. The
33 low Count bits are set to zero. The shifted value is returned.
35 @param Operand The 64-bit operand to shift left.
36 @param Count The number of bits to shift left.
38 @return Operand << Count
43 InternalMathLShiftU64 (
49 Shifts a 64-bit integer right between 0 and 63 bits. This high bits
50 are filled with zeros. The shifted value is returned.
52 This function shifts the 64-bit value Operand to the right by Count bits. The
53 high Count bits are set to zero. The shifted value is returned.
55 @param Operand The 64-bit operand to shift right.
56 @param Count The number of bits to shift right.
58 @return Operand >> Count
63 InternalMathRShiftU64 (
69 Shifts a 64-bit integer right between 0 and 63 bits. The high bits
70 are filled with original integer's bit 63. The shifted value is returned.
72 This function shifts the 64-bit value Operand to the right by Count bits. The
73 high Count bits are set to bit 63 of Operand. The shifted value is returned.
75 @param Operand The 64-bit operand to shift right.
76 @param Count The number of bits to shift right.
78 @return Operand arithmetically shifted right by Count
83 InternalMathARShiftU64 (
89 Rotates a 64-bit integer left between 0 and 63 bits, filling
90 the low bits with the high bits that were rotated.
92 This function rotates the 64-bit value Operand to the left by Count bits. The
93 low Count bits are fill with the high Count bits of Operand. The rotated
96 @param Operand The 64-bit operand to rotate left.
97 @param Count The number of bits to rotate left.
99 @return Operand <<< Count
104 InternalMathLRotU64 (
110 Rotates a 64-bit integer right between 0 and 63 bits, filling
111 the high bits with the high low bits that were rotated.
113 This function rotates the 64-bit value Operand to the right by Count bits.
114 The high Count bits are fill with the low Count bits of Operand. The rotated
117 @param Operand The 64-bit operand to rotate right.
118 @param Count The number of bits to rotate right.
120 @return Operand >>> Count
125 InternalMathRRotU64 (
131 Switches the endianess of a 64-bit integer.
133 This function swaps the bytes in a 64-bit unsigned value to switch the value
134 from little endian to big endian or vice versa. The byte swapped value is
137 @param Operand A 64-bit unsigned value.
139 @return The byte swapped Operand.
144 InternalMathSwapBytes64 (
149 Multiples a 64-bit unsigned integer by a 32-bit unsigned integer
150 and generates a 64-bit unsigned result.
152 This function multiples the 64-bit unsigned value Multiplicand by the 32-bit
153 unsigned value Multiplier and generates a 64-bit unsigned result. This 64-
154 bit unsigned result is returned.
156 @param Multiplicand A 64-bit unsigned value.
157 @param Multiplier A 32-bit unsigned value.
159 @return Multiplicand * Multiplier
164 InternalMathMultU64x32 (
165 IN UINT64 Multiplicand
,
170 Multiples a 64-bit unsigned integer by a 64-bit unsigned integer
171 and generates a 64-bit unsigned result.
173 This function multiples the 64-bit unsigned value Multiplicand by the 64-bit
174 unsigned value Multiplier and generates a 64-bit unsigned result. This 64-
175 bit unsigned result is returned.
177 @param Multiplicand A 64-bit unsigned value.
178 @param Multiplier A 64-bit unsigned value.
180 @return Multiplicand * Multiplier
185 InternalMathMultU64x64 (
186 IN UINT64 Multiplicand
,
191 Divides a 64-bit unsigned integer by a 32-bit unsigned integer and
192 generates a 64-bit unsigned result.
194 This function divides the 64-bit unsigned value Dividend by the 32-bit
195 unsigned value Divisor and generates a 64-bit unsigned quotient. This
196 function returns the 64-bit unsigned quotient.
198 @param Dividend A 64-bit unsigned value.
199 @param Divisor A 32-bit unsigned value.
201 @return Dividend / Divisor
206 InternalMathDivU64x32 (
212 Divides a 64-bit unsigned integer by a 32-bit unsigned integer and
213 generates a 32-bit unsigned remainder.
215 This function divides the 64-bit unsigned value Dividend by the 32-bit
216 unsigned value Divisor and generates a 32-bit remainder. This function
217 returns the 32-bit unsigned remainder.
219 @param Dividend A 64-bit unsigned value.
220 @param Divisor A 32-bit unsigned value.
222 @return Dividend % Divisor
227 InternalMathModU64x32 (
233 Divides a 64-bit unsigned integer by a 32-bit unsigned integer and
234 generates a 64-bit unsigned result and an optional 32-bit unsigned remainder.
236 This function divides the 64-bit unsigned value Dividend by the 32-bit
237 unsigned value Divisor and generates a 64-bit unsigned quotient. If Remainder
238 is not NULL, then the 32-bit unsigned remainder is returned in Remainder.
239 This function returns the 64-bit unsigned quotient.
241 @param Dividend A 64-bit unsigned value.
242 @param Divisor A 32-bit unsigned value.
243 @param Remainder A pointer to a 32-bit unsigned value. This parameter is
244 optional and may be NULL.
246 @return Dividend / Divisor
251 InternalMathDivRemU64x32 (
254 OUT UINT32
*Remainder OPTIONAL
258 Divides a 64-bit unsigned integer by a 64-bit unsigned integer and
259 generates a 64-bit unsigned result and an optional 64-bit unsigned remainder.
261 This function divides the 64-bit unsigned value Dividend by the 64-bit
262 unsigned value Divisor and generates a 64-bit unsigned quotient. If Remainder
263 is not NULL, then the 64-bit unsigned remainder is returned in Remainder.
264 This function returns the 64-bit unsigned quotient.
266 @param Dividend A 64-bit unsigned value.
267 @param Divisor A 64-bit unsigned value.
268 @param Remainder A pointer to a 64-bit unsigned value. This parameter is
269 optional and may be NULL.
271 @return Dividend / Divisor
276 InternalMathDivRemU64x64 (
279 OUT UINT64
*Remainder OPTIONAL
283 Divides a 64-bit signed integer by a 64-bit signed integer and
284 generates a 64-bit signed result and an optional 64-bit signed remainder.
286 This function divides the 64-bit signed value Dividend by the 64-bit
287 signed value Divisor and generates a 64-bit signed quotient. If Remainder
288 is not NULL, then the 64-bit signed remainder is returned in Remainder.
289 This function returns the 64-bit signed quotient.
291 @param Dividend A 64-bit signed value.
292 @param Divisor A 64-bit signed value.
293 @param Remainder A pointer to a 64-bit signed value. This parameter is
294 optional and may be NULL.
296 @return Dividend / Divisor
301 InternalMathDivRemS64x64 (
304 OUT INT64
*Remainder OPTIONAL
308 Transfers control to a function starting with a new stack.
310 Transfers control to the function specified by EntryPoint using the
311 new stack specified by NewStack and passing in the parameters specified
312 by Context1 and Context2. Context1 and Context2 are optional and may
313 be NULL. The function EntryPoint must never return.
314 Marker will be ignored on IA-32, x64, and EBC.
315 IPF CPUs expect one additional parameter of type VOID * that specifies
316 the new backing store pointer.
318 If EntryPoint is NULL, then ASSERT().
319 If NewStack is NULL, then ASSERT().
321 @param EntryPoint A pointer to function to call with the new stack.
322 @param Context1 A pointer to the context to pass into the EntryPoint
324 @param Context2 A pointer to the context to pass into the EntryPoint
326 @param NewStack A pointer to the new stack to use for the EntryPoint
328 @param Marker VA_LIST marker for the variable argument list.
333 InternalSwitchStack (
334 IN SWITCH_STACK_ENTRY_POINT EntryPoint
,
335 IN VOID
*Context1
, OPTIONAL
336 IN VOID
*Context2
, OPTIONAL
343 Worker function that locates the Node in the List.
345 By searching the List, finds the location of the Node in List. At the same time,
346 verifies the validity of this list.
348 If List is NULL, then ASSERT().
349 If List->ForwardLink is NULL, then ASSERT().
350 If List->backLink is NULL, then ASSERT().
351 If Node is NULL, then ASSERT();
352 If PcdMaximumLinkedListLenth is not zero, and prior to insertion the number
353 of nodes in ListHead, including the ListHead node, is greater than or
354 equal to PcdMaximumLinkedListLength, then ASSERT().
356 @param List A pointer to a node in a linked list.
357 @param Node A pointer to one nod.
359 @retval TRUE Node is in List
360 @retval FALSE Node isn't in List, or List is invalid
366 IN CONST LIST_ENTRY
*List
,
367 IN CONST LIST_ENTRY
*Node
371 Worker function that returns a bit field from Operand.
373 Returns the bitfield specified by the StartBit and the EndBit from Operand.
375 @param Operand Operand on which to perform the bitfield operation.
376 @param StartBit The ordinal of the least significant bit in the bit field.
377 @param EndBit The ordinal of the most significant bit in the bit field.
379 @return The bit field read.
392 Worker function that reads a bit field from Operand, performs a bitwise OR,
393 and returns the result.
395 Performs a bitwise OR between the bit field specified by StartBit and EndBit
396 in Operand and the value specified by AndData. All other bits in Operand are
397 preserved. The new value is returned.
399 @param Operand Operand on which to perform the bitfield operation.
400 @param StartBit The ordinal of the least significant bit in the bit field.
401 @param EndBit The ordinal of the most significant bit in the bit field.
402 @param OrData The value to OR with the read value from the value
404 @return The new value.
418 Worker function that reads a bit field from Operand, performs a bitwise AND,
419 and returns the result.
421 Performs a bitwise AND between the bit field specified by StartBit and EndBit
422 in Operand and the value specified by AndData. All other bits in Operand are
423 preserved. The new value is returned.
425 @param Operand Operand on which to perform the bitfield operation.
426 @param StartBit The ordinal of the least significant bit in the bit field.
427 @param EndBit The ordinal of the most significant bit in the bit field.
428 @param AndData The value to And with the read value from the value
430 @return The new value.
444 Worker function that checks ASSERT condition for JumpBuffer
446 Checks ASSERT condition for JumpBuffer.
448 If JumpBuffer is NULL, then ASSERT().
449 For IPF CPUs, if JumpBuffer is not aligned on a 16-byte boundary, then ASSERT().
451 @param JumpBuffer A pointer to CPU context buffer.
456 InternalAssertJumpBuffer (
457 IN BASE_LIBRARY_JUMP_BUFFER
*JumpBuffer
462 Restores the CPU context that was saved with SetJump().
464 Restores the CPU context from the buffer specified by JumpBuffer.
465 This function never returns to the caller.
466 Instead is resumes execution based on the state of JumpBuffer.
468 @param JumpBuffer A pointer to CPU context buffer.
469 @param Value The value to return when the SetJump() context is restored.
475 IN BASE_LIBRARY_JUMP_BUFFER
*JumpBuffer
,
481 // Ia32 and x64 specific functions
483 #if defined (MDE_CPU_IA32) || defined (MDE_CPU_X64)
486 Reads the current Global Descriptor Table Register(GDTR) descriptor.
488 Reads and returns the current GDTR descriptor and returns it in Gdtr. This
489 function is only available on IA-32 and x64.
491 @param Gdtr Pointer to a GDTR descriptor.
496 InternalX86ReadGdtr (
497 OUT IA32_DESCRIPTOR
*Gdtr
501 Writes the current Global Descriptor Table Register (GDTR) descriptor.
503 Writes and the current GDTR descriptor specified by Gdtr. This function is
504 only available on IA-32 and x64.
506 @param Gdtr Pointer to a GDTR descriptor.
511 InternalX86WriteGdtr (
512 IN CONST IA32_DESCRIPTOR
*Gdtr
516 Reads the current Interrupt Descriptor Table Register(GDTR) descriptor.
518 Reads and returns the current IDTR descriptor and returns it in Idtr. This
519 function is only available on IA-32 and x64.
521 @param Idtr Pointer to a IDTR descriptor.
526 InternalX86ReadIdtr (
527 OUT IA32_DESCRIPTOR
*Idtr
531 Writes the current Interrupt Descriptor Table Register(GDTR) descriptor.
533 Writes the current IDTR descriptor and returns it in Idtr. This function is
534 only available on IA-32 and x64.
536 @param Idtr Pointer to a IDTR descriptor.
541 InternalX86WriteIdtr (
542 IN CONST IA32_DESCRIPTOR
*Idtr
546 Save the current floating point/SSE/SSE2 context to a buffer.
548 Saves the current floating point/SSE/SSE2 state to the buffer specified by
549 Buffer. Buffer must be aligned on a 16-byte boundary. This function is only
550 available on IA-32 and x64.
552 @param Buffer Pointer to a buffer to save the floating point/SSE/SSE2 context.
558 OUT IA32_FX_BUFFER
*Buffer
562 Restores the current floating point/SSE/SSE2 context from a buffer.
564 Restores the current floating point/SSE/SSE2 state from the buffer specified
565 by Buffer. Buffer must be aligned on a 16-byte boundary. This function is
566 only available on IA-32 and x64.
568 @param Buffer Pointer to a buffer to save the floating point/SSE/SSE2 context.
573 InternalX86FxRestore (
574 IN CONST IA32_FX_BUFFER
*Buffer
578 Enables the 32-bit paging mode on the CPU.
580 Enables the 32-bit paging mode on the CPU. CR0, CR3, CR4, and the page tables
581 must be properly initialized prior to calling this service. This function
582 assumes the current execution mode is 32-bit protected mode. This function is
583 only available on IA-32. After the 32-bit paging mode is enabled, control is
584 transferred to the function specified by EntryPoint using the new stack
585 specified by NewStack and passing in the parameters specified by Context1 and
586 Context2. Context1 and Context2 are optional and may be NULL. The function
587 EntryPoint must never return.
589 There are a number of constraints that must be followed before calling this
591 1) Interrupts must be disabled.
592 2) The caller must be in 32-bit protected mode with flat descriptors. This
593 means all descriptors must have a base of 0 and a limit of 4GB.
594 3) CR0 and CR4 must be compatible with 32-bit protected mode with flat
596 4) CR3 must point to valid page tables that will be used once the transition
597 is complete, and those page tables must guarantee that the pages for this
598 function and the stack are identity mapped.
600 @param EntryPoint A pointer to function to call with the new stack after
602 @param Context1 A pointer to the context to pass into the EntryPoint
603 function as the first parameter after paging is enabled.
604 @param Context2 A pointer to the context to pass into the EntryPoint
605 function as the second parameter after paging is enabled.
606 @param NewStack A pointer to the new stack to use for the EntryPoint
607 function after paging is enabled.
612 InternalX86EnablePaging32 (
613 IN SWITCH_STACK_ENTRY_POINT EntryPoint
,
614 IN VOID
*Context1
, OPTIONAL
615 IN VOID
*Context2
, OPTIONAL
620 Disables the 32-bit paging mode on the CPU.
622 Disables the 32-bit paging mode on the CPU and returns to 32-bit protected
623 mode. This function assumes the current execution mode is 32-paged protected
624 mode. This function is only available on IA-32. After the 32-bit paging mode
625 is disabled, control is transferred to the function specified by EntryPoint
626 using the new stack specified by NewStack and passing in the parameters
627 specified by Context1 and Context2. Context1 and Context2 are optional and
628 may be NULL. The function EntryPoint must never return.
630 There are a number of constraints that must be followed before calling this
632 1) Interrupts must be disabled.
633 2) The caller must be in 32-bit paged mode.
634 3) CR0, CR3, and CR4 must be compatible with 32-bit paged mode.
635 4) CR3 must point to valid page tables that guarantee that the pages for
636 this function and the stack are identity mapped.
638 @param EntryPoint A pointer to function to call with the new stack after
640 @param Context1 A pointer to the context to pass into the EntryPoint
641 function as the first parameter after paging is disabled.
642 @param Context2 A pointer to the context to pass into the EntryPoint
643 function as the second parameter after paging is
645 @param NewStack A pointer to the new stack to use for the EntryPoint
646 function after paging is disabled.
651 InternalX86DisablePaging32 (
652 IN SWITCH_STACK_ENTRY_POINT EntryPoint
,
653 IN VOID
*Context1
, OPTIONAL
654 IN VOID
*Context2
, OPTIONAL
659 Enables the 64-bit paging mode on the CPU.
661 Enables the 64-bit paging mode on the CPU. CR0, CR3, CR4, and the page tables
662 must be properly initialized prior to calling this service. This function
663 assumes the current execution mode is 32-bit protected mode with flat
664 descriptors. This function is only available on IA-32. After the 64-bit
665 paging mode is enabled, control is transferred to the function specified by
666 EntryPoint using the new stack specified by NewStack and passing in the
667 parameters specified by Context1 and Context2. Context1 and Context2 are
668 optional and may be 0. The function EntryPoint must never return.
670 @param Cs The 16-bit selector to load in the CS before EntryPoint
671 is called. The descriptor in the GDT that this selector
672 references must be setup for long mode.
673 @param EntryPoint The 64-bit virtual address of the function to call with
674 the new stack after paging is enabled.
675 @param Context1 The 64-bit virtual address of the context to pass into
676 the EntryPoint function as the first parameter after
678 @param Context2 The 64-bit virtual address of the context to pass into
679 the EntryPoint function as the second parameter after
681 @param NewStack The 64-bit virtual address of the new stack to use for
682 the EntryPoint function after paging is enabled.
687 InternalX86EnablePaging64 (
689 IN UINT64 EntryPoint
,
690 IN UINT64 Context1
, OPTIONAL
691 IN UINT64 Context2
, OPTIONAL
696 Disables the 64-bit paging mode on the CPU.
698 Disables the 64-bit paging mode on the CPU and returns to 32-bit protected
699 mode. This function assumes the current execution mode is 64-paging mode.
700 This function is only available on x64. After the 64-bit paging mode is
701 disabled, control is transferred to the function specified by EntryPoint
702 using the new stack specified by NewStack and passing in the parameters
703 specified by Context1 and Context2. Context1 and Context2 are optional and
704 may be 0. The function EntryPoint must never return.
706 @param Cs The 16-bit selector to load in the CS before EntryPoint
707 is called. The descriptor in the GDT that this selector
708 references must be setup for 32-bit protected mode.
709 @param EntryPoint The 64-bit virtual address of the function to call with
710 the new stack after paging is disabled.
711 @param Context1 The 64-bit virtual address of the context to pass into
712 the EntryPoint function as the first parameter after
714 @param Context2 The 64-bit virtual address of the context to pass into
715 the EntryPoint function as the second parameter after
717 @param NewStack The 64-bit virtual address of the new stack to use for
718 the EntryPoint function after paging is disabled.
723 InternalX86DisablePaging64 (
725 IN UINT32 EntryPoint
,
726 IN UINT32 Context1
, OPTIONAL
727 IN UINT32 Context2
, OPTIONAL
732 #elif defined (MDE_CPU_IPF)
735 // IPF specific functions
739 // Structure definition for look up table.
743 UINT64 (*Function
) (VOID
);
748 Reads control register DCR.
750 This is a worker function for AsmReadControlRegister()
751 when its parameter Index is IPF_CONTROL_REGISTER_DCR
753 @return The 64-bit control register DCR.
758 AsmReadControlRegisterDcr (
764 Reads control register ITM.
766 This is a worker function for AsmReadControlRegister()
767 when its parameter Index is IPF_CONTROL_REGISTER_ITM
769 @return The 64-bit control register ITM.
774 AsmReadControlRegisterItm (
780 Reads control register IVA.
782 This is a worker function for AsmReadControlRegister()
783 when its parameter Index is IPF_CONTROL_REGISTER_IVA
785 @return The 64-bit control register IVA.
790 AsmReadControlRegisterIva (
796 Reads control register PTA.
798 This is a worker function for AsmReadControlRegister()
799 when its parameter Index is IPF_CONTROL_REGISTER_PTA
801 @return The 64-bit control register PTA.
806 AsmReadControlRegisterPta (
812 Reads control register IPSR.
814 This is a worker function for AsmReadControlRegister()
815 when its parameter Index is IPF_CONTROL_REGISTER_IPSR
817 @return The 64-bit control register IPSR.
822 AsmReadControlRegisterIpsr (
828 Reads control register ISR.
830 This is a worker function for AsmReadControlRegister()
831 when its parameter Index is IPF_CONTROL_REGISTER_ISR
833 @return The 64-bit control register ISR.
838 AsmReadControlRegisterIsr (
844 Reads control register IIP.
846 This is a worker function for AsmReadControlRegister()
847 when its parameter Index is IPF_CONTROL_REGISTER_IIP
849 @return The 64-bit control register IIP.
854 AsmReadControlRegisterIip (
860 Reads control register IFA.
862 This is a worker function for AsmReadControlRegister()
863 when its parameter Index is IPF_CONTROL_REGISTER_IFA
865 @return The 64-bit control register IFA.
870 AsmReadControlRegisterIfa (
876 Reads control register ITIR.
878 This is a worker function for AsmReadControlRegister()
879 when its parameter Index is IPF_CONTROL_REGISTER_ITIR
881 @return The 64-bit control register ITIR.
886 AsmReadControlRegisterItir (
892 Reads control register IIPA.
894 This is a worker function for AsmReadControlRegister()
895 when its parameter Index is IPF_CONTROL_REGISTER_IIPA
897 @return The 64-bit control register IIPA.
902 AsmReadControlRegisterIipa (
908 Reads control register IFS.
910 This is a worker function for AsmReadControlRegister()
911 when its parameter Index is IPF_CONTROL_REGISTER_IFS
913 @return The 64-bit control register IFS.
918 AsmReadControlRegisterIfs (
924 Reads control register IIM.
926 This is a worker function for AsmReadControlRegister()
927 when its parameter Index is IPF_CONTROL_REGISTER_IIM
929 @return The 64-bit control register IIM.
934 AsmReadControlRegisterIim (
940 Reads control register IHA.
942 This is a worker function for AsmReadControlRegister()
943 when its parameter Index is IPF_CONTROL_REGISTER_IHA
945 @return The 64-bit control register IHA.
950 AsmReadControlRegisterIha (
956 Reads control register LID.
958 This is a worker function for AsmReadControlRegister()
959 when its parameter Index is IPF_CONTROL_REGISTER_LID
961 @return The 64-bit control register LID.
966 AsmReadControlRegisterLid (
972 Reads control register IVR.
974 This is a worker function for AsmReadControlRegister()
975 when its parameter Index is IPF_CONTROL_REGISTER_IVR
977 @return The 64-bit control register IVR.
982 AsmReadControlRegisterIvr (
988 Reads control register TPR.
990 This is a worker function for AsmReadControlRegister()
991 when its parameter Index is IPF_CONTROL_REGISTER_TPR
993 @return The 64-bit control register TPR.
998 AsmReadControlRegisterTpr (
1004 Reads control register EOI.
1006 This is a worker function for AsmReadControlRegister()
1007 when its parameter Index is IPF_CONTROL_REGISTER_EOI
1009 @return The 64-bit control register EOI.
1014 AsmReadControlRegisterEoi (
1020 Reads control register IRR0.
1022 This is a worker function for AsmReadControlRegister()
1023 when its parameter Index is IPF_CONTROL_REGISTER_IRR0
1025 @return The 64-bit control register IRR0.
1030 AsmReadControlRegisterIrr0 (
1036 Reads control register IRR1.
1038 This is a worker function for AsmReadControlRegister()
1039 when its parameter Index is IPF_CONTROL_REGISTER_IRR1
1041 @return The 64-bit control register IRR1.
1046 AsmReadControlRegisterIrr1 (
1052 Reads control register IRR2.
1054 This is a worker function for AsmReadControlRegister()
1055 when its parameter Index is IPF_CONTROL_REGISTER_IRR2
1057 @return The 64-bit control register IRR2.
1062 AsmReadControlRegisterIrr2 (
1068 Reads control register IRR3.
1070 This is a worker function for AsmReadControlRegister()
1071 when its parameter Index is IPF_CONTROL_REGISTER_IRR3
1073 @return The 64-bit control register IRR3.
1078 AsmReadControlRegisterIrr3 (
1084 Reads control register ITV.
1086 This is a worker function for AsmReadControlRegister()
1087 when its parameter Index is IPF_CONTROL_REGISTER_ITV
1089 @return The 64-bit control register ITV.
1094 AsmReadControlRegisterItv (
1100 Reads control register PMV.
1102 This is a worker function for AsmReadControlRegister()
1103 when its parameter Index is IPF_CONTROL_REGISTER_PMV
1105 @return The 64-bit control register PMV.
1110 AsmReadControlRegisterPmv (
1116 Reads control register CMCV.
1118 This is a worker function for AsmReadControlRegister()
1119 when its parameter Index is IPF_CONTROL_REGISTER_CMCV
1121 @return The 64-bit control register CMCV.
1126 AsmReadControlRegisterCmcv (
1132 Reads control register LRR0.
1134 This is a worker function for AsmReadControlRegister()
1135 when its parameter Index is IPF_CONTROL_REGISTER_LRR0
1137 @return The 64-bit control register LRR0.
1142 AsmReadControlRegisterLrr0 (
1148 Reads control register LRR1.
1150 This is a worker function for AsmReadControlRegister()
1151 when its parameter Index is IPF_CONTROL_REGISTER_LRR1
1153 @return The 64-bit control register LRR1.
1158 AsmReadControlRegisterLrr1 (
1164 Reads application register K0.
1166 This is a worker function for AsmReadApplicationRegister()
1167 when its parameter Index is IPF_APPLICATION_REGISTER_K0
1169 @return The 64-bit application register K0.
1174 AsmReadApplicationRegisterK0 (
1181 Reads application register K1.
1183 This is a worker function for AsmReadApplicationRegister()
1184 when its parameter Index is IPF_APPLICATION_REGISTER_K1
1186 @return The 64-bit application register K1.
1191 AsmReadApplicationRegisterK1 (
1197 Reads application register K2.
1199 This is a worker function for AsmReadApplicationRegister()
1200 when its parameter Index is IPF_APPLICATION_REGISTER_K2
1202 @return The 64-bit application register K2.
1207 AsmReadApplicationRegisterK2 (
1213 Reads application register K3.
1215 This is a worker function for AsmReadApplicationRegister()
1216 when its parameter Index is IPF_APPLICATION_REGISTER_K3
1218 @return The 64-bit application register K3.
1223 AsmReadApplicationRegisterK3 (
1229 Reads application register K4.
1231 This is a worker function for AsmReadApplicationRegister()
1232 when its parameter Index is IPF_APPLICATION_REGISTER_K4
1234 @return The 64-bit application register K4.
1239 AsmReadApplicationRegisterK4 (
1245 Reads application register K5.
1247 This is a worker function for AsmReadApplicationRegister()
1248 when its parameter Index is IPF_APPLICATION_REGISTER_K5
1250 @return The 64-bit application register K5.
1255 AsmReadApplicationRegisterK5 (
1261 Reads application register K6.
1263 This is a worker function for AsmReadApplicationRegister()
1264 when its parameter Index is IPF_APPLICATION_REGISTER_K6
1266 @return The 64-bit application register K6.
1271 AsmReadApplicationRegisterK6 (
1277 Reads application register K7.
1279 This is a worker function for AsmReadApplicationRegister()
1280 when its parameter Index is IPF_APPLICATION_REGISTER_K7
1282 @return The 64-bit application register K7.
1287 AsmReadApplicationRegisterK7 (
1293 Reads application register RSC.
1295 This is a worker function for AsmReadApplicationRegister()
1296 when its parameter Index is IPF_APPLICATION_REGISTER_RSC
1298 @return The 64-bit application register RSC.
1303 AsmReadApplicationRegisterRsc (
1309 Reads application register BSP.
1311 This is a worker function for AsmReadApplicationRegister()
1312 when its parameter Index is IPF_APPLICATION_REGISTER_BSP
1314 @return The 64-bit application register BSP.
1319 AsmReadApplicationRegisterBsp (
1325 Reads application register BSPSTORE.
1327 This is a worker function for AsmReadApplicationRegister()
1328 when its parameter Index is IPF_APPLICATION_REGISTER_BSPSTORE
1330 @return The 64-bit application register BSPSTORE.
1335 AsmReadApplicationRegisterBspstore (
1341 Reads application register RNAT.
1343 This is a worker function for AsmReadApplicationRegister()
1344 when its parameter Index is IPF_APPLICATION_REGISTER_RNAT
1346 @return The 64-bit application register RNAT.
1351 AsmReadApplicationRegisterRnat (
1357 Reads application register FCR.
1359 This is a worker function for AsmReadApplicationRegister()
1360 when its parameter Index is IPF_APPLICATION_REGISTER_FCR
1362 @return The 64-bit application register FCR.
1367 AsmReadApplicationRegisterFcr (
1373 Reads application register EFLAG.
1375 This is a worker function for AsmReadApplicationRegister()
1376 when its parameter Index is IPF_APPLICATION_REGISTER_EFLAG
1378 @return The 64-bit application register EFLAG.
1383 AsmReadApplicationRegisterEflag (
1389 Reads application register CSD.
1391 This is a worker function for AsmReadApplicationRegister()
1392 when its parameter Index is IPF_APPLICATION_REGISTER_CSD
1394 @return The 64-bit application register CSD.
1399 AsmReadApplicationRegisterCsd (
1405 Reads application register SSD.
1407 This is a worker function for AsmReadApplicationRegister()
1408 when its parameter Index is IPF_APPLICATION_REGISTER_SSD
1410 @return The 64-bit application register SSD.
1415 AsmReadApplicationRegisterSsd (
1421 Reads application register CFLG.
1423 This is a worker function for AsmReadApplicationRegister()
1424 when its parameter Index is IPF_APPLICATION_REGISTER_CFLG
1426 @return The 64-bit application register CFLG.
1431 AsmReadApplicationRegisterCflg (
1437 Reads application register FSR.
1439 This is a worker function for AsmReadApplicationRegister()
1440 when its parameter Index is IPF_APPLICATION_REGISTER_FSR
1442 @return The 64-bit application register FSR.
1447 AsmReadApplicationRegisterFsr (
1453 Reads application register FIR.
1455 This is a worker function for AsmReadApplicationRegister()
1456 when its parameter Index is IPF_APPLICATION_REGISTER_FIR
1458 @return The 64-bit application register FIR.
1463 AsmReadApplicationRegisterFir (
1469 Reads application register FDR.
1471 This is a worker function for AsmReadApplicationRegister()
1472 when its parameter Index is IPF_APPLICATION_REGISTER_FDR
1474 @return The 64-bit application register FDR.
1479 AsmReadApplicationRegisterFdr (
1485 Reads application register CCV.
1487 This is a worker function for AsmReadApplicationRegister()
1488 when its parameter Index is IPF_APPLICATION_REGISTER_CCV
1490 @return The 64-bit application register CCV.
1495 AsmReadApplicationRegisterCcv (
1501 Reads application register UNAT.
1503 This is a worker function for AsmReadApplicationRegister()
1504 when its parameter Index is IPF_APPLICATION_REGISTER_UNAT
1506 @return The 64-bit application register UNAT.
1511 AsmReadApplicationRegisterUnat (
1517 Reads application register FPSR.
1519 This is a worker function for AsmReadApplicationRegister()
1520 when its parameter Index is IPF_APPLICATION_REGISTER_FPSR
1522 @return The 64-bit application register FPSR.
1527 AsmReadApplicationRegisterFpsr (
1533 Reads application register ITC.
1535 This is a worker function for AsmReadApplicationRegister()
1536 when its parameter Index is IPF_APPLICATION_REGISTER_ITC
1538 @return The 64-bit application register ITC.
1543 AsmReadApplicationRegisterItc (
1549 Reads application register PFS.
1551 This is a worker function for AsmReadApplicationRegister()
1552 when its parameter Index is IPF_APPLICATION_REGISTER_PFS
1554 @return The 64-bit application register PFS.
1559 AsmReadApplicationRegisterPfs (
1565 Reads application register LC.
1567 This is a worker function for AsmReadApplicationRegister()
1568 when its parameter Index is IPF_APPLICATION_REGISTER_LC
1570 @return The 64-bit application register LC.
1575 AsmReadApplicationRegisterLc (
1581 Reads application register EC.
1583 This is a worker function for AsmReadApplicationRegister()
1584 when its parameter Index is IPF_APPLICATION_REGISTER_EC
1586 @return The 64-bit application register EC.
1591 AsmReadApplicationRegisterEc (
1598 Transfers control to a function starting with a new stack.
1600 Transfers control to the function specified by EntryPoint using the new stack
1601 specified by NewStack and passing in the parameters specified by Context1 and
1602 Context2. Context1 and Context2 are optional and may be NULL. The function
1603 EntryPoint must never return.
1605 If EntryPoint is NULL, then ASSERT().
1606 If NewStack is NULL, then ASSERT().
1608 @param EntryPoint A pointer to function to call with the new stack.
1609 @param Context1 A pointer to the context to pass into the EntryPoint
1611 @param Context2 A pointer to the context to pass into the EntryPoint
1613 @param NewStack A pointer to the new stack to use for the EntryPoint
1615 @param NewBsp A pointer to the new memory location for RSE backing
1621 AsmSwitchStackAndBackingStore (
1622 IN SWITCH_STACK_ENTRY_POINT EntryPoint
,
1623 IN VOID
*Context1
, OPTIONAL
1624 IN VOID
*Context2
, OPTIONAL