• Jay Cornwall's avatar
    drm/amdkfd: Fix lost single step exceptions in gfx9 trap handler · 7c2eaf5c
    Jay Cornwall authored
    If the trap is entered due to MODE.DEBUG_EN=1 and SAVECTX is raised
    concurrently the handler cannot identify the source of the exception.
    This causes the debugger to lose single step exception notification
    when a context save request arrives at the same time.
    
    When MODE.DEBUG_EN=1 and STATUS.HALT=0 (exception not already handled)
    jump to the second-level trap handler upon entering the trap. The
    second-level trap will set STATUS.HALT=1 and return to the shader.
    If SAVECTX was raised then control flow will return to the trap, which
    will then handle the context save request.
    
    Cc: Tony Tye <tony.tye@amd.com>
    Cc: Laurent Morichetti <laurent.morichetti@amd.com>
    Cc: Qingchuan Shi <qingchuan.shi@amd.com>
    Signed-off-by: default avatarJay Cornwall <jay.cornwall@amd.com>
    Reviewed-by: default avatarLaurent Morichetti <laurent.morichetti@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    7c2eaf5c
cwsr_trap_handler_gfx9.asm 62.2 KB