#[repr(C)]pub struct DebugSupport { /* private fields */ }
Expand description
The debugging support protocol allows debuggers to connect to a UEFI machine. It is expected that there will typically be two instances of the EFI Debug Support protocol in the system. One associated with the native processor instruction set (IA-32, x64, ARM, RISC-V, or Itanium processor family), and one for the EFI virtual machine that implements EFI byte code (EBC). While multiple instances of the EFI Debug Support protocol are expected, there must never be more than one for any given instruction set.
NOTE: OVMF only implements this protocol interface for the virtual EBC processor
Implementations
Returns the processor architecture of the running CPU.
Returns the maximum value that may be used for the processor_index parameter in
register_periodic_callback()
and register_exception_callback()
.
Note: Applications built with EDK2 (such as OVMF) always return 0
as of 2021-09-15
pub unsafe fn register_periodic_callback(
&mut self,
processor_index: usize,
callback: Option<unsafe extern "efiapi" fn(_: SystemContext)>
) -> Result
pub unsafe fn register_periodic_callback(
&mut self,
processor_index: usize,
callback: Option<unsafe extern "efiapi" fn(_: SystemContext)>
) -> Result
Registers a function to be called back periodically in interrupt context.
Pass None
for callback
to deregister the currently registered function for
a specified processor_index
. Will return Status::INVALID_PARAMETER
if
processor_index
exceeds the current maximum from Self::get_maximum_processor_index
.
Note: Applications built with EDK2 (such as OVMF) ignore the processor_index
parameter
Safety
No portion of the debug agent that runs in interrupt context may make any calls to EFI services or other protocol interfaces.
pub unsafe fn register_exception_callback(
&mut self,
processor_index: usize,
callback: Option<unsafe extern "efiapi" fn(_: ExceptionType, _: SystemContext)>,
exception_type: ExceptionType
) -> Result
pub unsafe fn register_exception_callback(
&mut self,
processor_index: usize,
callback: Option<unsafe extern "efiapi" fn(_: ExceptionType, _: SystemContext)>,
exception_type: ExceptionType
) -> Result
Registers a function to be called when a given processor exception occurs.
Pass None
for callback
to deregister the currently registered function for a
given exception_type
and processor_index
. Will return Status::INVALID_PARAMETER
if processor_index
exceeds the current maximum from Self::get_maximum_processor_index
.
Note: Applications built with EDK2 (such as OVMF) ignore the processor_index
parameter
Safety
No portion of the debug agent that runs in interrupt context may make any calls to EFI services or other protocol interfaces.
Invalidates processor instruction cache for a memory range for a given processor_index
.
Note: Applications built with EDK2 (such as OVMF) ignore the processor_index
parameter
Safety
start
must be a c_void ptr to a valid memory address