Enabling various self-hosted debug models

Application debugging

To enable application debugging, set MDCR_EL2.TDE to 0, which enables the exceptions from EL0 and EL1 to be handled at EL1. This means that the debugger is installed at EL1. The following diagram shows application debugging:

Kernel debugging

To enable kernel debugging, set MDCR_EL2.TDE to 0, which enables the exceptions from EL0 and EL1 to be handled at EL1. This means that the debugger is installed at EL1. In addition, set MDSCR_EL1.KDE to 1, to enable debug exceptions from EL1.

The following diagram shows kernel debugging:

OS debugging

To enable OS debugging, set MDCR_EL2.TDE to 1, which enables the exceptions from EL0 and EL1 to be handled at EL2. This means that the debugger is installed at EL2. The following diagram shows OS debugging:

Hypervisor debugging

To enable hypervisor debugging, set MDCR_EL2.TDE to 1, which enables the exceptions from EL0 and EL1 to be handled at EL2. This means that the debugger is installed at EL2. In addition, set MDSCR_EL1.KDE to 1, which enables debug exceptions from EL2.

The following diagram shows hypervisor debugging:

Debug exceptions cannot be routed to EL3.

Previous Next