This commit implements the body of SELFOUR-499. The API exposes the x86 DR0-7
and ARM coprocessor 14 features to userspace by virtualizing them as context-
switched registers in the TCB. Implemented as TCB invocations. This feature is
only built when CONFIG_HARDWARE_DEBUG_API is selected.
* Add low-level support routines for setting, unsetting, getting, enabling
and disabling breakpoints.
* Add support for single-stepping as well.
^ Single-stepping is not supported on ARMv6 since the hardware
doesn't have support.
^ ARM implements single-stepping as instruction breakpoints
configured to fault on every instruction -- this is achieved through
the "mismatch" mode, which is only supported from ARMv7 onwards.
* Also support explicit software break requests, a la "BKPT" and "INT $3".
* New invocations:
* seL4_TCB_SetBreakpoint().
* seL4_TCB_GetBreakpoint().
* seL4_TCB_UnsetBreakpoint().
* seL4_TCB_ConfigureSingleStepping().
* New constants:
^ Event types:
^ seL4_InstructionBreakpoint.
^ seL4_DataBreakpoint.
^ seL4_SoftwareBreakRequest.
^ Access types:
^ seL4_BreakOnRead.
^ seL4_BreakOnWrite.
^ seL4_BreakOnReadWrite.
^ Exports:
^ seL4_NumHWBreakpoints.
^ seL4_NumExclusiveBreakpoints.
^ seL4_NumExclusiveWatchpoints.
^ seL4_NumDualFunctionMonitors.
^ seL4_FirstBreakpoint.
^ seL4_FirstWatchpoint.
^ seL4_FirstDualFunctionMonitor.
See documentation in the seL4 API manual.
185 lines
8.5 KiB
XML
185 lines
8.5 KiB
XML
<?xml version="1.0" ?>
|
|
<!--
|
|
Copyright 2014, NICTA
|
|
|
|
This software may be distributed and modified according to the terms of
|
|
the BSD 2-Clause license. Note that NO WARRANTY is provided.
|
|
See "LICENSE_BSD2.txt" for details.
|
|
|
|
@TAG(NICTA_BSD)
|
|
-->
|
|
<api>
|
|
<interface name="seL4_Untyped">
|
|
<method id="UntypedRetype" name="Retype">
|
|
<param dir="in" name="type" type="seL4_Word"/>
|
|
<param dir="in" name="size_bits" type="seL4_Word"/>
|
|
<param dir="in" name="root" type="seL4_CNode"/>
|
|
<param dir="in" name="node_index" type="seL4_Word"/>
|
|
<param dir="in" name="node_depth" type="seL4_Word"/>
|
|
<param dir="in" name="node_offset" type="seL4_Word"/>
|
|
<param dir="in" name="num_objects" type="seL4_Word"/>
|
|
</method>
|
|
</interface>
|
|
<interface name="seL4_TCB">
|
|
<method id="TCBReadRegisters" name="ReadRegisters">
|
|
<param dir="in" name="suspend_source" type="seL4_Bool"/>
|
|
<param dir="in" name="arch_flags" type="seL4_Uint8"/>
|
|
<param dir="in" name="count" type="seL4_Word"/>
|
|
<param dir="out" name="regs" type="seL4_UserContext"/>
|
|
</method>
|
|
<method id="TCBWriteRegisters" name="WriteRegisters">
|
|
<param dir="in" name="resume_target" type="seL4_Bool"/>
|
|
<param dir="in" name="arch_flags" type="seL4_Uint8"/>
|
|
<param dir="in" name="count" type="seL4_Word"/>
|
|
<param dir="in" name="regs" type="seL4_UserContext"/>
|
|
</method>
|
|
<method id="TCBCopyRegisters" name="CopyRegisters">
|
|
<param dir="in" name="source" type="seL4_TCB"/>
|
|
<param dir="in" name="suspend_source" type="seL4_Bool"/>
|
|
<param dir="in" name="resume_target" type="seL4_Bool"/>
|
|
<param dir="in" name="transfer_frame" type="seL4_Bool"/>
|
|
<param dir="in" name="transfer_integer" type="seL4_Bool"/>
|
|
<param dir="in" name="arch_flags" type="seL4_Uint8"/>
|
|
</method>
|
|
<method id="TCBConfigure" name="Configure">
|
|
<param dir="in" name="fault_ep" type="seL4_Word"/>
|
|
<param dir="in" name="priority" type="seL4_PrioProps_t"/>
|
|
<param dir="in" name="cspace_root" type="seL4_CNode"/>
|
|
<param dir="in" name="cspace_root_data" type="seL4_CapData_t"/>
|
|
<param dir="in" name="vspace_root" type="seL4_CNode"/>
|
|
<param dir="in" name="vspace_root_data" type="seL4_CapData_t"/>
|
|
<param dir="in" name="buffer" type="seL4_Word"/>
|
|
<param dir="in" name="bufferFrame" type="seL4_CPtr"/>
|
|
</method>
|
|
<method id="TCBSetPriority" name="SetPriority">
|
|
<param dir="in" name="priority" type="seL4_Uint8"/>
|
|
</method>
|
|
<method id="TCBSetMCPriority" name="SetMCPriority">
|
|
<param dir="in" name="mcc" type="seL4_Uint8"/>
|
|
</method>
|
|
<method id="TCBSetIPCBuffer" name="SetIPCBuffer">
|
|
<param dir="in" name="buffer" type="seL4_Word"/>
|
|
<param dir="in" name="bufferFrame" type="seL4_CPtr"/>
|
|
</method>
|
|
<method id="TCBSetSpace" name="SetSpace">
|
|
<param dir="in" name="fault_ep" type="seL4_Word"/>
|
|
<param dir="in" name="cspace_root" type="seL4_CNode"/>
|
|
<param dir="in" name="cspace_root_data" type="seL4_CapData_t"/>
|
|
<param dir="in" name="vspace_root" type="seL4_CNode"/>
|
|
<param dir="in" name="vspace_root_data" type="seL4_CapData_t"/>
|
|
</method>
|
|
<method id="TCBSuspend" name="Suspend"/>
|
|
<method id="TCBResume" name="Resume"/>
|
|
<method id="TCBBindNotification" name="BindNotification">
|
|
<param dir="in" name="notification" type="seL4_CPtr"/>
|
|
</method>
|
|
<method id="TCBUnbindNotification" name="UnbindNotification">
|
|
</method>
|
|
<method id="TCBSetBreakpoint" name="SetBreakpoint" config="CONFIG_HARDWARE_DEBUG_API">
|
|
<param dir="in" name="bp_num" type="seL4_Uint16"/>
|
|
<param dir="in" name="vaddr" type="seL4_Word"/>
|
|
<param dir="in" name="type" type="seL4_Word"/>
|
|
<param dir="in" name="size" type="seL4_Word"/>
|
|
<param dir="in" name="rw" type="seL4_Word"/>
|
|
</method>
|
|
<method id="TCBGetBreakpoint" name="GetBreakpoint" config="CONFIG_HARDWARE_DEBUG_API">
|
|
<param dir="in" name="bp_num" type="seL4_Uint16"/>
|
|
<param dir="out" name="vaddr" type="seL4_Word"/>
|
|
<param dir="out" name="type" type="seL4_Word"/>
|
|
<param dir="out" name="size" type="seL4_Word"/>
|
|
<param dir="out" name="rw" type="seL4_Word"/>
|
|
<param dir="out" name="is_enabled" type="seL4_Bool"/>
|
|
</method>
|
|
<method id="TCBUnsetBreakpoint" name="UnsetBreakpoint" config="CONFIG_HARDWARE_DEBUG_API">
|
|
<param dir="in" name="bp_num" type="seL4_Uint16"/>
|
|
</method>
|
|
<method id="TCBConfigureSingleStepping" name="ConfigureSingleStepping" config="CONFIG_HARDWARE_DEBUG_API">
|
|
<param dir="in" name="bp_num" type="seL4_Uint16"/>
|
|
<param dir="in" name="num_instructions" type="seL4_Word"/>
|
|
<param dir="out" name="bp_was_consumed" type="seL4_Bool"/>
|
|
</method>
|
|
</interface>
|
|
<interface name="seL4_CNode">
|
|
<method id="CNodeRevoke" name="Revoke">
|
|
<param dir="in" name="index" type="seL4_Word"/>
|
|
<param dir="in" name="depth" type="seL4_Uint8"/>
|
|
</method>
|
|
<method id="CNodeDelete" name="Delete">
|
|
<param dir="in" name="index" type="seL4_Word"/>
|
|
<param dir="in" name="depth" type="seL4_Uint8"/>
|
|
</method>
|
|
<method id="CNodeRecycle" name="Recycle">
|
|
<param dir="in" name="index" type="seL4_Word"/>
|
|
<param dir="in" name="depth" type="seL4_Uint8"/>
|
|
</method>
|
|
<method id="CNodeCopy" name="Copy">
|
|
<param dir="in" name="dest_index" type="seL4_Word"/>
|
|
<param dir="in" name="dest_depth" type="seL4_Uint8"/>
|
|
<param dir="in" name="src_root" type="seL4_CNode"/>
|
|
<param dir="in" name="src_index" type="seL4_Word"/>
|
|
<param dir="in" name="src_depth" type="seL4_Uint8"/>
|
|
<param dir="in" name="rights" type="seL4_CapRights"/>
|
|
</method>
|
|
<method id="CNodeMint" name="Mint">
|
|
<param dir="in" name="dest_index" type="seL4_Word"/>
|
|
<param dir="in" name="dest_depth" type="seL4_Uint8"/>
|
|
<param dir="in" name="src_root" type="seL4_CNode"/>
|
|
<param dir="in" name="src_index" type="seL4_Word"/>
|
|
<param dir="in" name="src_depth" type="seL4_Uint8"/>
|
|
<param dir="in" name="rights" type="seL4_CapRights"/>
|
|
<param dir="in" name="badge" type="seL4_CapData_t"/>
|
|
</method>
|
|
<method id="CNodeMove" name="Move">
|
|
<param dir="in" name="dest_index" type="seL4_Word"/>
|
|
<param dir="in" name="dest_depth" type="seL4_Uint8"/>
|
|
<param dir="in" name="src_root" type="seL4_CNode"/>
|
|
<param dir="in" name="src_index" type="seL4_Word"/>
|
|
<param dir="in" name="src_depth" type="seL4_Uint8"/>
|
|
</method>
|
|
<method id="CNodeMutate" name="Mutate">
|
|
<param dir="in" name="dest_index" type="seL4_Word"/>
|
|
<param dir="in" name="dest_depth" type="seL4_Uint8"/>
|
|
<param dir="in" name="src_root" type="seL4_CNode"/>
|
|
<param dir="in" name="src_index" type="seL4_Word"/>
|
|
<param dir="in" name="src_depth" type="seL4_Uint8"/>
|
|
<param dir="in" name="badge" type="seL4_CapData_t"/>
|
|
</method>
|
|
<method id="CNodeRotate" name="Rotate">
|
|
<param dir="in" name="dest_index" type="seL4_Word"/>
|
|
<param dir="in" name="dest_depth" type="seL4_Uint8"/>
|
|
<param dir="in" name="dest_badge" type="seL4_CapData_t"/>
|
|
<param dir="in" name="pivot_root" type="seL4_CNode"/>
|
|
<param dir="in" name="pivot_index" type="seL4_Word"/>
|
|
<param dir="in" name="pivot_depth" type="seL4_Uint8"/>
|
|
<param dir="in" name="pivot_badge" type="seL4_CapData_t"/>
|
|
<param dir="in" name="src_root" type="seL4_CNode"/>
|
|
<param dir="in" name="src_index" type="seL4_Word"/>
|
|
<param dir="in" name="src_depth" type="seL4_Uint8"/>
|
|
</method>
|
|
<method id="CNodeSaveCaller" name="SaveCaller">
|
|
<param dir="in" name="index" type="seL4_Word"/>
|
|
<param dir="in" name="depth" type="seL4_Uint8"/>
|
|
</method>
|
|
</interface>
|
|
<interface name="seL4_IRQControl">
|
|
<method id="IRQIssueIRQHandler" name="Get">
|
|
<param dir="in" name="irq" type="int"/>
|
|
<param dir="in" name="root" type="seL4_CNode"/>
|
|
<param dir="in" name="index" type="seL4_Word"/>
|
|
<param dir="in" name="depth" type="seL4_Uint8"/>
|
|
</method>
|
|
</interface>
|
|
<interface name="seL4_IRQHandler">
|
|
<method id="IRQAckIRQ" name="Ack"/>
|
|
<method id="IRQSetIRQHandler" name="SetNotification">
|
|
<param dir="in" name="notification" type="seL4_CPtr"/>
|
|
</method>
|
|
<method id="IRQClearIRQHandler" name="Clear"/>
|
|
</interface>
|
|
<interface name="seL4_DomainSet">
|
|
<method id="DomainSetSet" name="Set">
|
|
<param dir="in" name="domain" type="seL4_Uint8"/>
|
|
<param dir="in" name="thread" type="seL4_TCB"/>
|
|
</method>
|
|
</interface>
|
|
</api>
|