iPXE
DebugSupport.h
Go to the documentation of this file.
1 /** @file
2  DebugSupport protocol and supporting definitions as defined in the UEFI2.4
3  specification.
4 
5  The DebugSupport protocol is used by source level debuggers to abstract the
6  processor and handle context save and restore operations.
7 
8 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
9 Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>
10 Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
11 
12 SPDX-License-Identifier: BSD-2-Clause-Patent
13 
14 **/
15 
16 #ifndef __DEBUG_SUPPORT_H__
17 #define __DEBUG_SUPPORT_H__
18 
19 FILE_LICENCE ( BSD2_PATENT );
20 
22 
24 
25 ///
26 /// Debug Support protocol {2755590C-6F3C-42FA-9EA4-A3BA543CDA25}.
27 ///
28 #define EFI_DEBUG_SUPPORT_PROTOCOL_GUID \
29  { \
30  0x2755590C, 0x6F3C, 0x42FA, {0x9E, 0xA4, 0xA3, 0xBA, 0x54, 0x3C, 0xDA, 0x25 } \
31  }
32 
33 ///
34 /// Processor exception to be hooked.
35 /// All exception types for IA32, X64, Itanium and EBC processors are defined.
36 ///
38 
39 ///
40 /// IA-32 processor exception types.
41 ///
42 #define EXCEPT_IA32_DIVIDE_ERROR 0
43 #define EXCEPT_IA32_DEBUG 1
44 #define EXCEPT_IA32_NMI 2
45 #define EXCEPT_IA32_BREAKPOINT 3
46 #define EXCEPT_IA32_OVERFLOW 4
47 #define EXCEPT_IA32_BOUND 5
48 #define EXCEPT_IA32_INVALID_OPCODE 6
49 #define EXCEPT_IA32_DOUBLE_FAULT 8
50 #define EXCEPT_IA32_INVALID_TSS 10
51 #define EXCEPT_IA32_SEG_NOT_PRESENT 11
52 #define EXCEPT_IA32_STACK_FAULT 12
53 #define EXCEPT_IA32_GP_FAULT 13
54 #define EXCEPT_IA32_PAGE_FAULT 14
55 #define EXCEPT_IA32_FP_ERROR 16
56 #define EXCEPT_IA32_ALIGNMENT_CHECK 17
57 #define EXCEPT_IA32_MACHINE_CHECK 18
58 #define EXCEPT_IA32_SIMD 19
59 
60 ///
61 /// FXSAVE_STATE.
62 /// FP / MMX / XMM registers (see fxrstor instruction definition).
63 ///
64 typedef struct {
74  UINT8 Reserved2[10];
75  UINT8 St0Mm0[10], Reserved3[6];
76  UINT8 St1Mm1[10], Reserved4[6];
77  UINT8 St2Mm2[10], Reserved5[6];
78  UINT8 St3Mm3[10], Reserved6[6];
79  UINT8 St4Mm4[10], Reserved7[6];
80  UINT8 St5Mm5[10], Reserved8[6];
81  UINT8 St6Mm6[10], Reserved9[6];
82  UINT8 St7Mm7[10], Reserved10[6];
83  UINT8 Xmm0[16];
84  UINT8 Xmm1[16];
85  UINT8 Xmm2[16];
86  UINT8 Xmm3[16];
87  UINT8 Xmm4[16];
88  UINT8 Xmm5[16];
89  UINT8 Xmm6[16];
90  UINT8 Xmm7[16];
91  UINT8 Reserved11[14 * 16];
93 
94 ///
95 /// IA-32 processor context definition.
96 ///
97 typedef struct {
107  UINT32 Cr1; /* Reserved */
114  UINT32 Gdtr[2];
115  UINT32 Idtr[2];
132 
133 ///
134 /// x64 processor exception types.
135 ///
136 #define EXCEPT_X64_DIVIDE_ERROR 0
137 #define EXCEPT_X64_DEBUG 1
138 #define EXCEPT_X64_NMI 2
139 #define EXCEPT_X64_BREAKPOINT 3
140 #define EXCEPT_X64_OVERFLOW 4
141 #define EXCEPT_X64_BOUND 5
142 #define EXCEPT_X64_INVALID_OPCODE 6
143 #define EXCEPT_X64_DOUBLE_FAULT 8
144 #define EXCEPT_X64_INVALID_TSS 10
145 #define EXCEPT_X64_SEG_NOT_PRESENT 11
146 #define EXCEPT_X64_STACK_FAULT 12
147 #define EXCEPT_X64_GP_FAULT 13
148 #define EXCEPT_X64_PAGE_FAULT 14
149 #define EXCEPT_X64_FP_ERROR 16
150 #define EXCEPT_X64_ALIGNMENT_CHECK 17
151 #define EXCEPT_X64_MACHINE_CHECK 18
152 #define EXCEPT_X64_SIMD 19
153 
154 ///
155 /// FXSAVE_STATE.
156 /// FP / MMX / XMM registers (see fxrstor instruction definition).
157 ///
158 typedef struct {
165  UINT8 Reserved1[8];
166  UINT8 St0Mm0[10], Reserved2[6];
167  UINT8 St1Mm1[10], Reserved3[6];
168  UINT8 St2Mm2[10], Reserved4[6];
169  UINT8 St3Mm3[10], Reserved5[6];
170  UINT8 St4Mm4[10], Reserved6[6];
171  UINT8 St5Mm5[10], Reserved7[6];
172  UINT8 St6Mm6[10], Reserved8[6];
173  UINT8 St7Mm7[10], Reserved9[6];
174  UINT8 Xmm0[16];
175  UINT8 Xmm1[16];
176  UINT8 Xmm2[16];
177  UINT8 Xmm3[16];
178  UINT8 Xmm4[16];
179  UINT8 Xmm5[16];
180  UINT8 Xmm6[16];
181  UINT8 Xmm7[16];
182  //
183  // NOTE: UEFI 2.0 spec definition as follows.
184  //
185  UINT8 Reserved11[14 * 16];
187 
188 ///
189 /// x64 processor context definition.
190 ///
191 typedef struct {
201  UINT64 Cr1; /* Reserved */
209  UINT64 Gdtr[2];
210  UINT64 Idtr[2];
235 
236 ///
237 /// Itanium Processor Family Exception types.
238 ///
239 #define EXCEPT_IPF_VHTP_TRANSLATION 0
240 #define EXCEPT_IPF_INSTRUCTION_TLB 1
241 #define EXCEPT_IPF_DATA_TLB 2
242 #define EXCEPT_IPF_ALT_INSTRUCTION_TLB 3
243 #define EXCEPT_IPF_ALT_DATA_TLB 4
244 #define EXCEPT_IPF_DATA_NESTED_TLB 5
245 #define EXCEPT_IPF_INSTRUCTION_KEY_MISSED 6
246 #define EXCEPT_IPF_DATA_KEY_MISSED 7
247 #define EXCEPT_IPF_DIRTY_BIT 8
248 #define EXCEPT_IPF_INSTRUCTION_ACCESS_BIT 9
249 #define EXCEPT_IPF_DATA_ACCESS_BIT 10
250 #define EXCEPT_IPF_BREAKPOINT 11
251 #define EXCEPT_IPF_EXTERNAL_INTERRUPT 12
252 //
253 // 13 - 19 reserved
254 //
255 #define EXCEPT_IPF_PAGE_NOT_PRESENT 20
256 #define EXCEPT_IPF_KEY_PERMISSION 21
257 #define EXCEPT_IPF_INSTRUCTION_ACCESS_RIGHTS 22
258 #define EXCEPT_IPF_DATA_ACCESS_RIGHTS 23
259 #define EXCEPT_IPF_GENERAL_EXCEPTION 24
260 #define EXCEPT_IPF_DISABLED_FP_REGISTER 25
261 #define EXCEPT_IPF_NAT_CONSUMPTION 26
262 #define EXCEPT_IPF_SPECULATION 27
263 //
264 // 28 reserved
265 //
266 #define EXCEPT_IPF_DEBUG 29
267 #define EXCEPT_IPF_UNALIGNED_REFERENCE 30
268 #define EXCEPT_IPF_UNSUPPORTED_DATA_REFERENCE 31
269 #define EXCEPT_IPF_FP_FAULT 32
270 #define EXCEPT_IPF_FP_TRAP 33
271 #define EXCEPT_IPF_LOWER_PRIVILEGE_TRANSFER_TRAP 34
272 #define EXCEPT_IPF_TAKEN_BRANCH 35
273 #define EXCEPT_IPF_SINGLE_STEP 36
274 //
275 // 37 - 44 reserved
276 //
277 #define EXCEPT_IPF_IA32_EXCEPTION 45
278 #define EXCEPT_IPF_IA32_INTERCEPT 46
279 #define EXCEPT_IPF_IA32_INTERRUPT 47
280 
281 ///
282 /// IPF processor context definition.
283 ///
284 typedef struct {
285  //
286  // The first reserved field is necessary to preserve alignment for the correct
287  // bits in UNAT and to insure F2 is 16 byte aligned.
288  //
321 
322  UINT64 F2[2];
323  UINT64 F3[2];
324  UINT64 F4[2];
325  UINT64 F5[2];
326  UINT64 F6[2];
327  UINT64 F7[2];
328  UINT64 F8[2];
329  UINT64 F9[2];
330  UINT64 F10[2];
331  UINT64 F11[2];
332  UINT64 F12[2];
333  UINT64 F13[2];
334  UINT64 F14[2];
335  UINT64 F15[2];
336  UINT64 F16[2];
337  UINT64 F17[2];
338  UINT64 F18[2];
339  UINT64 F19[2];
340  UINT64 F20[2];
341  UINT64 F21[2];
342  UINT64 F22[2];
343  UINT64 F23[2];
344  UINT64 F24[2];
345  UINT64 F25[2];
346  UINT64 F26[2];
347  UINT64 F27[2];
348  UINT64 F28[2];
349  UINT64 F29[2];
350  UINT64 F30[2];
351  UINT64 F31[2];
352 
354 
363 
364  //
365  // application registers
366  //
371 
373 
381 
383 
385 
387 
391 
392  //
393  // control registers
394  //
408 
409  //
410  // debug registers
411  //
420 
429 
430  //
431  // virtual registers - nat bits for R1-R31
432  //
435 
436 ///
437 /// EBC processor exception types.
438 ///
439 #define EXCEPT_EBC_UNDEFINED 0
440 #define EXCEPT_EBC_DIVIDE_ERROR 1
441 #define EXCEPT_EBC_DEBUG 2
442 #define EXCEPT_EBC_BREAKPOINT 3
443 #define EXCEPT_EBC_OVERFLOW 4
444 #define EXCEPT_EBC_INVALID_OPCODE 5 ///< Opcode out of range.
445 #define EXCEPT_EBC_STACK_FAULT 6
446 #define EXCEPT_EBC_ALIGNMENT_CHECK 7
447 #define EXCEPT_EBC_INSTRUCTION_ENCODING 8 ///< Malformed instruction.
448 #define EXCEPT_EBC_BAD_BREAK 9 ///< BREAK 0 or undefined BREAK.
449 #define EXCEPT_EBC_STEP 10 ///< To support debug stepping.
450 ///
451 /// For coding convenience, define the maximum valid EBC exception.
452 ///
453 #define MAX_EBC_EXCEPTION EXCEPT_EBC_STEP
454 
455 ///
456 /// EBC processor context definition.
457 ///
458 typedef struct {
471 
472 ///
473 /// ARM processor exception types.
474 ///
475 #define EXCEPT_ARM_RESET 0
476 #define EXCEPT_ARM_UNDEFINED_INSTRUCTION 1
477 #define EXCEPT_ARM_SOFTWARE_INTERRUPT 2
478 #define EXCEPT_ARM_PREFETCH_ABORT 3
479 #define EXCEPT_ARM_DATA_ABORT 4
480 #define EXCEPT_ARM_RESERVED 5
481 #define EXCEPT_ARM_IRQ 6
482 #define EXCEPT_ARM_FIQ 7
483 
484 ///
485 /// For coding convenience, define the maximum valid ARM exception.
486 ///
487 #define MAX_ARM_EXCEPTION EXCEPT_ARM_FIQ
488 
489 ///
490 /// ARM processor context definition.
491 ///
492 typedef struct {
515 
516 ///
517 /// AARCH64 processor exception types.
518 ///
519 #define EXCEPT_AARCH64_SYNCHRONOUS_EXCEPTIONS 0
520 #define EXCEPT_AARCH64_IRQ 1
521 #define EXCEPT_AARCH64_FIQ 2
522 #define EXCEPT_AARCH64_SERROR 3
523 
524 ///
525 /// For coding convenience, define the maximum valid ARM exception.
526 ///
527 #define MAX_AARCH64_EXCEPTION EXCEPT_AARCH64_SERROR
528 
529 typedef struct {
530  // General Purpose Registers
560  UINT64 FP; // x29 - Frame pointer
561  UINT64 LR; // x30 - Link Register
562  UINT64 SP; // x31 - Stack pointer
563 
564  // FP/SIMD Registers
565  UINT64 V0[2];
566  UINT64 V1[2];
567  UINT64 V2[2];
568  UINT64 V3[2];
569  UINT64 V4[2];
570  UINT64 V5[2];
571  UINT64 V6[2];
572  UINT64 V7[2];
573  UINT64 V8[2];
574  UINT64 V9[2];
575  UINT64 V10[2];
576  UINT64 V11[2];
577  UINT64 V12[2];
578  UINT64 V13[2];
579  UINT64 V14[2];
580  UINT64 V15[2];
581  UINT64 V16[2];
582  UINT64 V17[2];
583  UINT64 V18[2];
584  UINT64 V19[2];
585  UINT64 V20[2];
586  UINT64 V21[2];
587  UINT64 V22[2];
588  UINT64 V23[2];
589  UINT64 V24[2];
590  UINT64 V25[2];
591  UINT64 V26[2];
592  UINT64 V27[2];
593  UINT64 V28[2];
594  UINT64 V29[2];
595  UINT64 V30[2];
596  UINT64 V31[2];
597 
598  UINT64 ELR; // Exception Link Register
599  UINT64 SPSR; // Saved Processor Status Register
600  UINT64 FPSR; // Floating Point Status Register
601  UINT64 ESR; // Exception syndrome register
602  UINT64 FAR; // Fault Address Register
604 
605 ///
606 /// RISC-V processor exception types.
607 ///
608 #define EXCEPT_RISCV_INST_MISALIGNED 0
609 #define EXCEPT_RISCV_INST_ACCESS_FAULT 1
610 #define EXCEPT_RISCV_ILLEGAL_INST 2
611 #define EXCEPT_RISCV_BREAKPOINT 3
612 #define EXCEPT_RISCV_LOAD_ADDRESS_MISALIGNED 4
613 #define EXCEPT_RISCV_LOAD_ACCESS_FAULT 5
614 #define EXCEPT_RISCV_STORE_AMO_ADDRESS_MISALIGNED 6
615 #define EXCEPT_RISCV_STORE_AMO_ACCESS_FAULT 7
616 #define EXCEPT_RISCV_ENV_CALL_FROM_UMODE 8
617 #define EXCEPT_RISCV_ENV_CALL_FROM_SMODE 9
618 #define EXCEPT_RISCV_ENV_CALL_FROM_VS_MODE 10
619 #define EXCEPT_RISCV_ENV_CALL_FROM_MMODE 11
620 #define EXCEPT_RISCV_INST_ACCESS_PAGE_FAULT 12
621 #define EXCEPT_RISCV_LOAD_ACCESS_PAGE_FAULT 13
622 #define EXCEPT_RISCV_14 14
623 #define EXCEPT_RISCV_STORE_ACCESS_PAGE_FAULT 15
624 #define EXCEPT_RISCV_16 16
625 #define EXCEPT_RISCV_17 17
626 #define EXCEPT_RISCV_18 18
627 #define EXCEPT_RISCV_19 19
628 #define EXCEPT_RISCV_INST_GUEST_PAGE_FAULT 20
629 #define EXCEPT_RISCV_LOAD_GUEST_PAGE_FAULT 21
630 #define EXCEPT_RISCV_VIRTUAL_INSTRUCTION 22
631 #define EXCEPT_RISCV_STORE_GUEST_PAGE_FAULT 23
632 #define EXCEPT_RISCV_MAX_EXCEPTIONS (EXCEPT_RISCV_STORE_GUEST_PAGE_FAULT)
633 
634 ///
635 /// RISC-V processor exception types for interrupts.
636 ///
637 #define EXCEPT_RISCV_IS_IRQ(x) ((x & 0x8000000000000000UL) != 0)
638 #define EXCEPT_RISCV_IRQ_INDEX(x) (x & 0x7FFFFFFFFFFFFFFFUL)
639 #define EXCEPT_RISCV_IRQ_0 0x8000000000000000UL
640 #define EXCEPT_RISCV_IRQ_SOFT_FROM_SMODE 0x8000000000000001UL
641 #define EXCEPT_RISCV_IRQ_SOFT_FROM_VSMODE 0x8000000000000002UL
642 #define EXCEPT_RISCV_IRQ_SOFT_FROM_MMODE 0x8000000000000003UL
643 #define EXCEPT_RISCV_IRQ_4 0x8000000000000004UL
644 #define EXCEPT_RISCV_IRQ_TIMER_FROM_SMODE 0x8000000000000005UL
645 #define EXCEPT_RISCV_MAX_IRQS (EXCEPT_RISCV_IRQ_INDEX(EXCEPT_RISCV_IRQ_TIMER_FROM_SMODE))
646 
647 typedef struct {
684 
685 //
686 // LoongArch processor exception types.
687 //
688 // The exception types is located in the CSR ESTAT
689 // register offset 16 bits, width 6 bits.
690 //
691 // If you want to register an exception hook, you can
692 // shfit the number left by 16 bits, and the exception
693 // handler will know the types.
694 //
695 // For example:
696 // mCpu->CpuRegisterInterruptHandler (
697 // mCpu,
698 // (EXCEPT_LOONGARCH_PPI << CSR_ESTAT_EXC_SHIFT),
699 // PpiExceptionHandler
700 // );
701 //
702 #define EXCEPT_LOONGARCH_INT 0
703 #define EXCEPT_LOONGARCH_PIL 1
704 #define EXCEPT_LOONGARCH_PIS 2
705 #define EXCEPT_LOONGARCH_PIF 3
706 #define EXCEPT_LOONGARCH_PME 4
707 #define EXCEPT_LOONGARCH_PNR 5
708 #define EXCEPT_LOONGARCH_PNX 6
709 #define EXCEPT_LOONGARCH_PPI 7
710 #define EXCEPT_LOONGARCH_ADE 8
711 #define EXCEPT_LOONGARCH_ALE 9
712 #define EXCEPT_LOONGARCH_BCE 10
713 #define EXCEPT_LOONGARCH_SYS 11
714 #define EXCEPT_LOONGARCH_BRK 12
715 #define EXCEPT_LOONGARCH_INE 13
716 #define EXCEPT_LOONGARCH_IPE 14
717 #define EXCEPT_LOONGARCH_FPD 15
718 #define EXCEPT_LOONGARCH_SXD 16
719 #define EXCEPT_LOONGARCH_ASXD 17
720 #define EXCEPT_LOONGARCH_FPE 18
721 #define EXCEPT_LOONGARCH_TBR 64 // For code only, there is no such type in the ISA spec, the TLB refill is defined for an independent exception.
722 
723 //
724 // LoongArch processor Interrupt types.
725 //
726 #define EXCEPT_LOONGARCH_INT_SIP0 0
727 #define EXCEPT_LOONGARCH_INT_SIP1 1
728 #define EXCEPT_LOONGARCH_INT_IP0 2
729 #define EXCEPT_LOONGARCH_INT_IP1 3
730 #define EXCEPT_LOONGARCH_INT_IP2 4
731 #define EXCEPT_LOONGARCH_INT_IP3 5
732 #define EXCEPT_LOONGARCH_INT_IP4 6
733 #define EXCEPT_LOONGARCH_INT_IP5 7
734 #define EXCEPT_LOONGARCH_INT_IP6 8
735 #define EXCEPT_LOONGARCH_INT_IP7 9
736 #define EXCEPT_LOONGARCH_INT_PMC 10
737 #define EXCEPT_LOONGARCH_INT_TIMER 11
738 #define EXCEPT_LOONGARCH_INT_IPI 12
739 
740 //
741 // For coding convenience, define the maximum valid
742 // LoongArch interrupt.
743 //
744 #define MAX_LOONGARCH_INTERRUPT 14
745 
746 typedef struct {
779 
780  UINT64 CRMD; // CuRrent MoDe information
781  UINT64 PRMD; // PRe-exception MoDe information
782  UINT64 EUEN; // Extended component Unit ENable
783  UINT64 MISC; // MISCellaneous controller
784  UINT64 ECFG; // Exception ConFiGuration
785  UINT64 ESTAT; // Exception STATus
786  UINT64 ERA; // Exception Return Address
787  UINT64 BADV; // BAD Virtual address
788  UINT64 BADI; // BAD Instruction
790 
791 ///
792 /// Universal EFI_SYSTEM_CONTEXT definition.
793 ///
794 typedef union {
804 
805 //
806 // DebugSupport callback function prototypes
807 //
808 
809 /**
810  Registers and enables an exception callback function for the specified exception.
811 
812  @param ExceptionType Exception types in EBC, IA-32, x64, or IPF.
813  @param SystemContext Exception content.
814 
815 **/
816 typedef
817 VOID
819  IN EFI_EXCEPTION_TYPE ExceptionType,
820  IN OUT EFI_SYSTEM_CONTEXT SystemContext
821  );
822 
823 /**
824  Registers and enables the on-target debug agent's periodic entry point.
825 
826  @param SystemContext Exception content.
827 
828 **/
829 typedef
830 VOID
832  IN OUT EFI_SYSTEM_CONTEXT SystemContext
833  );
834 
835 ///
836 /// Machine type definition
837 ///
838 typedef enum {
846 
847 //
848 // DebugSupport member function definitions
849 //
850 
851 /**
852  Returns the maximum value that may be used for the ProcessorIndex parameter in
853  RegisterPeriodicCallback() and RegisterExceptionCallback().
854 
855  @param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance.
856  @param MaxProcessorIndex Pointer to a caller-allocated UINTN in which the maximum supported
857  processor index is returned.
858 
859  @retval EFI_SUCCESS The function completed successfully.
860 
861 **/
862 typedef
866  OUT UINTN *MaxProcessorIndex
867  );
868 
869 /**
870  Registers a function to be called back periodically in interrupt context.
871 
872  @param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance.
873  @param ProcessorIndex Specifies which processor the callback function applies to.
874  @param PeriodicCallback A pointer to a function of type PERIODIC_CALLBACK that is the main
875  periodic entry point of the debug agent.
876 
877  @retval EFI_SUCCESS The function completed successfully.
878  @retval EFI_ALREADY_STARTED Non-NULL PeriodicCallback parameter when a callback
879  function was previously registered.
880  @retval EFI_OUT_OF_RESOURCES System has insufficient memory resources to register new callback
881  function.
882 
883 **/
884 typedef
888  IN UINTN ProcessorIndex,
889  IN EFI_PERIODIC_CALLBACK PeriodicCallback
890  );
891 
892 /**
893  Registers a function to be called when a given processor exception occurs.
894 
895  @param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance.
896  @param ProcessorIndex Specifies which processor the callback function applies to.
897  @param ExceptionCallback A pointer to a function of type EXCEPTION_CALLBACK that is called
898  when the processor exception specified by ExceptionType occurs.
899  @param ExceptionType Specifies which processor exception to hook.
900 
901  @retval EFI_SUCCESS The function completed successfully.
902  @retval EFI_ALREADY_STARTED Non-NULL PeriodicCallback parameter when a callback
903  function was previously registered.
904  @retval EFI_OUT_OF_RESOURCES System has insufficient memory resources to register new callback
905  function.
906 
907 **/
908 typedef
912  IN UINTN ProcessorIndex,
913  IN EFI_EXCEPTION_CALLBACK ExceptionCallback,
914  IN EFI_EXCEPTION_TYPE ExceptionType
915  );
916 
917 /**
918  Invalidates processor instruction cache for a memory range. Subsequent execution in this range
919  causes a fresh memory fetch to retrieve code to be executed.
920 
921  @param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance.
922  @param ProcessorIndex Specifies which processor's instruction cache is to be invalidated.
923  @param Start Specifies the physical base of the memory range to be invalidated.
924  @param Length Specifies the minimum number of bytes in the processor's instruction
925  cache to invalidate.
926 
927  @retval EFI_SUCCESS The function completed successfully.
928 
929 **/
930 typedef
934  IN UINTN ProcessorIndex,
935  IN VOID *Start,
937  );
938 
939 ///
940 /// This protocol provides the services to allow the debug agent to register
941 /// callback functions that are called either periodically or when specific
942 /// processor exceptions occur.
943 ///
945  ///
946  /// Declares the processor architecture for this instance of the EFI Debug Support protocol.
947  ///
953 };
954 
956 
957 #endif
EFI_INSTRUCTION_SET_ARCHITECTURE
Machine type definition.
Definition: DebugSupport.h:838
VOID(EFIAPI * EFI_PERIODIC_CALLBACK)(IN OUT EFI_SYSTEM_CONTEXT SystemContext)
Registers and enables the on-target debug agent's periodic entry point.
Definition: DebugSupport.h:831
EFI_SYSTEM_CONTEXT_RISCV64 * SystemContextRiscV64
Definition: DebugSupport.h:801
128 bit buffer containing a unique identifier value.
Definition: Base.h:215
EFI_INSTRUCTION_SET_ARCHITECTURE Isa
Declares the processor architecture for this instance of the EFI Debug Support protocol.
Definition: DebugSupport.h:948
EFI_SYSTEM_CONTEXT_IPF * SystemContextIpf
Definition: DebugSupport.h:798
INT64 INTN
Signed value of native width.
EFI_SYSTEM_CONTEXT_IA32 * SystemContextIa32
Definition: DebugSupport.h:796
EFI_SYSTEM_CONTEXT_AARCH64 * SystemContextAArch64
Definition: DebugSupport.h:800
EFI_SYSTEM_CONTEXT_X64 * SystemContextX64
Definition: DebugSupport.h:797
unsigned int UINT32
Definition: ProcessorBind.h:98
UINT8 Length
Definition: Acpi10.h:134
INTN EFI_EXCEPTION_TYPE
Processor exception to be hooked.
Definition: DebugSupport.h:37
unsigned char UINT8
EFI_SYSTEM_CONTEXT_ARM * SystemContextArm
Definition: DebugSupport.h:799
FILE_LICENCE(BSD2_PATENT)
EFI_REGISTER_EXCEPTION_CALLBACK RegisterExceptionCallback
Definition: DebugSupport.h:951
EFI_FX_SAVE_STATE_X64 FxSaveState
Definition: DebugSupport.h:193
0x8664
Definition: DebugSupport.h:840
EFI_FX_SAVE_STATE_IA32 FxSaveState
Definition: DebugSupport.h:99
#define OUT
Definition: mlx_utils.h:29
EFI_STATUS(EFIAPI * EFI_REGISTER_EXCEPTION_CALLBACK)(IN EFI_DEBUG_SUPPORT_PROTOCOL *This, IN UINTN ProcessorIndex, IN EFI_EXCEPTION_CALLBACK ExceptionCallback, IN EFI_EXCEPTION_TYPE ExceptionType)
Registers a function to be called when a given processor exception occurs.
Definition: DebugSupport.h:910
Universal EFI_SYSTEM_CONTEXT definition.
Definition: DebugSupport.h:794
#define IMAGE_FILE_MACHINE_X64
Definition: PeImage.h:38
EFI_GET_MAXIMUM_PROCESSOR_INDEX GetMaximumProcessorIndex
Definition: DebugSupport.h:949
ARM processor context definition.
Definition: DebugSupport.h:492
unsigned short UINT16
#define EFIAPI
IPF processor context definition.
Definition: DebugSupport.h:284
EFI_STATUS(EFIAPI * EFI_GET_MAXIMUM_PROCESSOR_INDEX)(IN EFI_DEBUG_SUPPORT_PROTOCOL *This, OUT UINTN *MaxProcessorIndex)
Returns the maximum value that may be used for the ProcessorIndex parameter in RegisterPeriodicCallba...
Definition: DebugSupport.h:864
#define IMAGE_FILE_MACHINE_ARM64
Definition: PeImage.h:40
UINT64 UINTN
Unsigned value of native width.
EFI image format for PE32, PE32+ and TE.
0x01c2
Definition: DebugSupport.h:843
#define VOID
Undeclared type.
Definition: Base.h:271
unsigned long long UINT64
Definition: ProcessorBind.h:96
0x0EBC
Definition: DebugSupport.h:842
x64 processor context definition.
Definition: DebugSupport.h:191
0x0200
Definition: DebugSupport.h:841
#define IN
Definition: mlx_utils.h:28
#define IMAGE_FILE_MACHINE_IA64
Definition: PeImage.h:36
EFI_REGISTER_PERIODIC_CALLBACK RegisterPeriodicCallback
Definition: DebugSupport.h:950
EFI_SYSTEM_CONTEXT_EBC * SystemContextEbc
Definition: DebugSupport.h:795
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
Definition: UefiBaseType.h:31
IA-32 processor context definition.
Definition: DebugSupport.h:97
EFI_STATUS(EFIAPI * EFI_INVALIDATE_INSTRUCTION_CACHE)(IN EFI_DEBUG_SUPPORT_PROTOCOL *This, IN UINTN ProcessorIndex, IN VOID *Start, IN UINT64 Length)
Invalidates processor instruction cache for a memory range.
Definition: DebugSupport.h:932
#define IMAGE_FILE_MACHINE_I386
Definition: PeImage.h:35
EBC processor context definition.
Definition: DebugSupport.h:458
EFI_SYSTEM_CONTEXT_LOONGARCH64 * SystemContextLoongArch64
Definition: DebugSupport.h:802
#define IMAGE_FILE_MACHINE_EBC
Definition: PeImage.h:37
VOID(EFIAPI * EFI_EXCEPTION_CALLBACK)(IN EFI_EXCEPTION_TYPE ExceptionType, IN OUT EFI_SYSTEM_CONTEXT SystemContext)
Registers and enables an exception callback function for the specified exception.
Definition: DebugSupport.h:818
EFI_STATUS(EFIAPI * EFI_REGISTER_PERIODIC_CALLBACK)(IN EFI_DEBUG_SUPPORT_PROTOCOL *This, IN UINTN ProcessorIndex, IN EFI_PERIODIC_CALLBACK PeriodicCallback)
Registers a function to be called back periodically in interrupt context.
Definition: DebugSupport.h:886
EFI_GUID gEfiDebugSupportProtocolGuid
EFI_INVALIDATE_INSTRUCTION_CACHE InvalidateInstructionCache
Definition: DebugSupport.h:952
#define IMAGE_FILE_MACHINE_ARMTHUMB_MIXED
Definition: PeImage.h:39
This protocol provides the services to allow the debug agent to register callback functions that are ...
Definition: DebugSupport.h:944
0x014C
Definition: DebugSupport.h:839