1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-14 18:45:41 +00:00

4426 Commits

Author SHA1 Message Date
Arnd Bergmann
71a5970259 Arm SCMI fixes for v6.18
This series contains a set of small, focused fixes that address
 robustness and lifecycle issues in the Arm SCMI core and debug support,
 ensuring safer handling of debug initialization failures, correct flag
 management in raw mode, and consistent inflight counter tracking.
 
 Brief summary:
 
  - Fix raw xfer flag clearing
  - Skip RAW debug initialization on failure
  - Make inflight counter helpers null-safe, preventing crashes if debug
    initialization fails
  - Account for failed debug initialization globally
 
 There is no functional change for standard SCMI operation, but these
 fixes improve stability in debug and raw modes, particularly in error
 paths.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEunHlEgbzHrJD3ZPhAEG6vDF+4pgFAmjvtCIACgkQAEG6vDF+
 4phtFw//em6TYEkBTgJVq94ULfLcuzOVRwH+WmhK1VaXKz0jLlzrN6sVEiJnwQA3
 p9gDIJ+TjXozgVZzBa5eZIfeP/BmbPSPtsSGDlvhQl5smT4r/CG7fS17VhFNGx/o
 6DYP8X44Fx3qGuDe3tJiuw9F7IaXmDE03uslD7a9MdtPR2K1KwfD/Y6fXmZbx36B
 M67E48dyWQymE0gDnYupQtUe7+JENDHYXuLySMfAEjk7+Fjis/u5aFXH2aCWAM5P
 PV1VVAq4f8QEs2sI3Lwd45cJsYBu4dEpKTTWEpBc1vASkdFhUIXJ9FUKVvNunwi1
 yW038FsyRsmnc+4Aq7Aj0hAJsyaFEogHMS6zqoTX/0QGjKPdrHgS+CkBNk7OTDyo
 WlBAi4HbInIzYDC8tbo1hiXBvcZzZnPvbFCEpi521W1bJN79hhflC09mNg5uRI+T
 obkmVMjlYq4vH+kY56cfVTVoejG38T3S5UYp97NmmP4/ilxpJ7oeoSLO3vC2IE7F
 GN9mOqHpbwdpN4zN259bepBkrRbySUlPi9MB+HvdBJZqxEbedkuOPtBQUiYA2Opf
 Xcg1WcHEdImrMyjJkYPk92MtWaHpTDZ6WlKe00oK7YJS+qpNaO5uOTvtbtOZsMwW
 MBvrdxBBcmZpZiosjMQPNXHMi/P8UeswLBrjqjzznUnwteOLyUE=
 =2mq1
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmj6kE0ACgkQmmx57+YA
 GNlItw/+KprSMkb+gVY8DgCgMXpku4ObDwryI16UbBxjIVlLlhE0mc58vooY43nz
 NQLZ9GU7rQygVr8mEK0LxWMt7Fm0x8w/omvwgsKuPVifNCGWEvOlEXqJGGLoThGB
 msU3CJDPDo0C3bgXDu9sbQZOxEYMnIwqnBzUuuzHxiftGP14XevSjy/dlCjSRy0K
 DlfIxZaQY0Rwhe5XoH6TLC99QHNRvvP1MmoMyerzTi91Lwvcx98URgZta7N230Me
 R9uQLStxKyBRDIW+Z0uDnCDAltQvy3UHtGd240GS9aK1Cs2tbBQ9G79hHEMfj/us
 N7cgDFZHEHuTk8d71bMSiwmoQLFsmjbAAS6pBUbE3K3WP76w37N7/cIA78WVvG1O
 FcIDM0cTePHimlI9bDF12GJ1tT6punh6NtjBJVGx1NIjo9LFJaTx1rBC/BgQzIY7
 Um1eF76/ciZK3gOnlPRrYSuAEIhoPSxRIgOBlWLCuAZmjW5v/F3SdqNPkZ8i5Oo/
 PkJEIPIT2nFEtvGg34RcRsh/9OtGQi03HM7/iFuc8dCUuJDwj/h7luN5FOCwcQqE
 Cu1eEqWIWiE0rdI4pjmzTXRHqH8LrWk7oTakrvL9WWGdjF72Ceay3Z0disFDPN1c
 85N5mXohiznQsdv+p62DnyW4ZoRn6uOy9YpJjRAN+5PezV5nXDc=
 =12z8
 -----END PGP SIGNATURE-----

Merge tag 'scmi-fixes-6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes

Arm SCMI fixes for v6.18

This series contains a set of small, focused fixes that address
robustness and lifecycle issues in the Arm SCMI core and debug support,
ensuring safer handling of debug initialization failures, correct flag
management in raw mode, and consistent inflight counter tracking.

Brief summary:

 - Fix raw xfer flag clearing
 - Skip RAW debug initialization on failure
 - Make inflight counter helpers null-safe, preventing crashes if debug
   initialization fails
 - Account for failed debug initialization globally

There is no functional change for standard SCMI operation, but these
fixes improve stability in debug and raw modes, particularly in error
paths.

* tag 'scmi-fixes-6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  firmware: arm_scmi: Fix premature SCMI_XFER_FLAG_IS_RAW clearing in raw mode
  firmware: arm_scmi: Skip RAW initialization on failure
  include: trace: Fix inflight count helper on failed initialization
  firmware: arm_scmi: Account for failed debug initialization

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2025-10-23 22:30:01 +02:00
Artem Shimko
20b93a0088 firmware: arm_scmi: Fix premature SCMI_XFER_FLAG_IS_RAW clearing in raw mode
The SCMI_XFER_FLAG_IS_RAW flag was being cleared prematurely in
scmi_xfer_raw_put() before the transfer completion was properly
acknowledged by the raw message handlers.

Move the clearing of SCMI_XFER_FLAG_IS_RAW and SCMI_XFER_FLAG_CHAN_SET
from scmi_xfer_raw_put() to __scmi_xfer_put() to ensure the flags remain
set throughout the entire raw message processing pipeline until the
transfer is returned to the free pool.

Fixes: 3095a3e25d8f ("firmware: arm_scmi: Add xfer helpers to provide raw access")
Suggested-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Artem Shimko <a.shimko.dev@gmail.com>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Message-Id: <20251008091057.1969260-1-a.shimko.dev@gmail.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2025-10-15 15:28:49 +01:00
Cristian Marussi
092b9e2ce6 firmware: arm_scmi: Skip RAW initialization on failure
Avoid attempting to initialize RAW mode when the debug subsystem itself
has failed to initialize, since doing so is pointless and emits
misleading error messages.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Message-Id: <20251014115346.2391418-3-cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2025-10-15 15:28:01 +01:00
Cristian Marussi
289ce7e9a5 include: trace: Fix inflight count helper on failed initialization
Add a check to the scmi_inflight_count() helper to handle the case
when the SCMI debug subsystem fails to initialize.

Fixes: f8e656382b4a ("include: trace:  Add tracepoint support for inflight xfer count")
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Message-Id: <20251014115346.2391418-2-cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2025-10-15 15:26:41 +01:00
Cristian Marussi
2290ab43b9 firmware: arm_scmi: Account for failed debug initialization
When the SCMI debug subsystem fails to initialize, the related debug root
will be missing, and the underlying descriptor will be NULL.

Handle this fault condition in the SCMI debug helpers that maintain
metrics counters.

Fixes: 0b3d48c4726e ("firmware: arm_scmi: Track basic SCMI communication debug metrics")
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Message-Id: <20251014115346.2391418-1-cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2025-10-15 15:24:29 +01:00
Sudeep Holla
11fb1a82ae firmware: arm_ffa: Add support for IMPDEF value in the memory access descriptor
FF-A v1.2 introduced 16 byte IMPLEMENTATION DEFINED value in the endpoint
memory access descriptor to allow any sender could to specify an its any
custom value for each receiver. Also this value must be specified by the
receiver when retrieving the memory region. The sender must ensure it
informs the receiver of this value via an IMPLEMENTATION DEFINED mechanism
such as a partition message.

So the FF-A driver can use the message interfaces to communicate the value
and set the same in the ffa_mem_region_attributes structures when using
the memory interfaces.

The driver ensure that the size of the endpoint memory access descriptors
is set correctly based on the FF-A version.

Fixes: 9fac08d9d985 ("firmware: arm_ffa: Upgrade FF-A version to v1.2 in the driver")
Reported-by: Lixiang Mao <liximao@qti.qualcomm.com>
Tested-by: Lixiang Mao <liximao@qti.qualcomm.com>
Message-Id: <20250923150927.1218364-1-sudeep.holla@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2025-10-13 10:34:46 +01:00
Linus Torvalds
cf0e371d2b EFI updates for v6.18
- Document what OVMF stands for
 
 - Clear NX restrictions also from 'more reliable' type memory when
   using the DXE service API
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQQm/3uucuRGn1Dmh0wbglWLn0tXAUCaOK6UgAKCRAwbglWLn0t
 XCQHAP9P7+AoxhNxCi0P6OkCZ+jEIKfa8OvojWhKxY8JxbYbegEA95GfwcUi+8Qf
 RJRe6+HHVffdibu6L4pi+YCqp4hhcg8=
 =XxQi
 -----END PGP SIGNATURE-----

Merge tag 'efi-next-for-v6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi

Pull EFI updates from Ard Biesheuvel:

 - Document what OVMF stands for (Open Virtual Machine Firmware)

 - Clear NX restrictions also from 'more reliable' type memory when
   using the DXE service API

* tag 'efi-next-for-v6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
  efi/x86: Memory protection on EfiGcdMemoryTypeMoreReliable
  efi: Explain OVMF acronym in OVMF_DEBUG_LOG help text
2025-10-05 12:08:14 -07:00
Linus Torvalds
e406d57be7 Patch series in this pull request:
- The 3 patch series "ida: Remove the ida_simple_xxx() API" from
   Christophe Jaillet completes the removal of this legacy IDR API.
 
 - The 9 patch series "panic: introduce panic status function family"
   from Jinchao Wang provides a number of cleanups to the panic code and
   its various helpers, which were rather ad-hoc and scattered all over the
   place.
 
 - The 5 patch series "tools/delaytop: implement real-time keyboard
   interaction support" from Fan Yu adds a few nice user-facing usability
   changes to the delaytop monitoring tool.
 
 - The 3 patch series "efi: Fix EFI boot with kexec handover (KHO)" from
   Evangelos Petrongonas fixes a panic which was happening with the
   combination of EFI and KHO.
 
 - The 2 patch series "Squashfs: performance improvement and a sanity
   check" from Phillip Lougher teaches squashfs's lseek() about
   SEEK_DATA/SEEK_HOLE.  A mere 150x speedup was measured for a well-chosen
   microbenchmark.
 
 - Plus another 50-odd singleton patches all over the place.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQTTMBEPP41GrTpTJgfdBJ7gKXxAjgUCaN78zwAKCRDdBJ7gKXxA
 jhLeAQCddTv0XtSUTrvBvmrJVUBrQQeJc+LtNopMIjfAF/WAWAEAogSVKxg+HHEB
 GaVixx4zDriNzEqrqiCx9rm4l+YooQA=
 =XRe0
 -----END PGP SIGNATURE-----

Merge tag 'mm-nonmm-stable-2025-10-02-15-29' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Pull non-MM updates from Andrew Morton:

 - "ida: Remove the ida_simple_xxx() API" from Christophe Jaillet
   completes the removal of this legacy IDR API

 - "panic: introduce panic status function family" from Jinchao Wang
   provides a number of cleanups to the panic code and its various
   helpers, which were rather ad-hoc and scattered all over the place

 - "tools/delaytop: implement real-time keyboard interaction support"
   from Fan Yu adds a few nice user-facing usability changes to the
   delaytop monitoring tool

 - "efi: Fix EFI boot with kexec handover (KHO)" from Evangelos
   Petrongonas fixes a panic which was happening with the combination of
   EFI and KHO

 - "Squashfs: performance improvement and a sanity check" from Phillip
   Lougher teaches squashfs's lseek() about SEEK_DATA/SEEK_HOLE. A mere
   150x speedup was measured for a well-chosen microbenchmark

 - plus another 50-odd singleton patches all over the place

* tag 'mm-nonmm-stable-2025-10-02-15-29' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (75 commits)
  Squashfs: reject negative file sizes in squashfs_read_inode()
  kallsyms: use kmalloc_array() instead of kmalloc()
  MAINTAINERS: update Sibi Sankar's email address
  Squashfs: add SEEK_DATA/SEEK_HOLE support
  Squashfs: add additional inode sanity checking
  lib/genalloc: fix device leak in of_gen_pool_get()
  panic: remove CONFIG_PANIC_ON_OOPS_VALUE
  ocfs2: fix double free in user_cluster_connect()
  checkpatch: suppress strscpy warnings for userspace tools
  cramfs: fix incorrect physical page address calculation
  kernel: prevent prctl(PR_SET_PDEATHSIG) from racing with parent process exit
  Squashfs: fix uninit-value in squashfs_get_parent
  kho: only fill kimage if KHO is finalized
  ocfs2: avoid extra calls to strlen() after ocfs2_sprintf_system_inode_name()
  kernel/sys.c: fix the racy usage of task_lock(tsk->group_leader) in sys_prlimit64() paths
  sched/task.h: fix the wrong comment on task_lock() nesting with tasklist_lock
  coccinelle: platform_no_drv_owner: handle also built-in drivers
  coccinelle: of_table: handle SPI device ID tables
  lib/decompress: use designated initializers for struct compress_format
  efi: support booting with kexec handover (KHO)
  ...
2025-10-02 18:44:54 -07:00
Linus Torvalds
38057e3236 soc: driver updates for 6.18
Lots of platform specific updates for Qualcomm SoCs, including a
 new TEE subsystem driver for the Qualcomm QTEE firmware interface.
 
 Added support for the Apple A11 SoC in drivers that are shared with the
 M1/M2 series, among more updates for those.
 
 Smaller platform specific driver updates for Renesas, ASpeed, Broadcom,
 Nvidia, Mediatek, Amlogic, TI, Allwinner, and Freescale SoCs.
 
 Driver updates in the cache controller, memory controller and reset
 controller subsystems.
 
 SCMI firmware updates to add more features and improve robustness.
 This includes support for having multiple SCMI providers in a single
 system.
 
 TEE subsystem support for protected DMA-bufs, allowing hardware to
 access memory areas that managed by the kernel but remain inaccessible
 from the CPU in EL1/EL0.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmjdpaoACgkQmmx57+YA
 GNnBXA//QgmFXYGG7QfB825mt0orKZxpfpLcwvqO7hkWgbXtl7Gokw2lGYN6bwLu
 zvY4MQ/bVoZ8R5uTVmuaSHBRsttSen8mBf+V0vzsBM/DRRVxvIN/7TESrY3J7Dtx
 J5syHKIBiUtdkDebWWC6jIElczIBItsd03Ln4Xjjt8Vas5YOO4n44zFrPo+FwlN/
 I6D2K86AiNZTtUCDMtB6VfJ6YtjYBWcWnJm7FXw/vE8FAXdZUnNWnZ8hbdQ5GaME
 JZGepUhONaOMUoGNZNaDGw511RdPhYzPjj9rCsIx2qdsRO9/4tJ8ccpW2aUMYh8c
 nA6w8Hj8jCwco6aYYrDUDV9uRtURDrmyJgTJBNLU05e/L+MuJ3IZNlzHFWlsxIAE
 vhyTdmg/P04ClQyixCl67IH/66F/0smX9C+1761LrD7GTdfR92KPl5W6q+DPBg/x
 yf+s2p3+f7ItV5XobKOrbf3w0xazeDb5o/EK8BufMx9vSe9bpzJ0gOf0CmNXEpyZ
 owAhbh6wXX1YwPcyA9LHv6gthyJwc/3fLu49ggMZP2rU01ccKOYn9H0cr7C8NVmy
 wEpJR0lp5aSw2oRkPkxB6sFmUohcpr8/OXGGJuvCXkYsUY1BEup4lewvbIWK4WoE
 c84kbbaHsjgFhe3IRlQw3G4KLYQT3jRtF7fH+gPx556BcI6K+lg=
 =mcZR
 -----END PGP SIGNATURE-----

Merge tag 'soc-drivers-6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull SoC driver updates from Arnd Bergmann:
 "Lots of platform specific updates for Qualcomm SoCs, including a new
  TEE subsystem driver for the Qualcomm QTEE firmware interface.

  Added support for the Apple A11 SoC in drivers that are shared with
  the M1/M2 series, among more updates for those.

  Smaller platform specific driver updates for Renesas, ASpeed,
  Broadcom, Nvidia, Mediatek, Amlogic, TI, Allwinner, and Freescale
  SoCs.

  Driver updates in the cache controller, memory controller and reset
  controller subsystems.

  SCMI firmware updates to add more features and improve robustness.
  This includes support for having multiple SCMI providers in a single
  system.

  TEE subsystem support for protected DMA-bufs, allowing hardware to
  access memory areas that managed by the kernel but remain inaccessible
  from the CPU in EL1/EL0"

* tag 'soc-drivers-6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (139 commits)
  soc/fsl/qbman: Use for_each_online_cpu() instead of for_each_cpu()
  soc: fsl: qe: Drop legacy-of-mm-gpiochip.h header from GPIO driver
  soc: fsl: qe: Change GPIO driver to a proper platform driver
  tee: fix register_shm_helper()
  pmdomain: apple: Add "apple,t8103-pmgr-pwrstate"
  dt-bindings: spmi: Add Apple A11 and T2 compatible
  serial: qcom-geni: Load UART qup Firmware from linux side
  spi: geni-qcom: Load spi qup Firmware from linux side
  i2c: qcom-geni: Load i2c qup Firmware from linux side
  soc: qcom: geni-se: Add support to load QUP SE Firmware via Linux subsystem
  soc: qcom: geni-se: Cleanup register defines and update copyright
  dt-bindings: qcom: se-common: Add QUP Peripheral-specific properties for I2C, SPI, and SERIAL bus
  Documentation: tee: Add Qualcomm TEE driver
  tee: qcom: enable TEE_IOC_SHM_ALLOC ioctl
  tee: qcom: add primordial object
  tee: add Qualcomm TEE driver
  tee: increase TEE_MAX_ARG_SIZE to 4096
  tee: add TEE_IOCTL_PARAM_ATTR_TYPE_OBJREF
  tee: add TEE_IOCTL_PARAM_ATTR_TYPE_UBUF
  tee: add close_context to TEE driver operation
  ...
2025-10-01 17:32:51 -07:00
Linus Torvalds
22bdd6e68b - Add functionality to provide runtime firmware updates for the non-x86 parts
of an AMD platform like the security processor (ASP) firmware, modules
   etc, for example. The intent being that these updates are interim,
   live fixups before a proper BIOS update can be attempted
 
 - Add guest support for AMD's Secure AVIC feature which gives encrypted
   guests the needed protection against a malicious hypervisor generating
   unexpected interrupts and injecting them into such guest, thus
   interfering with its operation in an unexpected and negative manner.
   The advantage of this scheme is that the guest determines which
   interrupts and when to accept them vs leaving that to the benevolence
   (or not) of the hypervisor
 
 - Strictly separate the startup code from the rest of the kernel where
   former is executed from the initial 1:1 mapping of memory. The problem
   was that the toolchain-generated version of the code was being
   executed from a different mapping of memory than what was "assumed"
   during code generation, needing an ever-growing pile of fixups for
   absolute memory references which are invalid in the early, 1:1 memory
   mapping during boot.
 
   The major advantage of this is that there's no need to check the 1:1
   mapping portion of the code for absolute relocations anymore and get
   rid of the RIP_REL_REF() macro sprinkling all over the place.
 
   For more info, see Ard's very detailed writeup on this:
   https://lore.kernel.org/r/CAMj1kXEzKEuePEiHB%2BHxvfQbFz0sTiHdn4B%2B%2BzVBJ2mhkPkQ4Q@mail.gmail.com
 
 - The usual cleanups and fixes
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEzv7L6UO9uDPlPSfHEsHwGGHeVUoFAmjWaaMACgkQEsHwGGHe
 VUr/RBAAnfneG+5U7f5x+hYW68mwZu07eoQn02IW9WGb2xjV6LKYxzDqyEj/+l+x
 jgN77i1uhl/4sqqKBvUjFfgot1gQ0g6M2fok2eZscSf+AHZF+LfDJPl4dFheVENo
 KtPieu1yi2bA+stL9JgaKh0I1ELX40qebXeZY4H4rYVzokHG0H+CEcuhv6Es71bW
 1C6efkZKHS3pAhlRUoa2MZagxnw+3mn9bfZDvSSNNM6I4qy9/CAPZlWw0jGrXKQX
 K/gjBI2KcoqK2bdJtCQsTvbrsuBedjkM6BZveAAhvOVCh6Aq6lnbqirJPJX8WJLq
 bIDAdsWGJ1vOzcgiPwT0e3qsfaTWep6MewcAQ/HnzrksH+IFb7J/l9awUgGY6LFh
 GzG7KPEKIWiLOxYFC+gLxRn8SWhcXHeY/fB8i5OOnhnikODWG4bJtM8F1MTQO4O1
 u2UuZ+wNzgdatJDXmLK1eluyuhkIqCZ7Hd8kpE0Zr32rbipEvuxnUPSyMzfhDM9M
 +UJGm3C205vPU6doRG8X0+EosFGCyZcixQNXhOugmedT5g3XGHHoJtiLj2i29jLN
 Xi0npxh2hwBe6N+WcIRnOfonFTsp6wWYatWPnGWTChpe+OGj9ZISXpmxnFUVCSag
 spG1J+upBA7ck1exuwpS3ldNSiw/066iTxB7Ht02vbeQ4JXIF6M=
 =shVa
 -----END PGP SIGNATURE-----

Merge tag 'x86_apic_for_v6.18_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 SEV and apic updates from Borislav Petkov:

 - Add functionality to provide runtime firmware updates for the non-x86
   parts of an AMD platform like the security processor (ASP) firmware,
   modules etc, for example. The intent being that these updates are
   interim, live fixups before a proper BIOS update can be attempted

 - Add guest support for AMD's Secure AVIC feature which gives encrypted
   guests the needed protection against a malicious hypervisor
   generating unexpected interrupts and injecting them into such guest,
   thus interfering with its operation in an unexpected and negative
   manner.

   The advantage of this scheme is that the guest determines which
   interrupts and when to accept them vs leaving that to the benevolence
   (or not) of the hypervisor

 - Strictly separate the startup code from the rest of the kernel where
   former is executed from the initial 1:1 mapping of memory.

   The problem was that the toolchain-generated version of the code was
   being executed from a different mapping of memory than what was
   "assumed" during code generation, needing an ever-growing pile of
   fixups for absolute memory references which are invalid in the early,
   1:1 memory mapping during boot.

   The major advantage of this is that there's no need to check the 1:1
   mapping portion of the code for absolute relocations anymore and get
   rid of the RIP_REL_REF() macro sprinkling all over the place.

   For more info, see Ard's very detailed writeup on this [1]

 - The usual cleanups and fixes

Link: https://lore.kernel.org/r/CAMj1kXEzKEuePEiHB%2BHxvfQbFz0sTiHdn4B%2B%2BzVBJ2mhkPkQ4Q@mail.gmail.com [1]

* tag 'x86_apic_for_v6.18_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (49 commits)
  x86/boot: Drop erroneous __init annotation from early_set_pages_state()
  crypto: ccp - Add AMD Seamless Firmware Servicing (SFS) driver
  crypto: ccp - Add new HV-Fixed page allocation/free API
  x86/sev: Add new dump_rmp parameter to snp_leak_pages() API
  x86/startup/sev: Document the CPUID flow in the boot #VC handler
  objtool: Ignore __pi___cfi_ prefixed symbols
  x86/sev: Zap snp_abort()
  x86/apic/savic: Do not use snp_abort()
  x86/boot: Get rid of the .head.text section
  x86/boot: Move startup code out of __head section
  efistub/x86: Remap inittext read-execute when needed
  x86/boot: Create a confined code area for startup code
  x86/kbuild: Incorporate boot/startup/ via Kbuild makefile
  x86/boot: Revert "Reject absolute references in .head.text"
  x86/boot: Check startup code for absence of absolute relocations
  objtool: Add action to check for absence of absolute relocations
  x86/sev: Export startup routines for later use
  x86/sev: Move __sev_[get|put]_ghcb() into separate noinstr object
  x86/sev: Provide PIC aliases for SEV related data objects
  x86/boot: Provide PIC aliases for 5-level paging related constants
  ...
2025-09-30 13:40:35 -07:00
Lenny Szubowicz
99da5bf3dd efi/x86: Memory protection on EfiGcdMemoryTypeMoreReliable
Check for needed memory protection changes on EFI DXE GCD memory space
descriptors with type EfiGcdMemoryTypeMoreReliable in addition to
EfiGcdMemoryTypeSystemMemory.

This fixes a fault on entry into the decompressed kernel from the
EFI stub that occurs when the memory allocated for the decompressed
kernel is more reliable memory, has NX/XP set, and the kernel needs
to use the EFI DXE protocol to adjust memory protections.

The memory descriptors returned by the DXE protocol
GetMemorySpaceDescriptor() service use a different GCD memory type
to distinguish more reliable memory ranges from their conventional
counterparts. This is in contrast to the EFI memory descriptors
returned by the EFI GetMemoryMap() service which use the
EFI_MEMORY_MORE_RELIABLE memory attributes flag to identify
EFI_CONVENTIONAL_MEMORY type regions that have this additional
property.

Signed-off-by: Lenny Szubowicz <lszubowi@redhat.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-09-29 17:13:39 +02:00
Linus Torvalds
ea78c19081 soc: fixes for 6.17, part 3
There are a few minor code fixes for tegra firmware, i.MX firmware and the
 eyeq reset controller, and a MAINTAINERS update as Alyssa Rosenzweig moves
 on to non-kernel projects. The other changes are all for devicetree files:
 
  - Multiple Marvell Armada SoCs need changes to fix PCIe, audio and SATA
  - A socfpga board fails to probe the ethernet phy
  - The two temperature sensors on i.MX8MP are swapped
  - Allwinner devicetree files cause build-time warnings
  - Two Rockchip based boards need corrections for headphone detection
    and SPI flash
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmjUXWcACgkQmmx57+YA
 GNno4g//ZcWBmmkSEHlbbHzD9uMXdXGF/NyNWr/O+9f+uOEnmZ/RCxvNl7rGU8aq
 5Mu6QlrgFiPRoDjqU1eHrd+Bya43M6TdOpYf3boM9tgd9wYuE7vLWUUF6BRV/x7D
 SuNQfWMk0JwwDgYAltLs5mB+tKqxNnEDLdDQiV28UtES/aNsDAs5Z3pCeBAbbMC/
 dkZzg/QvpKEIDBUEA9+24ShYelM5EerQsJJbCJbrM8j5/fJFGWmQ2Z2QPkvVVLIh
 8UM6EL0xxa4emDHQJnmgkSbAi5UhPkttiDVl9aRmAfcvxUhGUzrBUu9Gj4ypEdiF
 9haGz+qz5rpz0LS5eNzBGPaaiUTRlx6PvCcpuJhkJKHyFjQDj+eruX7LMjsFptlz
 My1yS7J2LlDEpQOwIs8cQSnB6pV3eeol7DVM7PewbocbcSP1zgYcu+MYZc3QbJbH
 KdG6glkzbBWl5Nhur4KBVpv8HmsV8521WJQiyuH4MmjOUlHVVljsx6JVjvythw78
 n8nNHcwNIqpZRL2bYAaDT/uhtvPz3dgIU17Xl/s21Av3Wwru1GqNt/dMgMy6Ent5
 +1lriby47DCP69g0joy82Eb3Jf8KkAYatDmUEr31kZA66cVPzmrEGX6QioqGcMs5
 3XDF+JuAN3MzqGw4oZfPH5tLzYYUNr8g6F1A4CA5rlSDYiU81Rg=
 =bxeQ
 -----END PGP SIGNATURE-----

Merge tag 'soc-fixes-6.17-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull SoC fixes from Arnd Bergmann:
 "There are a few minor code fixes for tegra firmware, i.MX firmware
  and the eyeq reset controller, and a MAINTAINERS update as Alyssa
  Rosenzweig moves on to non-kernel projects.

  The other changes are all for devicetree files:

   - Multiple Marvell Armada SoCs need changes to fix PCIe, audio and
     SATA

   - A socfpga board fails to probe the ethernet phy

   - The two temperature sensors on i.MX8MP are swapped

   - Allwinner devicetree files cause build-time warnings

   - Two Rockchip based boards need corrections for headphone detection
     and SPI flash"

* tag 'soc-fixes-6.17-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
  MAINTAINERS: remove Alyssa Rosenzweig
  firmware: tegra: Do not warn on missing memory-region property
  arm64: dts: marvell: cn9132-clearfog: fix multi-lane pci x2 and x4 ports
  arm64: dts: marvell: cn9132-clearfog: disable eMMC high-speed modes
  arm64: dts: marvell: cn913x-solidrun: fix sata ports status
  ARM: dts: kirkwood: Fix sound DAI cells for OpenRD clients
  arm64: dts: imx8mp: Correct thermal sensor index
  ARM: imx: Kconfig: Adjust select after renamed config option
  firmware: imx: Add stub functions for SCMI CPU API
  firmware: imx: Add stub functions for SCMI LMM API
  firmware: imx: Add stub functions for SCMI MISC API
  riscv: dts: allwinner: rename devterm i2c-gpio node to comply with binding
  arm64: dts: rockchip: Fix the headphone detection on the orangepi 5
  arm64: dts: rockchip: Add vcc supply for SPI Flash on NanoPC-T6
  ARM: dts: socfpga: sodia: Fix mdio bus probe and PHY address
  reset: eyeq: fix OF node leak
  ARM64: dts: mcbin: fix SATA ports on Macchiatobin
  ARM: dts: armada-370-db: Fix stereo audio input routing on Armada 370
  ARM: dts: allwinner: Minor whitespace cleanup
2025-09-24 14:37:44 -07:00
Arnd Bergmann
be6d263680 TI SoC driver updates for v6.18
- ti_sci: Add support for abort handling of entry to Low Power Mode
 - k3-socinfo: Add decode for AM62L SR1.1 silicon revision
 - pruss: Replace usage of %pK in printk with safer %p formatting
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE+KKGk1TrgjIXoxo03bWEnRc2JJ0FAmjJnesACgkQ3bWEnRc2
 JJ1beQ/7B5TCcVSP5FtKQgPGMZmYHiC3jMwbRUJgRY+usW4LHNzEDrN5hXYqTnmb
 K/1OKmYgcBbxJd6NF5jZqjDjQ2AvBfgqqq/kYvzryCmbFbO3ERKL7hYWvPxUkuQ3
 vGGywUVeSfhcEPRDmxuYMoqcgc2yF1z0MRFEZ3ZhooLdrNpDic2PmW5hXHKTxtPZ
 ra/QMbyxIc9vODcVJtLGVbi+YBreXH9vMWmKvbyisg4VDBAGAMzkfPaWQP7sh5P5
 T7668n+9+zd7uu7ALcfLl+hzc+UCPpFS9BuOTtA6xDTNdRvl8iA78CBiwVjfVbK1
 /EO2Dx59Y/3nYd95zVB5JraqO2Q+kLjyU0qRRBZ9g4o2KghjJ+v+xV6t0y5wF17n
 HHK5DXh3ZRNcupxYDSH5d3plyaCrsSa8itv+SbQPni97jqdgoAWc3gASS46krng1
 H9TfxQzoZULmuT0z4ffSYl7TZP344hxwbxdNcEJa/Fgb76sI7BglIYtl0DmrxtCg
 8SlvX1VphFyC97dZfG7NBVJIo7Fp27CntDDLLIIMpdwEvdfHeFSLGVcYiXDL6Z7T
 8djkOdBYMXUH2fdFyhe8QWjB22wlwfICGqXtPapsF4yYDz2zl7hysu2D1CFPdmcI
 saGROi/bKDgJjXri9gf2ItdMZ/1yFnXl2LqW80ioqiLwnbeFl70=
 =YbaZ
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmjTCqcACgkQmmx57+YA
 GNnf/xAAwK8s2GBoske+1I6HRTKp7Mz+Dw3j1EKZtScNS1KcROg+2fbMNC+poHrC
 HwU5/URmnEsHkX9x4wDAn7q4wLEYTzFVC2tFW3kV0pmVltZWug7R7jfgQQg/ksay
 apfrDy6io/vgRUbXN+Cow4Nr8jSDdT/oj+b5z1CLIRDp2bqLhqvqHMFBePLIDdr0
 AFyh/WUqSGT4DkZaD4Ng2SYjIVeyDvFN+WKBB8u2LO2S+BGEHI6h7YDRHRL8oBR8
 mJs3PFGTVP0dJuTEpxZiF48Y1p5mEl3k1Jcy8Nu/p5mcU8/o7Y3nWKZ4BwhouGdD
 3nE8HyRxOvXlsMCqgzFJNMmdpL1qqaOgQjUa7Nm063eXEXsnv61E5hdxvGl9dTwO
 zDyEzXOFwCXZjH5Gtsca0/DOMtShI0pSBmY3viFu00Bcxr9jrO8DmiRIxCrExyol
 uNQgfGmFLng5+yIWXxjYLh2oyqbMR6zSb7mA7BsP+Kc7TgFzzqecp2cAaFGYCcck
 XumFusd9HZXM4wwABEdywQZj0WoJHKq9RLRqNBt3JhUqnhlHyINiTR8uVDaopJc8
 jaxPSZ7p78QZbiabjIYy0o+QlozmHVkhzScVY6pEltoKxczqI7C6EysWup++zPh2
 82G2shIAN3RIDHVBzjb50d5ryIXcfVC8siL0+TgJoeLPz8ySaS0=
 =tx5G
 -----END PGP SIGNATURE-----

Merge tag 'ti-driver-soc-for-v6.18' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/drivers

TI SoC driver updates for v6.18

- ti_sci: Add support for abort handling of entry to Low Power Mode
- k3-socinfo: Add decode for AM62L SR1.1 silicon revision
- pruss: Replace usage of %pK in printk with safer %p formatting

* tag 'ti-driver-soc-for-v6.18' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
  soc: ti: k3-socinfo: Add information for AM62L SR1.1
  firmware: ti_sci: Enable abort handling of entry to LPM
  soc: ti: pruss: don't use %pK through printk

Link: https://lore.kernel.org/r/20250916175441.iehltsk2377rg5c6@alike
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2025-09-23 23:01:27 +02:00
Arnd Bergmann
833bb53d5e Amlogic Drivers changes for v6.18:
- device leak at probe in meson_sm
 - fix compile-test default for meson_sm
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAmjJCIgACgkQd9zb2sjI
 SdH3Yg//bew1pt0igY75eZ3vuBZ4AwwDWrOveinJhWk2bOiYl+kX286D+Lz5lFE4
 B/8xbd/yOVvGAa71cpn8xCKFvnw8CjG76t/9ooHMPw1evPcsRhjFC8uZqtLU7zMB
 hUdmgMs1Ma7yes00fdsRlK1oSc3kE6IDa4sKnKtO33ej5FwrY2jvV4T87DCTBUYL
 kb3IAMFJ41KV29lky9AVS8tvCSQA1ZPo6JJlg3fksgpeV/+NqySXECKv+CzbPWmT
 fz3g4QAc36RDQq4T+dZtcEewA00xb2vMsO7stOT5n4EtrlYn3qwP3injySfPMT/o
 BIABl/ZAUHYFf9YlIk+GxXoMYbRiaEBK+SxV4f2DB9rLz+3qgy5kujw7bLlI1Zdl
 uKkg3r269k/yapCURbsd4k/Lt/2FP86wKhehM/nto4tG39KW/X1kIzzsYHoVdGYL
 nkhGBTnzlsfwQcVvWQwmNnLuMgb1iFyVnYJVXA88Cuc98pEFl+IDgeD0lX5eo6ET
 dPNKAOqf/ScOGUvpsWb0w9Y6XhWW+B/U8jH3L1ANB1cuoxqazavz3BTtIMg+8PdU
 vRJZS8B53+w0/23wLC1JiVI8QaBlhQMy2QiizYf2d2OcbCBfcle0R8S3FolkjY9G
 N7d7qfWczFk7ekHDpcLNmBkqOk74CfCvk85HCifMcGb8dNYczmo=
 =+Xpv
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmjTCnQACgkQmmx57+YA
 GNlRcBAAtrqu6wEYI6v16HCAGF8qEsG6ZoyayyDLhqezKWiq5JFpoL46GVGh7Nj6
 52SDwYCS2ttluoYb7qQyNzA6CX3jBDlc+C6zjodqscJBrwJVhJGUJdcoNDFqgs81
 h8nT+lqoaxEcKGW+Q6vDgm12TqbFAJpn7vK4/rEP830DL612424IXTHr6gLe4Q0b
 GJCGrvXf2S4CXru6Y7a1Z7nQhHDf+HEIlMUDlrpaKzuqzKxDGbWKYQLjATV5QQSQ
 /6QBIArD/N+slnqkr+0ujWTmi50HSDbW+Hz/48OUQibjak+riBssRyot0vBSV//2
 ZCDicYMPFn9797knqbvJrPzZwfpAovH25v8EAb/nJ+Bhwi57NlcZIS3PGrV1R7RO
 bB1wr4mY36OOb9i7mY58tpUJNB0Z8LiarL5ooGjcTBw87p4IqyqVD1QPhr80xZhn
 wrn3ASHOTkpWMMSl2ny+V9B4kdbVIvP7phnSjDpMXZtVxwkn409zqn8SDmdDjQW/
 Xynd0IQdz9Y2bPjoxg9w4UQcfJpM646g/3fU/uiuI8PVH/S6N2dgF3ib+TW3wFbI
 mZYoxEJEzsN8ESqzUt7HpubRETQS5dEAUDejCID6uwcl3f58ml46TA4xzw8NDZ0S
 GFtV8+6544PTiVyvClzcwia97+TmJsPjn7wu11mSG6jDYhiqvg8=
 =JtYp
 -----END PGP SIGNATURE-----

Merge tag 'amlogic-drivers-for-v6.18' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into soc/drivers

Amlogic Drivers changes for v6.18:
- device leak at probe in meson_sm
- fix compile-test default for meson_sm

* tag 'amlogic-drivers-for-v6.18' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux:
  firmware: firmware: meson-sm: fix compile-test default
  firmware: meson_sm: fix device leak at probe

Link: https://lore.kernel.org/r/003cb467-531d-4a8d-a97f-19d59154132f@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2025-09-23 23:00:36 +02:00
Arnd Bergmann
3783cdc1df More Qualcomm device driver updates for v6.18
Introduce support for loading firmware into the QUP serial engines from
 Linux, which allows deferring selection of which protocol (uart, i2c,
 spi, etc) a given SE should have until the OS loads.
 
 Also introduce the "object invoke" interface in the SCM driver, to
 provide interface to the Qualcomm TEE driver.
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCgAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmjPXH0VHGFuZGVyc3Nv
 bkBrZXJuZWwub3JnAAoJEAsfOT8Nma3Fn/8P/2cgGz6MOdQJA45IEk7Staab/XA4
 5l4p8gde3vro9JR/mB+zC/wg5ULg1fhmQwBAFNUfvuyCChyPVoIgtaHXh2z5yvrt
 nKwjmeetw4OHw53edBApll8r5ahu4dtJyiK3WcMhFV6hHle4lIaBjYBLLQ3ZRNpd
 1OY/AO5yYxStzQvYaEBVRbDMZF+i1mIzbeIjVPwe8gy1MaGreGzpXCvmf6eVbgMt
 SVN8bhTXsmg2zEh9Fi8mzDKgkhT9jK7HrE4n0/Hum8jER6o+ClgPW2OjpVJHIVPO
 TTeKy3Qd0EDFnI8Sbn+BcxRmWlKAXXmhosQxEnP+2/okpegPGJEfyQufpKOoyUcz
 qshJUX8/BP8M72Pm8LBnbWq0bqFQSW60b5HNC67Ih0edfIgpqB+xpgMTtgR8WwHZ
 KVsoGiE+yWfR+qPk+lBtZD0zWqKYT/qj5575YGxNvlWc//Itcy+NIg6Y2wkEvX8O
 BZI28+RZFoeBSKa3FqyBLHozul+WcZB3mK5SUiZFLWQlJb5mrgfE0yVyvVw/UgN3
 jhJ8QQCI9x/Enm7OhXkWsZik93YwdFl0P4CRALGVr4wqnD3n0IjkmeXoq6r4265B
 LuoI5P41wWRR3x7Qam0neOk930pgZ95punGM4/geWW0nMGbIXCNoU7yJ64czS9Xo
 hbYXWu9OXys+nCF8
 =TulG
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmjTCYQACgkQmmx57+YA
 GNlD5RAAsWpUIaZsu3S1aBl/B2qHJJAIuDsluJ4kvCSlVT+51ctRqyTd/7vxup7Q
 zBUojCCAmdLnAkym5H1y9qx3Jen1dC7BE9tYAbAjFi0NQYKdMaueik2EVffdQjoJ
 69BBpmGU/moABY/+bU2OH7xfECq2ZCim0pPmQ2jMEekpGRfVV4glzjzKItyIFBsj
 2C/sIccnr9jlyrtMkrh/ACitnyIvLstZpR70SXY8Y1yNdkYyNn7DTj+H7bWhLaZG
 35VmqIWcxmXUBckxBagQr8lgAFsOGAYF7psJnVZRR9r/ivlA1V92giE92wLh5mO9
 NBCz8f2zhz1IhHfywUBU2f6zHb4xI3UATyHxeFZ7XUHBw/FIMI/x+JyZgrkxIszZ
 mFs2Q/T9SxHmwIL5qfxQvQ6zHOE/My4oTQrchP5d2fQcQ2j00xVpB29K9QZVbwpR
 gmEhdFOBmnaZRPVrD6kQRaQdqaEbgOxxJOWLfTe1ezuS7x716CUcp/AoSZYzEqTh
 dEr8c+rXr4bg+okk6y6zl9gn4qBWOYmzs1H+2r1Duh5tVms7LkmESlY0/ciEGaX7
 /fvaVS4LeSXMcUckJ6guGdhXNAKQD7l4ZCz7xmnyPgu8urf9pukUZ81ajZiXAC0d
 bTStK3btx9AEvFK2b/MzEoN3Tcz9f+eGCHJbjI8cjQpmNnqYDgk=
 =JuVO
 -----END PGP SIGNATURE-----

Merge tag 'qcom-drivers-for-6.18-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers

More Qualcomm device driver updates for v6.18

Introduce support for loading firmware into the QUP serial engines from
Linux, which allows deferring selection of which protocol (uart, i2c,
spi, etc) a given SE should have until the OS loads.

Also introduce the "object invoke" interface in the SCM driver, to
provide interface to the Qualcomm TEE driver.

* tag 'qcom-drivers-for-6.18-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  serial: qcom-geni: Load UART qup Firmware from linux side
  spi: geni-qcom: Load spi qup Firmware from linux side
  i2c: qcom-geni: Load i2c qup Firmware from linux side
  soc: qcom: geni-se: Add support to load QUP SE Firmware via Linux subsystem
  soc: qcom: geni-se: Cleanup register defines and update copyright
  dt-bindings: qcom: se-common: Add QUP Peripheral-specific properties for I2C, SPI, and SERIAL bus
  firmware: qcom: scm: add support for object invocation
  firmware: qcom: tzmem: export shm_bridge create/delete

Link: https://lore.kernel.org/r/20250921020225.595403-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2025-09-23 22:56:36 +02:00
Ingo Molnar
85df1cd15f Merge branch 'x86/urgent' into x86/apic, to resolve conflict
Conflicts:
	arch/x86/include/asm/sev.h

Signed-off-by: Ingo Molnar <mingo@kernel.org>
2025-09-16 08:24:22 +02:00
Thierry Reding
6131690df4 firmware: tegra: Do not warn on missing memory-region property
The IPC shared memory can reside in system memory or SRAM. In the latter
case the memory-region property is expected not to be present, so do not
warn about it.

Reported-by: Jonathan Hunter <jonathanh@nvidia.com>
Fixes: dbe4efea38d0 ("firmware: tegra: bpmp: Use of_reserved_mem_region_to_resource() for "memory-region"")
Signed-off-by: Thierry Reding <treding@nvidia.com>
2025-09-15 18:28:09 +02:00
Arnd Bergmann
bc43efa137 Arm SCMI updates/fixes for v6.18
These SCMI changes bring a mix of improvements, fixes, and cleanups:
 
 1. Device Tree bindings - allow multiple SCMI instances by suffixing
    node names (Nikunj Kela).
 2. Code hardening - constify both scmi_{transport,voltage_proto}_ops
    so they reside in read-only memory (Christophe JAILLET).
 3. VirtIO transport initialization - set DRIVER_OK before SCMI probing
    to prevent potential stalls; while recent rework removes the practical
    risk, this ensures correctness (Junnan Wu).
 4. Quirk handling - fix a critical bug by preventing writes to string
    constants, avoiding faults in read-only memory (Johan Hovold).
 5. i.MX SCMI MISC protocol - extend support to discover board info,
    retrieve configuration and build data, and document the new
    MISC_BOARD_INFO command; all handled gracefully if unsupported (Peng Fan).
 6. Logging cleanup - simplify device tree node name logging by using
    the %pOF format to print full paths (Krzysztof Kozlowski).
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEunHlEgbzHrJD3ZPhAEG6vDF+4pgFAmjEAPYACgkQAEG6vDF+
 4pjb9hAA0jwFS90rfpe1B7YlrRkRluzZXherIaR3ePQMxJ0ohaTGXd77BD+Ce2Cs
 HYYuJGvlaQ91Kdy0NsvrmEoAwq5m8Xl5MDPCXCOxJ0xtr1VWQiaRlBUJ3ZLia5cf
 JjME2e+xHtd6AtZLRL98yUbM7PM3CLYc+o3beQskEqcAmPYkT4v2qU9MBAo99JQ9
 29GcH3ZcChXCA7gJtHbVMbfbeQhkc1b+sBTqerh3Qn43iMNEX7cJfIa2KitaQMtC
 5//XznXib05+s2Cs1iI/X7k2bWq2CKSaM/uLK/A22uGWFsyGw5Fppdup28RvLlxZ
 i1bobgNInM98jFaoOcz49QX4MaVaEHwsouuPcGMd82HW2UVmvK/gyOJdXMY1qyAT
 cy71jHeysXifGqwhqlMIdKikcyp/MsylZvIDkX5D17aNbdqnUpU+DS5wSJ/yraEp
 N9pah2DvXRTLLu9FWORDgT0Oa/izXTdarNWJTdWiWDfN8+r+/GXjMZ+qRWnNE2bb
 ZeK2ddMev6INpMThhOOnbBsgj01CH/djaS5q+y+MHK+fiipaHK5giu8JWESTWXDe
 dgiCdmg+QQUigTKInEUphfwFc6EGtJhh/gMGVEtH9YtsbcgTICVq2+mj6W1W6lvx
 nm326GgCGUS4joJlIaiQdIOnPOc0ei6uWG7sKVTbz1xrZM48dLQ=
 =Pkr7
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmjIIQoACgkQmmx57+YA
 GNnfUhAAnXkihxT0jMSSO6LnvG+OymCFmqF9722foBzZFv2eyFjXfV9gmAth7jyD
 lLZfQ/0VdUnEQjfV26RECii7CHCW9BtVQ4/kcPO6ZNtThq/1emaEhtntVOWovUej
 Yq5ofnXYVCPpXy6KoNUuMDMpKUDc+zMgACPVFqHOVv2D03FvOQ+zaqkJAiQmg91l
 I7s4WJ4kUTRM+xVtGG71oTlTK3+tZJyrZgNPNrtiCESWD+r6D21jKd/xrJUS8gWS
 BvWPq16Rtqc9NeOmqmic7xg8tO2YXM3VXE61+N2AY4B0KHLPa3TucSL8wqST9Fkr
 hPUVMGzS6WmmA96AM50bMc6FS8F5H61Cnxn3tMtzWSxtTKCxQXYhXUElndOp8j8T
 /pxqjpjsYjKcHt0hVRENJMjVjzuesFwkKOX7Zt0ShVatA4YJw+TMxXlsMPxT/1Lb
 UZhoNM81VcUWnbE9lHsX6e+P8Umk3/r2hECnJgCEuJOFugZFpR9/xJCQjY6RfFBC
 Dexldw2VSZIOufxotPwh7f7DpePlgN6880dwScMNPCXjdfhZFwZmyOH8qWVOsLRc
 Hw2I8hjAM+G+g7s8fz8UxeFSIdx/T6XuIYGSiQ0Z65BeiTUGyN8/2zsWmmEJumhE
 jzLpav7UMGLNMU92nbHJxiil9+uxVZillMkAubuJU06rCtxorpg=
 =PkTj
 -----END PGP SIGNATURE-----

Merge tag 'scmi-updates-6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into soc/drivers

Arm SCMI updates/fixes for v6.18

These SCMI changes bring a mix of improvements, fixes, and cleanups:

1. Device Tree bindings - allow multiple SCMI instances by suffixing
   node names (Nikunj Kela).
2. Code hardening - constify both scmi_{transport,voltage_proto}_ops
   so they reside in read-only memory (Christophe JAILLET).
3. VirtIO transport initialization - set DRIVER_OK before SCMI probing
   to prevent potential stalls; while recent rework removes the practical
   risk, this ensures correctness (Junnan Wu).
4. Quirk handling - fix a critical bug by preventing writes to string
   constants, avoiding faults in read-only memory (Johan Hovold).
5. i.MX SCMI MISC protocol - extend support to discover board info,
   retrieve configuration and build data, and document the new
   MISC_BOARD_INFO command; all handled gracefully if unsupported (Peng Fan).
6. Logging cleanup - simplify device tree node name logging by using
   the %pOF format to print full paths (Krzysztof Kozlowski).

* tag 'scmi-updates-6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  firmware: arm_scmi: Simplify printks with pOF format
  firmware: arm_scmi: imx: Discover MISC board info from the system manager
  firmware: arm_scmi: imx: Support retrieving MISC protocol configuration info
  firmware: arm_scmi: imx: Discover MISC build info from the system manager
  firmware: arm_scmi: imx: Add documentation for MISC_BOARD_INFO
  firmware: arm_scmi: quirk: Prevent writes to string constants
  firmware: arm_scmi: Fix function name typo in scmi_perf_proto_ops struct
  firmware: arm_scmi: Mark VirtIO ready before registering scmi_virtio_driver
  firmware: arm_scmi: Constify struct scmi_transport_ops
  firmware: arm_scmi: Constify struct scmi_voltage_proto_ops
  dt-bindings: firmware: arm,scmi: Allow multiple instances

Link: https://lore.kernel.org/r/20250915101341.2987516-1-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2025-09-15 16:22:02 +02:00
Arnd Bergmann
7b1349bd47 Samsung SoC drivers for v6.18
1. Google GS101:
    Enable CPU Idle, which needs programming C2 idle hints
    via ACPM firmware (Alive Clock and Power Manager).  The patch
    introducing this depends on 'local-timer-stop' Devicetree property,
    which was merged in v6.17.
 
    Fix handling error codes in ACPM firmware driver when talking to
    PMIC.
 
 2. Exynos2200: Add dedicated compatible for serial engines (USI).
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmjEJbkQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD1wotD/9sMtDTS2graV2Rda60ltXBYbTQmZGFCPbu
 0QLoXl7spLvKGAbS/Dp7nRsf3oyZ1Hnc0uqeWKNglJNwESelgPX0gdc4/3CMTg2c
 CJ8Jw7IuxAuoy09W+EJsY+/tdEnmQNO//YVltn6Ycmo3T2CixYAbAUgmQQ7f1zaA
 RjK/3AYUJMcVs5H/ZBOHMWUZyUCTYlxxppBpcXfqJDoyY0E57JtPX5n2jdHSiwKt
 qyNOUWWVz3gG+tWXc1vQXoqnQTUQ7QJPMgaMb3kz4khrlz6QxedRT5uy0b7c6cJs
 yNLBL6pwXNtHcpmESLmRpI4dBeJPeJhEyWS9UfiXH4AduynUQkKvGQxwjC2OUSPB
 xhF8G1aZ59VM+cmhPcR5Vp/RtKpls3J07EeVBB0oEbABEIoXuN48m9fxaxplUdhG
 /WgwaONFBmBQEOcIUpSlASGysHOoRcVRg21+gGvOqH5gh9AwuqhIPZzw7kONhNaU
 WT1mSZaf4XtdqKnE5OorQteutgU+w6GEoS+0u20SKvcnVrGQi4vb2VAzzV/JSHG1
 KHqTbNGGR+TDgrz0caNTOK1vZ4Qtv4JR/ZO0GH6BVqeqWsLI6sP/N/tgIbQ4OcJ/
 z48ejpR7/c/kd8Nl+5U8bg7I3LsnQwpJwvzGH8Ot5KXgjoRYGt8pBzQyhgYNbFb1
 UdAUJmi4BQ==
 =pOwr
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmjIID8ACgkQmmx57+YA
 GNn9sA/+JLhonck3esYyA1F3/rdrllTDwCCLU357LqVBTuIcmXC/ePKQU0MMkBcg
 KA8S9tPyeEiegl2dhHSajrdavcBoUcXs3HVDVfLafcBP5ZItQuVaNj0gnXKf+npa
 cE+udnqihXBSSUeNJFPS8eO8qh77amUJxGF570zPoA62M8Z3lq1ZevI0LeA69eLO
 yujIEU7tSLjkcQlPr/Yj9+MjR8X672zp8sCDHrspGNtnyXklty5cC8P9CJqnCWBv
 hpbzRT+R0GeugiswdFqS5Kt0umXsdilXZRU4Azc3m+OVgzTDFZovjj38sZ0QMW1K
 oktwHKt7IZ3/T9v+sQLHemiYVoGOIaveBHEN7CJ1acGMPeSZHm68Aggs2JMsofqy
 /u2dCGWyMBgZB0K5ZQ532Q7mj+tW1SVvX33hJd3/MpskyRBJOecJdo8NHgor3g/q
 yWhfj5nNFUoIMoxl+NuRe6gbmwwSH9DUnAI7a6LAHoBkfth9pLm26hYfMypoYBIE
 R3MM2ywDdMRNUIAd0JseBmLLQ2Ka/jU+UdIH3+wd9FY5f4+ghNmRIsnxaWVy4aI/
 /nSMDR9jb+8lNgmZzqTJmDPBmK18AZdCc+nnrifyfCls7uwux4w/F4zJbReYkU/W
 YKVxbUWO/C0dmRC1vOOcfRsmduMjWex/5wj+kStNE20j8OVeLdY=
 =4h/m
 -----END PGP SIGNATURE-----

Merge tag 'samsung-drivers-6.18' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/drivers

Samsung SoC drivers for v6.18

1. Google GS101:
   Enable CPU Idle, which needs programming C2 idle hints
   via ACPM firmware (Alive Clock and Power Manager).  The patch
   introducing this depends on 'local-timer-stop' Devicetree property,
   which was merged in v6.17.

   Fix handling error codes in ACPM firmware driver when talking to
   PMIC.

2. Exynos2200: Add dedicated compatible for serial engines (USI).

* tag 'samsung-drivers-6.18' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  firmware: exynos-acpm: fix PMIC returned errno
  dt-bindings: soc: samsung: usi: add samsung,exynos2200-usi compatible
  soc: samsung: exynos-pmu: Enable CPU Idle for gs101

Link: https://lore.kernel.org/r/20250912135448.203678-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2025-09-15 16:18:39 +02:00
Arnd Bergmann
ecdca1af96 Qualcomm driver updates for v6.18
Allowlist the uefisec application, to provide UEFI variable access on
 Dell Inspiron 7441 and Latitude 7455, the Hamoa EVK, and the Lenovo
 Thinkbook 16.
 
 Disable tzmem on the SC7180 platform, as this causes problems with
 rmtfs.
 
 Clean up unused, lingering, parameters in the MDT loader API.
 
 Unconditinally clear TCS trigger bit, to avoid false completion IRQs in
 the RPMh/RSC driver. Fix endianess issue in SMEM driver.
 
 Add pd-mapper support for SM8750.
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCAAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmjDQ+kVHGFuZGVyc3Nv
 bkBrZXJuZWwub3JnAAoJEAsfOT8Nma3F0S4P/RkgxyLagOcz78CCRG2kgYvxak29
 C1SF9AP3V//xX/oJ+o9anAmcx/3no+q8QX+/ngnfhypBf9g0OPxpbNEWN8jqZQ2C
 tBAMtjEViXDhdfrNH8AEsYlstj67Si9E9OgQ/UO56U6VEsqDtGui7D1H46VwkKS2
 LcxpsWVBgyEd8RA6fskZx/bb/S4Um/SKm3Yaux3VQ2xsSyUp6y29ubNVRU9eVwUN
 dpiKqDjkXSKvt6Y9DxyhL2Sa2aHm7K0+ulUGIWrswKckzj8LFdzX4snzf7AIItju
 DNYXYqnKeZsj54fwLKH4nKVS4iZA1rPKRkXxYNPEWS8nmgRy6E+Ye1IknWAFxe8I
 aw/otkp9Dh2JOITZUi6cU8NzTvKQ7HAMDSkCEMHCaBopK8DSnA5gwDlzQI8YQWJm
 Md2Ga1XpP9/Y4Z9uNal3fCU2bPulH+8w9l7A4sVqSJITXxX7vNF+tvEsNjlx4AaH
 NRIk5gLavZ2m3CW8wczyHPpF/Ojl+N0GFYgBBgWCi0jRTTq3Cb0jNuZAfJszn4jB
 cXWSPnMc8BAqiNnlG0EI6/ydVeAlSDssYzRXmx4dvyinMGvgdlE6s6V4dvZQRMhh
 8gsSe3xVkYFVkjSAhfrx4vI0PFEU0DfjVyS5Dq0Y3I3sutTP6eF8vYEq3DgqudPS
 SZW2s7ZiO86dUqYG
 =CIAf
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmjIGv8ACgkQmmx57+YA
 GNlyvBAAu2zlrRL9dBZyUAr05hz3rY4+SJXDqXofeILKBIXioHVW+8iX/RSdNxwk
 3L88ZNb1GJ7tszNDENnb0ObEIRYAirg4zLilVqUoikRrNv7bhoTXve13pk63imOP
 feHwPu+euGyq0KOLCO2eB4mqWlOIVxU2y0BI+rCdJ2ogVAMEfK7ZA/SoDKUAoKGV
 8kBX/0i7/SICL809vgKqyeK8wtmKNtitQGYrux4yclnznoXqUXRyrKyYPx9o+7RN
 HO3D2v44W2tn8rvLOTP92TdazEoN7cYJf8557I/tooZDTSjNzdgcEeO4qZqhT5Gy
 H2HCBaS1b4gwSJAGNQs8SeCgcBg9usm77rSGAbtNai5fW0LRb7Ig7lkJbRCBsWJy
 /Zjr77SOiWAS0ALytv8XWiv8s707P+IUWktGzoq7e6QuEFnXRboU8RKt8aLce5wt
 rcqAl7qCSbjEig980hL5p8nbI7ZEBEU+mcxxqN5M/qkDx9FiadxPzZ0+vvplP97p
 dScGRcftLD1+jF8TycbyWPuxQT7naZNARDFWMxMScHuw2hVfyg0y+KcdadH5Evc9
 ocT+XrzZM7xCDYFd1ksZmuaIzM6rVXINqdkQc/mDbbKqsBKLkvHaonHP2eMo0Tld
 Tgum98+WUkLcHpJtWEgyRZmcqRoEy6HLYO8vXLZhFcTguUqeBrE=
 =y2UQ
 -----END PGP SIGNATURE-----

Merge tag 'qcom-drivers-for-6.18' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers

Qualcomm driver updates for v6.18

Allowlist the uefisec application, to provide UEFI variable access on
Dell Inspiron 7441 and Latitude 7455, the Hamoa EVK, and the Lenovo
Thinkbook 16.

Disable tzmem on the SC7180 platform, as this causes problems with
rmtfs.

Clean up unused, lingering, parameters in the MDT loader API.

Unconditinally clear TCS trigger bit, to avoid false completion IRQs in
the RPMh/RSC driver. Fix endianess issue in SMEM driver.

Add pd-mapper support for SM8750.

* tag 'qcom-drivers-for-6.18' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  firmware: qcom: tzmem: disable sc7180 platform
  soc: qcom: use devm_kcalloc() for array space allocation
  dt-bindings: firmware: qcom,scm: Add MSM8937
  firmware: qcom: scm: Allow QSEECOM on Dell Inspiron 7441 / Latitude 7455
  firmware: qcom: scm: Allow QSEECOM on Lenovo Thinkbook 16
  soc: qcom: rpmh-rsc: Unconditionally clear _TRIGGER bit for TCS
  soc: qcom: pd-mapper: Add SM8750 compatible
  soc: qcom: icc-bwmon: Fix handling dev_pm_opp_find_bw_*() errors
  soc: remove unneeded 'fast_io' parameter in regmap_config
  soc: qcom: smem: Fix endian-unaware access of num_entries
  dt-bindings: soc: qcom,rpmh-rsc: Remove double colon from description
  dt-bindings: sram: qcom,imem: Document IPQ5424 compatible
  firmware: qcom: scm: Allow QSEECOM on HAMOA-IOT-EVK
  soc: qcom: mdt_loader: Remove unused parameter
  soc: qcom: mdt_loader: Remove pas id parameter
  soc: qcom: mdt_loader: Remove unused parameter
  firmware: qcom: scm: preserve assign_mem() error return value

Link: https://lore.kernel.org/r/20250911215017.3020481-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2025-09-15 15:56:15 +02:00
Arnd Bergmann
b609d74217 This pull request contains Broadcom SoC drivers updates for 6.18:
- Andrea adds the missing MIPI DSI clock defines for the RP1 and then
   continues to implement the remaining clocks for the RP1 chip (ADC,
   I2S, Audio in/out, DMA, MIPI, PWM, SDIO, UART, encoder)
 
 - Akhilesh fixes a spelling typo in the bcm47xx_sprom driver
 
 - Brian converts the RP1 clock driver to use the new determine_rate()
   API
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEm+Rq3+YGJdiR9yuFh9CWnEQHBwQFAmjBsfEACgkQh9CWnEQH
 BwRk7A//auWiAmOmrk/T5qV2v7whmnmafYO7blhwj9ltz496OnRJZtPExN7eLcze
 9SaiPwP6vDjvys6nkfipsviT+E8UKRRqT7aEes/v6nqhGfuoNslTQyPKKzrgsoXm
 fOKgrsw6wDuUpp5nmkpDMJASFgYJd3xSH2SbZlwAizxuiSzGO8gMdxzo8oCMJ3tv
 3NtzBuaVFScrpwX8/4fFdafQcxl0gWrEHx4bwDkhh5PFTL1/3tH10IcD1iuAwTvo
 6DBndgYhqv7aA/N1hXuYZgnqVAApjpfGWcF1O8Hwq+3shcp/iOOSqFgnibq34yyv
 RU8wxE4OansaR1uVdrpSjrNmqRb14uNrBfZP/XOefpcu38YBeKF9WvBhmMzwoI94
 sStmtpbzisXQnLF8MzOHH0byOO0BB1ITWZLeHoYtHmpvOqhhF2PFq9qCzpgKJnG8
 G6P/IZDMxhFtvyQ/GPSTR8cqHtUMpOQ8K69Mz04gSFp2cAz4tYuKvtR3OVo5GfxI
 ibmcW2biTEh5y0sRdr/K7cZ3RgP82xsu2Ogeh6pKMUAJaaARwXpJD0/ozm96K0xH
 NaZDGlRwo4aeicdekLbrHmlwuACVYV7B7kQJy72Oe5ZIibdQ7T4ejMRqtjT3Sbg/
 LMxW28rN2nQhgycgB3vV1QNJjCvHkedNFgpvWgF8XPIZ/Hp5VeQ=
 =qQ7G
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmjIGfIACgkQmmx57+YA
 GNmHJBAAqeytiS9Iz42+aE93AqI3uyzHELubQBYjWUcz88H/UNn3jjnlPUIOJFgX
 m/Xcgqnj5tgBkVqcwPl38GyV3Sd8EgerwP47mrt36JTVgK3EgsDeSUJs/sRNHrD/
 R8rhScthlETwAr4uApcL+SPIcENuf6kk8AyIrP1kFyyq6bOHzVbEJVCT0qFqzQfn
 MDLy3BxJKbhgW7EX5Mg20OhuI4Kezk+lRpWwVszqhXe9mfMLuB+egS/gLKbvsF1Q
 rsL+aL3MvTDh0Ya+lX9NCs5o6j/YcFr5507TwupLg6ZJUBgzm82FEWjyU4641V8H
 LtFmgouekG1boKKX+pA3Ow5lwiAKXGxhB/0DR4OMBqDhWoD+LyycqyKvBGQVFon2
 q3T8ywQLkKcpPD5VcmgWSHdsqK+vNq83k31etZK/pTlzso/pcm2fEoHBkE0bo8cS
 YwNPuDwAQ7D9o50T4Pa9FnGhU0y9qGvt3nD5ZjyN3DKyjVeWsnPZvpkiNMCi58Xt
 4+bKNSEHqOi4CnIfbpu0CEy1RY8C4/exKDO4rWOcfdEo8u7hW8IwD7crNzY3vQ0q
 Kq2xbVfTJorFzNSZ1x6VlkHp2UrjyruDek2sjn/BsIvz2uGACLARIZrYS+681wPW
 MW4wizuVXQRfCqrJPDxLa+CnQwmbZ/Fc2wWq8H7tScI+F6h67JA=
 =5iR8
 -----END PGP SIGNATURE-----

Merge tag 'arm-soc/for-6.18/drivers' of https://github.com/Broadcom/stblinux into soc/drivers

This pull request contains Broadcom SoC drivers updates for 6.18:

- Andrea adds the missing MIPI DSI clock defines for the RP1 and then
  continues to implement the remaining clocks for the RP1 chip (ADC,
  I2S, Audio in/out, DMA, MIPI, PWM, SDIO, UART, encoder)

- Akhilesh fixes a spelling typo in the bcm47xx_sprom driver

- Brian converts the RP1 clock driver to use the new determine_rate()
  API

* tag 'arm-soc/for-6.18/drivers' of https://github.com/Broadcom/stblinux:
  clk: rp1: convert from round_rate() to determine_rate()
  drivers: firmware: bcm47xx_sprom: fix spelling
  clk: rp1: Implement remaining clock tree
  dt-bindings: clock: rp1: Add missing MIPI DSI defines

Link: https://lore.kernel.org/r/20250910171910.666401-4-florian.fainelli@broadcom.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2025-09-15 15:51:46 +02:00
Bjorn Andersson
0ea4535429 Merge branch '20250911-qcom-tee-using-tee-ss-without-mem-obj-v12-2-17f07a942b8d@oss.qualcomm.com' into drivers-for-6.18
Merge the addition of support for object invocation into the SCM driver
though a topic branch, to enable sharing this with TEE subsystem.
2025-09-15 08:43:03 -05:00
Amirreza Zarrabi
4b700098c0 firmware: qcom: scm: add support for object invocation
Qualcomm TEE (QTEE) hosts Trusted Applications (TAs) and services in
the secure world, accessed via objects. A QTEE client can invoke these
objects to request services. Similarly, QTEE can request services from
the nonsecure world using objects exported to the secure world.

Add low-level primitives to facilitate the invocation of objects hosted
in QTEE, as well as those hosted in the nonsecure world.

If support for object invocation is available, the qcom_scm allocates
a dedicated child platform device. The driver for this device communicates
with QTEE using low-level primitives.

Tested-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-by: Harshal Dev <quic_hdev@quicinc.com>
Signed-off-by: Amirreza Zarrabi <amirreza.zarrabi@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250911-qcom-tee-using-tee-ss-without-mem-obj-v12-2-17f07a942b8d@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2025-09-15 08:42:53 -05:00
Amirreza Zarrabi
8aa1e3a6f0 firmware: qcom: tzmem: export shm_bridge create/delete
Anyone with access to contiguous physical memory should be able to
share memory with QTEE using shm_bridge.

Tested-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-by: Harshal Dev <quic_hdev@quicinc.com>
Reviewed-by: Kuldeep Singh <quic_kuldsing@quicinc.com>
Signed-off-by: Amirreza Zarrabi <amirreza.zarrabi@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250911-qcom-tee-using-tee-ss-without-mem-obj-v12-1-17f07a942b8d@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2025-09-15 08:42:53 -05:00
Evangelos Petrongonas
5b86af1ded efi: support booting with kexec handover (KHO)
When KHO (Kexec HandOver) is enabled, it sets up scratch memory regions
early during device tree scanning.  After kexec, the new kernel
exclusively uses this region for memory allocations during boot up to the
initialization of the page allocator

However, when booting with EFI, EFI's reserve_regions() uses
memblock_remove(0, PHYS_ADDR_MAX) to clear all memory regions before
rebuilding them from EFI data.  This destroys KHO scratch regions and
their flags, thus causing a kernel panic, as there are no scratch memory
regions.

Instead of wholesale removal, iterate through memory regions and only
remove non-KHO ones.  This preserves KHO scratch regions, which are good
known memory, while still allowing EFI to rebuild its memory map.

Link: https://lkml.kernel.org/r/b34da9fd50c89644cd4204136cfa6f5533445c56.1755721529.git.epetron@amazon.de
Signed-off-by: Evangelos Petrongonas <epetron@amazon.de>
Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Acked-by: Pratyush Yadav <pratyush@kernel.org>
Cc: Alexander Graf <graf@amazon.com>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Baoquan He <bhe@redhat.com>
Cc: Changyuan Lyu <changyuanl@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-09-13 17:32:57 -07:00
Krzysztof Kozlowski
2f86054cc1 firmware: arm_scmi: Simplify printks with pOF format
Print full device node name with %pOF format, so the code will be a bit
simpler.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Message-Id: <20250912092423.162497-2-krzysztof.kozlowski@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2025-09-12 11:32:21 +01:00
Nikita Travkin
3cc9a8cada firmware: qcom: tzmem: disable sc7180 platform
When SHM bridge is enabled, assigning RMTFS memory causes the calling
core to hang if the system is running in EL1.

Disable SHM bridge on sc7180 devices to avoid that hang.

Signed-off-by: Nikita Travkin <nikita@trvn.ru>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250721-sc7180-shm-hang-v1-1-99ad9ffeb5b4@trvn.ru
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2025-09-11 16:38:33 -05:00
Tudor Ambarus
1da4cbefed firmware: exynos-acpm: fix PMIC returned errno
ACPM PMIC command handlers returned a u8 value when they should
have returned either zero or negative error codes.
Translate the APM PMIC errno to linux errno.

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/linux-input/aElHlTApXj-W_o1r@stanley.mountain/
Fixes: a88927b534ba ("firmware: add Exynos ACPM protocol driver")
Cc: stable@vger.kernel.org
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2025-09-11 11:27:05 +02:00
Johan Hovold
0454346d1c firmware: firmware: meson-sm: fix compile-test default
Enabling compile testing should not enable every individual driver (we
have "allyesconfig" for that).

Fixes: 4a434abc40d2 ("firmware: meson-sm: enable build as module")
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20250725075429.10056-1-johan@kernel.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2025-09-10 09:31:20 +02:00
Peng Fan
88d3671baf firmware: arm_scmi: imx: Discover MISC board info from the system manager
The i.MX SCMI MISC protocol can report board information from the
System Manager (SM), including a board name and board-specific
attributes. Query this during protocol initialization.

If the firmware does not implement BOARD_INFO, handle -EOPNOTSUPP
gracefully and continue.

Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Message-Id: <20250904-sm-misc-api-v1-v4-4-0bf10eaabdf1@nxp.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2025-09-09 11:26:20 +01:00
Peng Fan
d3e25c244d firmware: arm_scmi: imx: Support retrieving MISC protocol configuration info
The MISC protocol can provide System Manager (SM) configuration
information, including platform identifiers and board-specific
attributes. Add support to retrieve this information during protocol
initialization.

If the firmware does not implement the CFG_INFO command, handle
-EOPNOTSUPP gracefully and continue without failing init.

Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Message-Id: <20250904-sm-misc-api-v1-v4-3-0bf10eaabdf1@nxp.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2025-09-08 11:52:30 +01:00
Peng Fan
cc798b1050 firmware: arm_scmi: imx: Discover MISC build info from the system manager
MISC protocol can report System Manager (SM) build information (commit,
build date/time, etc.). Discover those information at the init time.
If the firmware doesn't support it, ignore -EOPNOTSUPP.

Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Message-Id: <20250904-sm-misc-api-v1-v4-2-0bf10eaabdf1@nxp.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2025-09-08 11:52:30 +01:00
Peng Fan
646c0c9e06 firmware: arm_scmi: imx: Add documentation for MISC_BOARD_INFO
System Manager Firmware supports getting board information, add
documentation for this MISC_BOARD_INFO command.

Also extends the SYSLOG response to include NOT_SUPPORTED.

Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Message-Id: <20250904-sm-misc-api-v1-v4-1-0bf10eaabdf1@nxp.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2025-09-08 11:32:17 +01:00
Johan Hovold
8ece3173f8 firmware: meson_sm: fix device leak at probe
Make sure to drop the reference to the secure monitor device taken by
of_find_device_by_node() when looking up its driver data on behalf of
other drivers (e.g. during probe).

Note that holding a reference to the platform device does not prevent
its driver data from going away so there is no point in keeping the
reference after the helper returns.

Fixes: 8cde3c2153e8 ("firmware: meson_sm: Rework driver as a proper platform driver")
Cc: stable@vger.kernel.org	# 5.5
Cc: Carlo Caione <ccaione@baylibre.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20250725074019.8765-1-johan@kernel.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2025-09-04 15:13:53 +02:00
Akhilesh Patil
2d503aafdf drivers: firmware: bcm47xx_sprom: fix spelling
Fix spelling in bcm47xx_sprom.c as follows,
specififc --> specific

Signed-off-by: Akhilesh Patil <akhilesh@ee.iitb.ac.in>
Link: https://lore.kernel.org/r/aHt+Ey5AQ0dsCuB4@bhairav-test.ee.iitb.ac.in
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
2025-09-03 13:47:58 -07:00
Ard Biesheuvel
e7b88bc005 efistub/x86: Remap inittext read-execute when needed
Recent EFI x86 systems are more strict when it comes to mapping boot
images, and require that mappings are either read-write or read-execute.

Now that the boot code is being cleaned up and refactored, most of it is
being moved into .init.text [where it arguably belongs] but that implies
that when booting on such strict EFI firmware, we need to take care to
map .init.text (and the .altinstr_aux section that follows it)
read-execute as well.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/20250828102202.1849035-44-ardb+git@google.com
2025-09-03 18:05:42 +02:00
Johan Hovold
572ce54639 firmware: arm_scmi: quirk: Prevent writes to string constants
The quirk version range is typically a string constant and must not be
modified (e.g. as it may be stored in read-only memory). Attempting
to do so can trigger faults such as:

  |  Unable to handle kernel write to read-only memory at virtual
  |  address ffffc036d998a947

Update the range parsing so that it operates on a copy of the version
range string, and mark all the quirk strings as const to reduce the
risk of introducing similar future issues.

Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220437
Fixes: 487c407d57d6 ("firmware: arm_scmi: Add common framework to handle firmware quirks")
Cc: stable@vger.kernel.org	# 6.16
Cc: Cristian Marussi <cristian.marussi@arm.com>
Reported-by: Jan Palus <jpalus@fastmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Message-Id: <20250829132152.28218-1-johan@kernel.org>
[sudeep.holla: minor commit message rewording; switch to cleanup helpers]
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2025-09-02 11:23:42 +01:00
Val Packett
30ee285f1e firmware: qcom: scm: Allow QSEECOM on Dell Inspiron 7441 / Latitude 7455
Allow these machines to access efivars through qseecom/uefisecapp.

Signed-off-by: Val Packett <val@packett.cool>
Reviewed-by: Laurentiu Tudor <laurentiu.tudor1@dell.com>
Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Link: https://lore.kernel.org/r/20250716003139.18543-5-val@packett.cool
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2025-09-01 11:35:56 -05:00
Jens Glathe
b10cac3988 firmware: qcom: scm: Allow QSEECOM on Lenovo Thinkbook 16
Allow particular machine accessing eg. efivars.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
Link: https://lore.kernel.org/r/20250822-tb16-dt-v12-2-bab6c2986351@oldschoolsolutions.biz
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2025-09-01 11:19:03 -05:00
Geert Uytterhoeven
05e75ac35e efi: Explain OVMF acronym in OVMF_DEBUG_LOG help text
People not very intimate with EFI may not know the meaning of the OVMF
acronym.  Write it in full, to help users with making good decisions
when configuring their kernels.

Fixes: f393a761763c5427 ("efi: add ovmf debug log driver")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Richard Lyu <richard.lyu@suse.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-08-29 19:02:04 +02:00
Jan Kiszka
134ed10939 efi: stmm: Drop unneeded null pointer check
The API documenation of setup_mm_hdr does not mention that dptr can be
NULL, this is a local function, and no caller passes NULL. So drop the
unneeded check.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Acked-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-08-26 14:49:42 +02:00
Jan Kiszka
01a3044af5 efi: stmm: Drop unused EFI error from setup_mm_hdr arguments
No caller ever evaluates what we return in 'ret'. They only use the
return code of the function.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Acked-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-08-26 14:49:42 +02:00
Jan Kiszka
80c6c10486 efi: stmm: Do not return EFI_OUT_OF_RESOURCES on internal errors
When we are low on memory or when the internal API is violated, we
cannot return EFI_OUT_OF_RESOURCES. According to the UEFI standard, that
error code is either related to persistent storage used for the variable
or even not foreseen as possible error (GetVariable e.g.). Use the not
fully accurate but compliant error code EFI_DEVICE_ERROR in those cases.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Acked-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-08-26 14:49:42 +02:00
Jan Kiszka
c5e81e6726 efi: stmm: Fix incorrect buffer allocation method
The communication buffer allocated by setup_mm_hdr() is later on passed
to tee_shm_register_kernel_buf(). The latter expects those buffers to be
contiguous pages, but setup_mm_hdr() just uses kmalloc(). That can cause
various corruptions or BUGs, specifically since commit 9aec2fb0fd5e
("slab: allocate frozen pages"), though it was broken before as well.

Fix this by using alloc_pages_exact() instead of kmalloc().

Fixes: c44b6be62e8d ("efi: Add tee-based EFI variable driver")
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Acked-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-08-26 14:47:53 +02:00
Kendall Willis
0fdd3240fe firmware: ti_sci: Enable abort handling of entry to LPM
The PM co-processor (device manager or DM) adds the ability to abort
entry to a low power mode by clearing the mode selection in the
latest version of its firmware (11.01.09) [1].

Enable the ti_sci driver to support the LPM abort call which clears the
low power mode selection of the DM. This fixes an issue where failed
system suspend attempts would cause subsequent suspends to fail.

After system suspend completes, regardless of if system suspend succeeds
or fails, the ->complete() hook in TI SCI will be called. In the
->complete() hook, a message will be sent to the DM to clear the current
low power mode selection. Clearing the low power mode selection
unconditionally will not cause any error in the DM.

[1] https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/pm/lpm.html

Signed-off-by: Kendall Willis <k-willis@ti.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://patch.msgid.link/20250819195453.1094520-1-k-willis@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>
2025-08-22 13:22:00 -05:00
Junnan Wu
e8faa8a466 firmware: arm_scmi: Mark VirtIO ready before registering scmi_virtio_driver
After commit 20bda12a0ea0 (“firmware: arm_scmi: Make VirtIO transport a
standalone driver”), the VirtIO transport probes independently. During
scmi_virtio_probe, scmi_probe() is called, which intune invokes
scmi_protocol_acquire() that sends a message over the virtqueue and
waits for a reply.

Previously, DRIVER_OK was only set after scmi_vio_probe, in the core
virtio via virtio_dev_probe(). According to the Virtio spec (3.1 Device
Initialization):
  |  The driver MUST NOT send any buffer available notifications to the
  |  device before setting DRIVER_OK.

Some type-1 hypervisors block available-buffer notifications until the
driver is marked OK. In such cases, scmi_vio_probe stalls in
scmi_wait_for_reply(), and the probe never completes.

Resolve this by setting DRIVER_OK immediately after the device-specific
setup, so scmi_probe() can safely send notifications.

Note after splitting the transports into modules, the probe sequence
changed a bit. We can no longer rely on virtio_device_ready() being
called by the core in virtio_dev_probe(), because scmi_vio_probe()
doesn’t complete until the core SCMI stack runs scmi_probe(), which
immediately issues the initial BASE protocol exchanges.

Fixes: 20bda12a0ea0 ("firmware: arm_scmi: Make VirtIO transport a standalone driver")
Signed-off-by: Junnan Wu <junnan01.wu@samsung.com>
Message-Id: <20250812075343.3201365-1-junnan01.wu@samsung.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2025-08-21 14:36:20 +01:00
Christophe JAILLET
224dcf2968 firmware: arm_scmi: Constify struct scmi_transport_ops
Mark struct scmi_transport_ops as const since this driver never modifies
it. Constifying moves it to read-only memory, improving hardening -
especially important for structures with function pointers.

x86_64 (allmodconfig) size diff:
Before:
   text    data     bss     dec     hex filename
   6907     680      48    7635    1dd3 drivers/firmware/arm_scmi/transports/optee.o

After:
   text    data     bss     dec     hex filename
   6987     576      48    7611    1dbb drivers/firmware/arm_scmi/transports/optee.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Message-Id: <881be6ad61037ed95d5e750a2565fd9840120a08.1753816459.git.christophe.jaillet@wanadoo.fr>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2025-08-21 14:15:19 +01:00
Christophe JAILLET
abd658d3e7 firmware: arm_scmi: Constify struct scmi_voltage_proto_ops
Constify struct scmi_voltage_proto_ops since the driver never modifies
it. Placing it in read-only memory (.rodata) improves hardening,
particularly because it contains function pointers.

x86_64 (allmodconfig) size impact:

Before:
   text    data     bss     dec     hex filename
  13142    1808       0   14950    3a66 drivers/firmware/arm_scmi/voltage.o

After:
   text    data     bss     dec     hex filename
  13238    1712       0   14950    3a66 drivers/firmware/arm_scmi/voltage.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Message-Id: <2091660c072dd2d5599897243a5d69e89d46ed4d.1753816459.git.christophe.jaillet@wanadoo.fr>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2025-08-21 14:14:59 +01:00
Yijie Yang
60a63913fd firmware: qcom: scm: Allow QSEECOM on HAMOA-IOT-EVK
Add the Hamoa-IoT-EVK board to the list to enable access to EFI variables.

Signed-off-by: Yijie Yang <yijie.yang@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250804-hamoa_initial-v4-2-19edbb28677b@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2025-08-11 11:21:51 -05:00
Mukesh Ojha
121fcf3c87 firmware: qcom: scm: preserve assign_mem() error return value
When qcom_scm_assign_mem() fails, the error value is currently being
overwritten after it is logged, resulting in the loss of the original
error code. Fix this by retaining and returning the original error value
as intended.

Signed-off-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250807124451.2623019-1-mukesh.ojha@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2025-08-11 10:13:35 -05:00