summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Bonnici <marc.bonnici@arm.com>2020-05-06 11:33:18 +0100
committerMarc Bonnici <marc.bonnici@arm.com>2020-09-25 14:39:55 +0100
commit0ef4998010dada72de1b5e986d501af668861782 (patch)
tree595dd684fc58314bbf13085d85950c421108d65b
parent761ed5de91cc268a12620ce76bccedb79439a7de (diff)
downloadarm-trusted-firmware-0ef4998010dada72de1b5e986d501af668861782.tar.gz
Enable running OP-TEE as an S-EL1 partition
- Add manifest and sp_layout files. - Increase ARM_SP_MAX_SIZE to 0x100000 to prevent boot loop. - Add additional allowed memory region for OP-TEE. - Update the start/end addressed of ramdisk. Change-Id: I0f888e03e9f4cafba8988004ba4d6489ba4af0fb
-rw-r--r--include/plat/arm/common/fconf_arm_sp_getter.h2
-rw-r--r--optee_manifest.dts67
-rw-r--r--plat/arm/board/fvp/fdts/fvp_fw_config.dts9
-rw-r--r--plat/arm/board/fvp/fdts/fvp_spmc_manifest.dts18
-rw-r--r--sp_layout.json12
5 files changed, 88 insertions, 20 deletions
diff --git a/include/plat/arm/common/fconf_arm_sp_getter.h b/include/plat/arm/common/fconf_arm_sp_getter.h
index 38c30fbf9..f12384f31 100644
--- a/include/plat/arm/common/fconf_arm_sp_getter.h
+++ b/include/plat/arm/common/fconf_arm_sp_getter.h
@@ -13,7 +13,7 @@
/* arm_sp getter */
#define arm__sp_getter(prop) arm_sp.prop
-#define ARM_SP_MAX_SIZE U(0x10000)
+#define ARM_SP_MAX_SIZE U(0x100000)
struct arm_sp_t {
unsigned int number_of_sp;
diff --git a/optee_manifest.dts b/optee_manifest.dts
new file mode 100644
index 000000000..d8d65b029
--- /dev/null
+++ b/optee_manifest.dts
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2020, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ * This file is a Partition Manifest (PM) for a minimal Secure Partition (SP)
+ * that has additional optional properties defined.
+ *
+ */
+
+/dts-v1/;
+
+/ {
+ compatible = "arm,spci-manifest-1.0";
+
+ /* Properties */
+ description = "op-tee";
+ spci-version = <0x00000009>; /* 31:16 - Major, 15:0 - Minor */
+ uuid = <0xb4b5671e 0x4a904fe1 0xb81ffb13 0xdae1dacb>;
+ id = <1>;
+ auxiliary-id = <0xae>;
+ stream-endpoint-ids = <0 1 2 3>;
+ execution-ctx-count = <1>;
+ exception-level = <2>; /* S-EL1 */
+ execution-state = <0>; /* AARCH64 */
+ load-address = <0x6280000>;
+ entrypoint-offset = <0x1000>;
+ xlat-granule = <0>; /* 4KiB */
+ boot-order = <0>;
+ messaging-method = <0>; /* Direct messaging only */
+ run-time-model = <0>; /* Run to completion */
+
+ /* Boot protocol */
+ gp-register-num = <0x0>;
+
+ rx_tx-info {
+ compatible = "arm,spci-manifest-rx_tx-buffer";
+
+ description = "NS RX/TX Buffer";
+ pages-count = <1>;
+ attributes = <0x0>;
+ base-address = <0x7200000>;
+ };
+
+ memory-regions {
+ compatible = "arm,spci-manifest-memory-regions";
+ test-memory {
+ description = "Test Memory";
+ pages-count = <32>; /* 128KiB with 4KiB pages */
+ base-address = <0x00000000 0x21000000>;
+ attributes = <0x0>;
+ };
+ };
+
+ device-regions {
+ compatible = "arm,spci-manifest-device-regions";
+ attributes = <0x0>;
+ test-reg {
+ reg = <0x10000008 0x00000001 1>; /* Arbitrary test address */
+ smmu-id = <1>;
+ stream-ids = <0x0 0x1>;
+ interrupts = <0x2 0x3>,
+ <0x4 0x5>;
+ };
+ };
+
+};
diff --git a/plat/arm/board/fvp/fdts/fvp_fw_config.dts b/plat/arm/board/fvp/fdts/fvp_fw_config.dts
index 7c111085d..9f348dc46 100644
--- a/plat/arm/board/fvp/fdts/fvp_fw_config.dts
+++ b/plat/arm/board/fvp/fdts/fvp_fw_config.dts
@@ -117,14 +117,9 @@
secure-partitions {
compatible = "arm,sp";
- cactus-primary {
+ op-tee {
uuid = <0x1e67b5b4 0xe14f904a 0x13fb1fb8 0xcbdae1da>;
- load-address = <0x7000000>;
- };
-
- cactus-secondary {
- uuid = <0x092358d1 0xb94723f0 0x64447c82 0xc88f57f5>;
- load-address = <0x7100000>;
+ load-address = <0x6280000>;
};
};
};
diff --git a/plat/arm/board/fvp/fdts/fvp_spmc_manifest.dts b/plat/arm/board/fvp/fdts/fvp_spmc_manifest.dts
index ebfbe174b..191f06465 100644
--- a/plat/arm/board/fvp/fdts/fvp_spmc_manifest.dts
+++ b/plat/arm/board/fvp/fdts/fvp_spmc_manifest.dts
@@ -18,23 +18,17 @@
};
chosen {
- linux,initrd-start = <0>;
- linux,initrd-end = <0>;
+ linux,initrd-start = <0xA000000>;
+ linux,initrd-end = <0xB000000>;
};
hypervisor {
compatible = "hafnium,hafnium";
vm1 {
is_spci_partition;
- debug_name = "cactus-primary";
- load_address = <0x7000000>;
- };
- vm2 {
- is_spci_partition;
- debug_name = "cactus-secondary";
- load_address = <0x7100000>;
- vcpu_count = <2>;
- mem_size = <1048576>;
+ debug_name = "op-tee";
+ load-addr = <0x6280000>;
+ smc_whitelist = <0xbe000000>;
};
};
@@ -62,6 +56,6 @@
memory@60000000 {
device_type = "memory";
- reg = <0x6000000 0x2000000>; /* Trusted DRAM */
+ reg = <0x6000000 0x2000000 0x1c090000 0x3812ffff>; /* Trusted DRAM */
};
};
diff --git a/sp_layout.json b/sp_layout.json
new file mode 100644
index 000000000..c4c02b5f2
--- /dev/null
+++ b/sp_layout.json
@@ -0,0 +1,12 @@
+/*
+ * Copyright (c) 2019-2020, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+{
+ "op-tee" : {
+ "image": "../optee_os/out/arm-plat-vexpress/core/tee-pager_v2.bin",
+ "pm": "optee_manifest.dts"
+ }
+}