summaryrefslogtreecommitdiffstats
path: root/arch/arm/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-06-11 11:33:33 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-06-11 11:33:33 +0200
commit5238643cf467631e1bdd9d282706a16e63412acb (patch)
tree50ce3d1df5d23c0b7ea578a20044f89d423b864d /arch/arm/include
parenta34fd3272a88101483f74a608b07db4312a64015 (diff)
parent62260d6b6df4f4e36955279e1891e3e5a2fd8414 (diff)
downloadbarebox-5238643cf467631e1bdd9d282706a16e63412acb.tar.gz
barebox-5238643cf467631e1bdd9d282706a16e63412acb.tar.xz
Merge branch 'for-next/arm'
Diffstat (limited to 'arch/arm/include')
-rw-r--r--arch/arm/include/asm/arm-smccc.h104
-rw-r--r--arch/arm/include/asm/armlinux.h2
-rw-r--r--arch/arm/include/asm/barebox-arm.h3
-rw-r--r--arch/arm/include/asm/cache.h2
-rw-r--r--arch/arm/include/asm/psci.h2
5 files changed, 8 insertions, 105 deletions
diff --git a/arch/arm/include/asm/arm-smccc.h b/arch/arm/include/asm/arm-smccc.h
deleted file mode 100644
index b5abfda804..0000000000
--- a/arch/arm/include/asm/arm-smccc.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 2015, Linaro Limited
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-#ifndef __LINUX_ARM_SMCCC_H
-#define __LINUX_ARM_SMCCC_H
-
-#include <linux/linkage.h>
-#include <linux/types.h>
-
-/*
- * This file provides common defines for ARM SMC Calling Convention as
- * specified in
- * http://infocenter.arm.com/help/topic/com.arm.doc.den0028a/index.html
- */
-
-#define ARM_SMCCC_STD_CALL 0
-#define ARM_SMCCC_FAST_CALL 1
-#define ARM_SMCCC_TYPE_SHIFT 31
-
-#define ARM_SMCCC_SMC_32 0
-#define ARM_SMCCC_SMC_64 1
-#define ARM_SMCCC_CALL_CONV_SHIFT 30
-
-#define ARM_SMCCC_OWNER_MASK 0x3F
-#define ARM_SMCCC_OWNER_SHIFT 24
-
-#define ARM_SMCCC_FUNC_MASK 0xFFFF
-
-#define ARM_SMCCC_IS_FAST_CALL(smc_val) \
- ((smc_val) & (ARM_SMCCC_FAST_CALL << ARM_SMCCC_TYPE_SHIFT))
-#define ARM_SMCCC_IS_64(smc_val) \
- ((smc_val) & (ARM_SMCCC_SMC_64 << ARM_SMCCC_CALL_CONV_SHIFT))
-#define ARM_SMCCC_FUNC_NUM(smc_val) ((smc_val) & ARM_SMCCC_FUNC_MASK)
-#define ARM_SMCCC_OWNER_NUM(smc_val) \
- (((smc_val) >> ARM_SMCCC_OWNER_SHIFT) & ARM_SMCCC_OWNER_MASK)
-
-#define ARM_SMCCC_CALL_VAL(type, calling_convention, owner, func_num) \
- (((type) << ARM_SMCCC_TYPE_SHIFT) | \
- ((calling_convention) << ARM_SMCCC_CALL_CONV_SHIFT) | \
- (((owner) & ARM_SMCCC_OWNER_MASK) << ARM_SMCCC_OWNER_SHIFT) | \
- ((func_num) & ARM_SMCCC_FUNC_MASK))
-
-#define ARM_SMCCC_OWNER_ARCH 0
-#define ARM_SMCCC_OWNER_CPU 1
-#define ARM_SMCCC_OWNER_SIP 2
-#define ARM_SMCCC_OWNER_OEM 3
-#define ARM_SMCCC_OWNER_STANDARD 4
-#define ARM_SMCCC_OWNER_TRUSTED_APP 48
-#define ARM_SMCCC_OWNER_TRUSTED_APP_END 49
-#define ARM_SMCCC_OWNER_TRUSTED_OS 50
-#define ARM_SMCCC_OWNER_TRUSTED_OS_END 63
-
-/**
- * struct arm_smccc_res - Result from SMC/HVC call
- * @a0-a3 result values from registers 0 to 3
- */
-struct arm_smccc_res {
- unsigned long a0;
- unsigned long a1;
- unsigned long a2;
- unsigned long a3;
-};
-
-/**
- * arm_smccc_smc() - make SMC calls
- * @a0-a7: arguments passed in registers 0 to 7
- * @res: result values from registers 0 to 3
- *
- * This function is used to make SMC calls following SMC Calling Convention.
- * The content of the supplied param are copied to registers 0 to 7 prior
- * to the SMC instruction. The return values are updated with the content
- * from register 0 to 3 on return from the SMC instruction.
- */
-asmlinkage void arm_smccc_smc(unsigned long a0, unsigned long a1,
- unsigned long a2, unsigned long a3, unsigned long a4,
- unsigned long a5, unsigned long a6, unsigned long a7,
- struct arm_smccc_res *res);
-
-/**
- * arm_smccc_hvc() - make HVC calls
- * @a0-a7: arguments passed in registers 0 to 7
- * @res: result values from registers 0 to 3
- *
- * This function is used to make HVC calls following SMC Calling
- * Convention. The content of the supplied param are copied to registers 0
- * to 7 prior to the HVC instruction. The return values are updated with
- * the content from register 0 to 3 on return from the HVC instruction.
- */
-asmlinkage void arm_smccc_hvc(unsigned long a0, unsigned long a1,
- unsigned long a2, unsigned long a3, unsigned long a4,
- unsigned long a5, unsigned long a6, unsigned long a7,
- struct arm_smccc_res *res);
-
-#endif /*__LINUX_ARM_SMCCC_H*/
diff --git a/arch/arm/include/asm/armlinux.h b/arch/arm/include/asm/armlinux.h
index 135f11b860..6af98968fa 100644
--- a/arch/arm/include/asm/armlinux.h
+++ b/arch/arm/include/asm/armlinux.h
@@ -40,6 +40,6 @@ struct image_data;
void start_linux(void *adr, int swap, unsigned long initrd_address,
unsigned long initrd_size, void *oftree,
- enum arm_security_state);
+ enum arm_security_state, void *optee);
#endif /* __ARCH_ARMLINUX_H */
diff --git a/arch/arm/include/asm/barebox-arm.h b/arch/arm/include/asm/barebox-arm.h
index a11d34923d..a1e6bff3a3 100644
--- a/arch/arm/include/asm/barebox-arm.h
+++ b/arch/arm/include/asm/barebox-arm.h
@@ -110,6 +110,9 @@ void *barebox_arm_boot_dtb(void);
static inline unsigned long arm_mem_stack_top(unsigned long membase,
unsigned long endmem)
{
+ if (IS_ENABLED(CONFIG_BOOTM_OPTEE))
+ endmem -= OPTEE_SIZE;
+
return endmem - SZ_64K;
}
diff --git a/arch/arm/include/asm/cache.h b/arch/arm/include/asm/cache.h
index 0822cb78c3..bf3a1a0ed2 100644
--- a/arch/arm/include/asm/cache.h
+++ b/arch/arm/include/asm/cache.h
@@ -21,4 +21,6 @@ int arm_set_cache_functions(void);
void arm_early_mmu_cache_flush(void);
void arm_early_mmu_cache_invalidate(void);
+void sync_caches_for_execution(void);
+
#endif
diff --git a/arch/arm/include/asm/psci.h b/arch/arm/include/asm/psci.h
index e0c4525389..f2db967f3a 100644
--- a/arch/arm/include/asm/psci.h
+++ b/arch/arm/include/asm/psci.h
@@ -137,4 +137,6 @@ static inline int psci_printf(const char *fmt, ...)
int psci_get_cpu_id(void);
+int of_psci_fixup(struct device_node *root, unsigned long psci_version);
+
#endif /* __ARM_PSCI_H__ */