xref: /linux/drivers/firmware/qcom/Kconfig (revision edc84a9396acf1a0e78c46230dd0bcee1b84ac53)
1bdac188eSBartosz Golaszewski# SPDX-License-Identifier: GPL-2.0-only
2bdac188eSBartosz Golaszewski#
3bdac188eSBartosz Golaszewski# For a description of the syntax of this configuration file,
4bdac188eSBartosz Golaszewski# see Documentation/kbuild/kconfig-language.rst.
5bdac188eSBartosz Golaszewski#
6bdac188eSBartosz Golaszewski
7bdac188eSBartosz Golaszewskimenu "Qualcomm firmware drivers"
8bdac188eSBartosz Golaszewski
908314e7cSSumit Gargconfig QCOM_PAS
1008314e7cSSumit Garg	tristate "Qualcomm generic PAS interface driver"
1108314e7cSSumit Garg	help
1208314e7cSSumit Garg	  Enable the generic Peripheral Authentication Service (PAS) provided
1308314e7cSSumit Garg	  by the firmware. It acts as the common layer with different TZ
1408314e7cSSumit Garg	  backends plugged in whether it's an SCM implementation or a proper
1508314e7cSSumit Garg	  TEE bus based PAS service implementation.
1608314e7cSSumit Garg
17*b6f7978dSSumit Gargconfig QCOM_PAS_TEE
18*b6f7978dSSumit Garg	tristate "Qualcomm PAS TEE interface driver"
19*b6f7978dSSumit Garg	select QCOM_PAS
20*b6f7978dSSumit Garg	depends on TEE
21*b6f7978dSSumit Garg	depends on !CPU_BIG_ENDIAN
22*b6f7978dSSumit Garg	default m if ARCH_QCOM
23*b6f7978dSSumit Garg	help
24*b6f7978dSSumit Garg	  Enable the generic Peripheral Authentication Service (PAS) provided
25*b6f7978dSSumit Garg	  by the firmware TEE implementation as the backend.
26*b6f7978dSSumit Garg
27bdac188eSBartosz Golaszewskiconfig QCOM_SCM
285c1a2975SSumit Garg	tristate "Qualcomm PAS SCM interface driver"
295c1a2975SSumit Garg	select QCOM_PAS
3040289e35SBartosz Golaszewski	select QCOM_TZMEM
315c1a2975SSumit Garg	default y if ARCH_QCOM
32bdac188eSBartosz Golaszewski
3384f5a7b6SBartosz Golaszewskiconfig QCOM_TZMEM
3484f5a7b6SBartosz Golaszewski	tristate
3584f5a7b6SBartosz Golaszewski	select GENERIC_ALLOCATOR
3684f5a7b6SBartosz Golaszewski
3784f5a7b6SBartosz Golaszewskichoice
3884f5a7b6SBartosz Golaszewski	prompt "TrustZone interface memory allocator mode"
399de4ad3bSLinus Torvalds	depends on QCOM_TZMEM
4084f5a7b6SBartosz Golaszewski	default QCOM_TZMEM_MODE_GENERIC
4184f5a7b6SBartosz Golaszewski	help
4284f5a7b6SBartosz Golaszewski	  Selects the mode of the memory allocator providing memory buffers of
4384f5a7b6SBartosz Golaszewski	  suitable format for sharing with the TrustZone. If in doubt, select
4484f5a7b6SBartosz Golaszewski	  'Generic'.
4584f5a7b6SBartosz Golaszewski
4684f5a7b6SBartosz Golaszewskiconfig QCOM_TZMEM_MODE_GENERIC
4784f5a7b6SBartosz Golaszewski	bool "Generic"
4884f5a7b6SBartosz Golaszewski	help
4984f5a7b6SBartosz Golaszewski	  Use the generic allocator mode. The memory is page-aligned, non-cachable
5084f5a7b6SBartosz Golaszewski	  and physically contiguous.
5184f5a7b6SBartosz Golaszewski
52f86c6149SBartosz Golaszewskiconfig QCOM_TZMEM_MODE_SHMBRIDGE
53f86c6149SBartosz Golaszewski	bool "SHM Bridge"
54f86c6149SBartosz Golaszewski	help
55f86c6149SBartosz Golaszewski	  Use Qualcomm Shared Memory Bridge. The memory has the same alignment as
56f86c6149SBartosz Golaszewski	  in the 'Generic' allocator but is also explicitly marked as an SHM Bridge
57f86c6149SBartosz Golaszewski	  buffer.
58f86c6149SBartosz Golaszewski
59f86c6149SBartosz Golaszewski	  With this selected, all buffers passed to the TrustZone must be allocated
60f86c6149SBartosz Golaszewski	  using the TZMem allocator or else the TrustZone will refuse to use them.
61f86c6149SBartosz Golaszewski
6284f5a7b6SBartosz Golaszewskiendchoice
6384f5a7b6SBartosz Golaszewski
64bdac188eSBartosz Golaszewskiconfig QCOM_QSEECOM
65bdac188eSBartosz Golaszewski	bool "Qualcomm QSEECOM interface driver"
66bdac188eSBartosz Golaszewski	depends on QCOM_SCM=y
67bdac188eSBartosz Golaszewski	select AUXILIARY_BUS
68bdac188eSBartosz Golaszewski	help
69bdac188eSBartosz Golaszewski	  Various Qualcomm SoCs have a Secure Execution Environment (SEE) running
70bdac188eSBartosz Golaszewski	  in the Trust Zone. This module provides an interface to that via the
71bdac188eSBartosz Golaszewski	  QSEECOM mechanism, using SCM calls.
72bdac188eSBartosz Golaszewski
73bdac188eSBartosz Golaszewski	  The QSEECOM interface allows, among other things, access to applications
74bdac188eSBartosz Golaszewski	  running in the SEE. An example of such an application is 'uefisecapp',
75bdac188eSBartosz Golaszewski	  which is required to access UEFI variables on certain systems. If
76bdac188eSBartosz Golaszewski	  selected, the interface will also attempt to detect and register client
77bdac188eSBartosz Golaszewski	  devices for supported applications.
78bdac188eSBartosz Golaszewski
79bdac188eSBartosz Golaszewski	  Select Y here to enable the QSEECOM interface driver.
80bdac188eSBartosz Golaszewski
81bdac188eSBartosz Golaszewskiconfig QCOM_QSEECOM_UEFISECAPP
82bdac188eSBartosz Golaszewski	bool "Qualcomm SEE UEFI Secure App client driver"
83bdac188eSBartosz Golaszewski	depends on QCOM_QSEECOM
84bdac188eSBartosz Golaszewski	depends on EFI
85bdac188eSBartosz Golaszewski	help
86bdac188eSBartosz Golaszewski	  Various Qualcomm SoCs do not allow direct access to EFI variables.
87bdac188eSBartosz Golaszewski	  Instead, these need to be accessed via the UEFI Secure Application
88bdac188eSBartosz Golaszewski	  (uefisecapp), residing in the Secure Execution Environment (SEE).
89bdac188eSBartosz Golaszewski
90bdac188eSBartosz Golaszewski	  This module provides a client driver for uefisecapp, installing efivar
91bdac188eSBartosz Golaszewski	  operations to allow the kernel accessing EFI variables, and via that also
92bdac188eSBartosz Golaszewski	  provide user-space with access to EFI variables via efivarfs.
93bdac188eSBartosz Golaszewski
94bdac188eSBartosz Golaszewski	  Select Y here to provide access to EFI variables on the aforementioned
95bdac188eSBartosz Golaszewski	  platforms.
96bdac188eSBartosz Golaszewski
97bdac188eSBartosz Golaszewskiendmenu
98