On Tue, Dec 10, 2024 at 05:52:27PM -0500, Connor Abbott wrote: > On Mon, Dec 9, 2024 at 3:20 AM Akhil P Oommen <quic_akhilpo@xxxxxxxxxxx> wrote: > > > > When kernel is booted in EL2, SECVID registers are accessible to the > > KMD. So we can use that to switch GPU's secure mode to avoid dependency > > on Zap firmware. Also, we can't load a secure firmware without a > > hypervisor that supports it. > > > > Tested following configurations on sa8775p chipset (Adreno 663 gpu): > > > > 1. Gunyah (No KVM) - Loads zap shader based on DT > > 2. KVM in VHE - Skips zap shader load and programs SECVID register > > 3. KVM in nVHE - Loads zap shader based on DT > > 4. Kernel in EL2 with CONFIG_KVM=n - Skips zap shader load and > > programs SECVID register > > > > For (1) and (3) configuration, this patch doesn't have any impact. > > Driver loads secure firmware based on other existing hints. > > > > Signed-off-by: Akhil P Oommen <quic_akhilpo@xxxxxxxxxxx> > > For initializing CX_MISC_SW_FUSE_VALUE in a7xx_cx_mem_init(), we used > !qcom_scm_is_available() to assume that the register is writable > instead - can you just do that? > qcom_scm_is_avaialble() returns true as most of the QC TZ firmware API works w/ kernel running as bare metal i.e booted with EL2. Any services that assume QC firmware @ EL2 (QHEE) is absent. Thanks, Pavan