• Koby Elbaz's avatar
    habanalabs/gaudi: use scratchpad regs instead of GIC controller · 8121736b
    Koby Elbaz authored
    Due to new security restrictions, GIC controller can no
    longer be accessed from user/kernel.
    To monitor that, a new status bit will be read from preboot
    caps, indicating whether direct access to GIC is blocked.
    
    In case it is blocked, driver will use scratchpad registers
    instead of using GIC interface on two main scenarios:
    The first of which LKD triggers interrupts to F/W through GIC,
    and the second of when LKD configures all engines/QMANs
    to write to GIC when they want to report an error.
    
    From F/W perspective, it will poll on all SPs, and once IRQ
    number is retrieved, SP register is cleared, and it will perform the
    write to the GIC to trigger the IRQ handler.
    Signed-off-by: default avatarKoby Elbaz <kelbaz@habana.ai>
    Reviewed-by: default avatarOded Gabbay <ogabbay@kernel.org>
    Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
    8121736b
gaudi.c 258 KB