Kbase driver support, U-Boot PD negotiation compatibility - #2
Open
Simon-Hostettler wants to merge 13 commits into
Open
Conversation
irq.c: A VFIO inspired IRQ router that forwards physical GPU
IRQs as virtual IRQS into the CVM.
gpu_poweron.c: Setup code from panthor driver to power on MMIO registers.
The actual driver runs inside the CVM (we dont passthrough
the power controller so we enable the GPU beforehand).
- We implement demo_ioremap_ns_realm() that creates stage-2 page mappings for mmio in the CVM (using RMM). We keep the mappings hypervisor-shared to reuse vanilla rmi_rtt_map_unprotected APIs. This keeps MMIO hypervisor shared and demonstrates device prototyping on opencca. - We identity page map reserved physical memory into CVM. This is needed because GPU on RK3588 does not have an SMMU for GPU.
Carve out some physical memory for which we assume IPA = PA in CVM, so GPU can DMA into CVM memory, despite not having an SMMU.
…ssthrough
When running the panthor driver inside the CVM, ensure
the NS-shared bit is set in the page protection, so we access it through
the NS IPA space. This is necessary because we map the GPU as
hypervisor-shared for the sake of the demo.
We further add workarounds in swiotlb to mark the GPU device
(70000000.gpu) as trusted to bypass bounce buffer restrictions
imposed by CCA CVM.
For this, the GPU device is marked with demo-disable-swiotlb
device tree property to skip swiotlb force bounce for device.
Sample CVM device tree for GPU (see corresponding commit in kvmtool)
gpuclk {
compatible = "fixed-clock";
clock-frequency = <0x2faf0800>;
#clock-cells = <0x00>;
phandle = <0x1234>;
};
regulator-gpu {
phandle = <0x1235>;
compatible = "regulator-fixed";
regulator-name = "vdd_gpu";
regulator-min-microvolt = <0xcf850>;
regulator-max-microvolt = <0xcf850>;
regulator-always-on;
regulator-boot-on;
};
gpu_opp_table {
compatible = "operating-points-v2";
phandle = <0x1236>;
opp-800mhz {
opp-hz = <0x00 0x2faf0800>;
opp-microvolt = <0xcf850>;
};
};
gpu@70000000 {
compatible = "rockchip,rk3588-mali\0arm,mali-valhall";
reg = <0x00 0x70000000 0x00 0x200000>;
interrupts = <0x00 0x05 0x04 0x00 0x04 0x04 0x00 0x06 0x04>;
clocks = <0x1234>;
mali-supply = <0x1235>;
clock-names = "core";
operating-points-v2 = <0x1236>;
interrupt-names = "job\0mmu\0gpu";
demo-disable-swiotlb; <-- this
};
Chore commit, no functional change
…rockchip 6.1. Includes full drivers/gpu/arm, SoC helpers (pvtm, opp_select, system_monitor, rockchip_sip), associated headers (memory_group_manager, protected_memory_allocator, wakelock, version_compat_defs ...)
…, system_monitor), update board DTS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OPENCCA_DEMO)drivers/gpu/arm) + wiring into build