firmware: Move Trusted Foundations support
Move the Trusted Foundations support out of arch/arm/firmware and into drivers/firmware where most other firmware support implementations are located. Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
parent
c8e7755ec6
commit
4cb5d9eca1
@ -899,8 +899,6 @@ config PLAT_PXA
|
|||||||
config PLAT_VERSATILE
|
config PLAT_VERSATILE
|
||||||
bool
|
bool
|
||||||
|
|
||||||
source "arch/arm/firmware/Kconfig"
|
|
||||||
|
|
||||||
source "arch/arm/mm/Kconfig"
|
source "arch/arm/mm/Kconfig"
|
||||||
|
|
||||||
config IWMMXT
|
config IWMMXT
|
||||||
|
@ -290,7 +290,6 @@ core-y += arch/arm/kernel/ arch/arm/mm/ arch/arm/common/
|
|||||||
core-y += arch/arm/probes/
|
core-y += arch/arm/probes/
|
||||||
core-y += arch/arm/net/
|
core-y += arch/arm/net/
|
||||||
core-y += arch/arm/crypto/
|
core-y += arch/arm/crypto/
|
||||||
core-y += arch/arm/firmware/
|
|
||||||
core-y += $(machdirs) $(platdirs)
|
core-y += $(machdirs) $(platdirs)
|
||||||
|
|
||||||
drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/
|
drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
config ARCH_SUPPORTS_FIRMWARE
|
|
||||||
bool
|
|
||||||
|
|
||||||
config ARCH_SUPPORTS_TRUSTED_FOUNDATIONS
|
|
||||||
bool
|
|
||||||
select ARCH_SUPPORTS_FIRMWARE
|
|
||||||
|
|
||||||
menu "Firmware options"
|
|
||||||
depends on ARCH_SUPPORTS_FIRMWARE
|
|
||||||
|
|
||||||
config TRUSTED_FOUNDATIONS
|
|
||||||
bool "Trusted Foundations secure monitor support"
|
|
||||||
depends on ARCH_SUPPORTS_TRUSTED_FOUNDATIONS
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
Some devices (including most Tegra-based consumer devices on the
|
|
||||||
market) are booted with the Trusted Foundations secure monitor
|
|
||||||
active, requiring some core operations to be performed by the secure
|
|
||||||
monitor instead of the kernel.
|
|
||||||
|
|
||||||
This option allows the kernel to invoke the secure monitor whenever
|
|
||||||
required on devices using Trusted Foundations. See
|
|
||||||
arch/arm/include/asm/trusted_foundations.h or the
|
|
||||||
tlm,trusted-foundations device tree binding documentation for details
|
|
||||||
on how to use it.
|
|
||||||
|
|
||||||
Say n if you don't know what this is about.
|
|
||||||
|
|
||||||
endmenu
|
|
@ -1,4 +0,0 @@
|
|||||||
obj-$(CONFIG_TRUSTED_FOUNDATIONS) += trusted_foundations.o
|
|
||||||
|
|
||||||
# tf_generic_smc() fails to build with -fsanitize-coverage=trace-pc
|
|
||||||
KCOV_INSTRUMENT := n
|
|
@ -3,7 +3,6 @@ menuconfig ARCH_TEGRA
|
|||||||
bool "NVIDIA Tegra"
|
bool "NVIDIA Tegra"
|
||||||
depends on ARCH_MULTI_V7
|
depends on ARCH_MULTI_V7
|
||||||
select ARCH_HAS_RESET_CONTROLLER
|
select ARCH_HAS_RESET_CONTROLLER
|
||||||
select ARCH_SUPPORTS_TRUSTED_FOUNDATIONS
|
|
||||||
select ARM_AMBA
|
select ARM_AMBA
|
||||||
select ARM_GIC
|
select ARM_GIC
|
||||||
select CLKSRC_MMIO
|
select CLKSRC_MMIO
|
||||||
|
@ -21,10 +21,11 @@
|
|||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
|
||||||
|
#include <linux/firmware/trusted_foundations.h>
|
||||||
|
|
||||||
#include <asm/cpuidle.h>
|
#include <asm/cpuidle.h>
|
||||||
#include <asm/smp_plat.h>
|
#include <asm/smp_plat.h>
|
||||||
#include <asm/suspend.h>
|
#include <asm/suspend.h>
|
||||||
#include <asm/trusted_foundations.h>
|
|
||||||
#include <asm/psci.h>
|
#include <asm/psci.h>
|
||||||
|
|
||||||
#include "cpuidle.h"
|
#include "cpuidle.h"
|
||||||
|
@ -27,6 +27,8 @@
|
|||||||
#include <linux/spinlock.h>
|
#include <linux/spinlock.h>
|
||||||
#include <linux/suspend.h>
|
#include <linux/suspend.h>
|
||||||
|
|
||||||
|
#include <linux/firmware/trusted_foundations.h>
|
||||||
|
|
||||||
#include <soc/tegra/flowctrl.h>
|
#include <soc/tegra/flowctrl.h>
|
||||||
#include <soc/tegra/fuse.h>
|
#include <soc/tegra/fuse.h>
|
||||||
#include <soc/tegra/pm.h>
|
#include <soc/tegra/pm.h>
|
||||||
@ -39,7 +41,6 @@
|
|||||||
#include <asm/smp_plat.h>
|
#include <asm/smp_plat.h>
|
||||||
#include <asm/suspend.h>
|
#include <asm/suspend.h>
|
||||||
#include <asm/tlbflush.h>
|
#include <asm/tlbflush.h>
|
||||||
#include <asm/trusted_foundations.h>
|
|
||||||
|
|
||||||
#include "iomap.h"
|
#include "iomap.h"
|
||||||
#include "pm.h"
|
#include "pm.h"
|
||||||
|
@ -19,12 +19,13 @@
|
|||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
|
|
||||||
|
#include <linux/firmware/trusted_foundations.h>
|
||||||
|
|
||||||
#include <soc/tegra/fuse.h>
|
#include <soc/tegra/fuse.h>
|
||||||
|
|
||||||
#include <asm/cacheflush.h>
|
#include <asm/cacheflush.h>
|
||||||
#include <asm/firmware.h>
|
#include <asm/firmware.h>
|
||||||
#include <asm/hardware/cache-l2x0.h>
|
#include <asm/hardware/cache-l2x0.h>
|
||||||
#include <asm/trusted_foundations.h>
|
|
||||||
|
|
||||||
#include "iomap.h"
|
#include "iomap.h"
|
||||||
#include "irammap.h"
|
#include "irammap.h"
|
||||||
|
@ -35,6 +35,8 @@
|
|||||||
#include <linux/sys_soc.h>
|
#include <linux/sys_soc.h>
|
||||||
#include <linux/usb/tegra_usb_phy.h>
|
#include <linux/usb/tegra_usb_phy.h>
|
||||||
|
|
||||||
|
#include <linux/firmware/trusted_foundations.h>
|
||||||
|
|
||||||
#include <soc/tegra/fuse.h>
|
#include <soc/tegra/fuse.h>
|
||||||
#include <soc/tegra/pmc.h>
|
#include <soc/tegra/pmc.h>
|
||||||
|
|
||||||
@ -44,7 +46,6 @@
|
|||||||
#include <asm/mach/time.h>
|
#include <asm/mach/time.h>
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
#include <asm/setup.h>
|
#include <asm/setup.h>
|
||||||
#include <asm/trusted_foundations.h>
|
|
||||||
|
|
||||||
#include "board.h"
|
#include "board.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
@ -267,6 +267,22 @@ config TI_SCI_PROTOCOL
|
|||||||
This protocol library is used by client drivers to use the features
|
This protocol library is used by client drivers to use the features
|
||||||
provided by the system controller.
|
provided by the system controller.
|
||||||
|
|
||||||
|
config TRUSTED_FOUNDATIONS
|
||||||
|
bool "Trusted Foundations secure monitor support"
|
||||||
|
depends on ARM
|
||||||
|
help
|
||||||
|
Some devices (including most early Tegra-based consumer devices on
|
||||||
|
the market) are booted with the Trusted Foundations secure monitor
|
||||||
|
active, requiring some core operations to be performed by the secure
|
||||||
|
monitor instead of the kernel.
|
||||||
|
|
||||||
|
This option allows the kernel to invoke the secure monitor whenever
|
||||||
|
required on devices using Trusted Foundations. See the functions and
|
||||||
|
comments in linux/firmware/trusted_foundations.h or the device tree
|
||||||
|
bindings for "tlm,trusted-foundations" for details on how to use it.
|
||||||
|
|
||||||
|
Choose N if you don't know what this is about.
|
||||||
|
|
||||||
config HAVE_ARM_SMCCC
|
config HAVE_ARM_SMCCC
|
||||||
bool
|
bool
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ obj-$(CONFIG_QCOM_SCM_64) += qcom_scm-64.o
|
|||||||
obj-$(CONFIG_QCOM_SCM_32) += qcom_scm-32.o
|
obj-$(CONFIG_QCOM_SCM_32) += qcom_scm-32.o
|
||||||
CFLAGS_qcom_scm-32.o :=$(call as-instr,.arch armv7-a\n.arch_extension sec,-DREQUIRES_SEC=1) -march=armv7-a
|
CFLAGS_qcom_scm-32.o :=$(call as-instr,.arch armv7-a\n.arch_extension sec,-DREQUIRES_SEC=1) -march=armv7-a
|
||||||
obj-$(CONFIG_TI_SCI_PROTOCOL) += ti_sci.o
|
obj-$(CONFIG_TI_SCI_PROTOCOL) += ti_sci.o
|
||||||
|
obj-$(CONFIG_TRUSTED_FOUNDATIONS) += trusted_foundations.o
|
||||||
|
|
||||||
obj-$(CONFIG_ARM_SCMI_PROTOCOL) += arm_scmi/
|
obj-$(CONFIG_ARM_SCMI_PROTOCOL) += arm_scmi/
|
||||||
obj-y += broadcom/
|
obj-y += broadcom/
|
||||||
|
@ -17,10 +17,12 @@
|
|||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/of.h>
|
#include <linux/of.h>
|
||||||
|
|
||||||
|
#include <linux/firmware/trusted_foundations.h>
|
||||||
|
|
||||||
#include <asm/firmware.h>
|
#include <asm/firmware.h>
|
||||||
#include <asm/hardware/cache-l2x0.h>
|
#include <asm/hardware/cache-l2x0.h>
|
||||||
#include <asm/outercache.h>
|
#include <asm/outercache.h>
|
||||||
#include <asm/trusted_foundations.h>
|
|
||||||
|
|
||||||
#define TF_CACHE_MAINT 0xfffff100
|
#define TF_CACHE_MAINT 0xfffff100
|
||||||
|
|
@ -23,8 +23,8 @@
|
|||||||
* PSCI standard.
|
* PSCI standard.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __ASM_ARM_TRUSTED_FOUNDATIONS_H
|
#ifndef __FIRMWARE_TRUSTED_FOUNDATIONS_H
|
||||||
#define __ASM_ARM_TRUSTED_FOUNDATIONS_H
|
#define __FIRMWARE_TRUSTED_FOUNDATIONS_H
|
||||||
|
|
||||||
#include <linux/printk.h>
|
#include <linux/printk.h>
|
||||||
#include <linux/bug.h>
|
#include <linux/bug.h>
|
Loading…
Reference in New Issue
Block a user