New trap handler ABI (v5)

Park the wave, if it is stopped, to avoid halting it at an s_endpgm
instruction if the architecture does not support it.

Free ttmp6 by converting the dispatch_ptr into a queue packet index
(25-bit) and storing it in ttmp7[24:0].

Save the exception PC in ttmp11[22:7] ttmp6[31:0].

Change-Id: Iaa3c5baf5b488c0b534044d338f12bffa63ddce2
Cette révision appartient à :
Laurent Morichetti
2021-03-03 15:10:55 -08:00
révisé par Laurent Morichetti
Parent 7e0f391a08
révision ea6ee0aa81
2 fichiers modifiés avec 140 ajouts et 90 suppressions
+2 -1
Voir le fichier
@@ -77,7 +77,8 @@ __attribute__((noinline)) static void _loader_debug_state() {
// 2: New trap handler ABI. The reason for halting a wave is recorded in ttmp11[8:7].
// 3: New trap handler ABI. A wave halted at S_ENDPGM rewinds its PC by 8 bytes, and sets ttmp11[9]=1.
// 4: New trap handler ABI. Save the trap id in ttmp11[16:9]
HSA_API r_debug _amdgpu_r_debug = {4,
// 5: New trap handler ABI. Save the PC in ttmp11[22:7] ttmp6[31:0], and park the wave if stopped
HSA_API r_debug _amdgpu_r_debug = {5,
nullptr,
reinterpret_cast<uintptr_t>(&_loader_debug_state),
r_debug::RT_CONSISTENT,