Message ID | 20250503-sc-el2-overlays-v2-0-24e9b4572e15@trvn.ru |
---|---|
Headers | show |
Series | arm64: dts: qcom: Add EL2 overlays for WoA devices | expand |
On Sat, 03 May 2025 15:39:27 +0500, Nikita Travkin wrote: > WoA devices use firmware very similar to android, which means that Linux > has to run in EL1 due to the presence of Qualcomm's hypervisor (QHEE or > Gunyah). However Windows can replace that hypervisor using Secure-Launch > flow. > > More recently the same approach became possible to be used to boot Linux > in EL2 on those devices, thanks to a tool called slbounce[1]. > > [...] Applied, thanks! [1/5] arm64: dts: qcom: sc7180: Add EL2 overlay for WoA devices commit: 0d95f64be4176fc98bcc2b4558239800ee93bf32 [2/5] arm64: dts: qcom: sc8280xp: Add PCIe IOMMU commit: 8a401135001c65203f3fd210d482bc7eae1bfc56 [3/5] arm64: dts: qcom: sc8280xp: Add EL2 overlay for WoA devices commit: 263780f3189730f2efa511181c3970384e54afde [4/5] arm64: dts: qcom: x1e80100: Add PCIe IOMMU commit: 428f95f41f3024a8378bb4c4803fe269fcacaa85 [5/5] arm64: dts: qcom: x1e/x1p: Add EL2 overlay for WoA devices commit: e01acd8f3cc1364b9147d3eb8913fdb935851ecd Best regards,
WoA devices use firmware very similar to android, which means that Linux has to run in EL1 due to the presence of Qualcomm's hypervisor (QHEE or Gunyah). However Windows can replace that hypervisor using Secure-Launch flow. More recently the same approach became possible to be used to boot Linux in EL2 on those devices, thanks to a tool called slbounce[1]. As of now, booting in EL2 comes with some downsides, most notably that DSP remoteprocs (importantly, ADSP) can't be booted as Linux relied on hyp's service to authenticate and launch the firmware. The lack of ADSP results in missing battery/charging and type-c services (alongside with missing sound of course). On the other hand it becomes more clear that running under QHEE/Gunyah /also/ has downsides apart from lacking virtualization support. For example, x1e devices can't use more than 32GiB of ram when running under Gunyah. As booting in EL2 depreves us of QHEE/Gunyah services, some changes to the DT are needed to boot in EL2 correctly: - GPU ZAP shader must be disabled. Linux will zap the gpu itself; - If PCIe is present, SMMUv3 must be enabled and controlled properly; - On x1 devices, hyp-emulated watchdog must be disabled. To make it easier to run WoA devices in EL2, this series introduces per-SoC EL2 overlays and -el2.dtb variants of WoA device DTBs. Ready presence of -el2.dtb-s will allow people to more easily use those devices in EL2, especially as some recent work on fixing ADSP-related limitations (at least on x1e) is already being done and can benefit EL2 case as well. [2] [1] https://github.com/TravMurav/slbounce [2] https://git.codelinaro.org/stephan.gerhold/linux/-/commit/7c2a82017d32a4a0007443680fd0847e7c92d5bb Signed-off-by: Nikita Travkin <nikita@trvn.ru> --- Changes in v2: - Describe pcie its-map which can only be used in el2 on x1 (Marc) - Link to v1: https://lore.kernel.org/r/20250501-sc-el2-overlays-v1-0-9202e59e3348@trvn.ru --- Nikita Travkin (5): arm64: dts: qcom: sc7180: Add EL2 overlay for WoA devices arm64: dts: qcom: sc8280xp: Add PCIe IOMMU arm64: dts: qcom: sc8280xp: Add EL2 overlay for WoA devices arm64: dts: qcom: x1e80100: Add PCIe IOMMU arm64: dts: qcom: x1e/x1p: Add EL2 overlay for WoA devices arch/arm64/boot/dts/qcom/Makefile | 54 ++++++++++++++++++++---------- arch/arm64/boot/dts/qcom/sc7180-el2.dtso | 22 ++++++++++++ arch/arm64/boot/dts/qcom/sc8280xp-el2.dtso | 44 ++++++++++++++++++++++++ arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 14 ++++++++ arch/arm64/boot/dts/qcom/x1-el2.dtso | 52 ++++++++++++++++++++++++++++ arch/arm64/boot/dts/qcom/x1e80100.dtsi | 16 ++++++++- 6 files changed, 183 insertions(+), 19 deletions(-) --- base-commit: 37ff6e9a2ce321b7932d3987701757fb4d87b0e6 change-id: 20250501-sc-el2-overlays-b297325f3729 Best regards,