diff options
author | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2018-12-05 14:38:15 +0000 |
---|---|---|
committer | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2018-12-05 14:38:15 +0000 |
commit | 7e1e5e8d1d29ea10d6aabae3558fd76109c44ddb (patch) | |
tree | a4e05b381b3f803b17aa8af22eb183cc753d6557 | |
parent | 99f4fd283b6ff75cfe4726495a46f8dccb057138 (diff) | |
download | tf-a-tests-7e1e5e8d1d29ea10d6aabae3558fd76109c44ddb.tar.gz |
cactus: Create resource description DTS
All information about Cactus is now described in this file.
Change-Id: Ibe4b657b6cdd1bda582b29138752ef41134db208
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
-rw-r--r-- | spm/cactus/cactus.dts | 119 | ||||
-rw-r--r-- | spm/cactus/cactus_def.h | 55 |
2 files changed, 174 insertions, 0 deletions
diff --git a/spm/cactus/cactus.dts b/spm/cactus/cactus.dts new file mode 100644 index 000000000..cf89d7fe8 --- /dev/null +++ b/spm/cactus/cactus.dts @@ -0,0 +1,119 @@ +/* + * Copyright (c) 2018, Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include <sp_res_desc_def.h> + +#include "cactus_def.h" + +/* 4 KiB pages */ +#define PAGE_SIZE U(0x1000) + +/* + * FVP platform layout. The defines are hardcoded here because including the + * platform headers have too many dependencies. + * TODO: Move this to the platform layer. + */ +#define V2M_IOFPGA_BASE ULL(0x1c000000) +#define V2M_IOFPGA_SIZE ULL(0x03000000) + +/* Aggregate of all devices in the first GB. */ +#define DEVICE0_BASE ULL(0x20000000) +#define DEVICE0_SIZE ULL(0x0c200000) + +/dts-v1/; + +/ { + compatible = "arm,sp_rd"; + + attribute { + version = <0x00000001>; + sp_type = <RD_ATTR_TYPE_UP_MIGRATABLE>; + pe_mpidr = <0>; /* Unused */ + runtime_el = <RD_ATTR_RUNTIME_SEL0>; + exec_type = <RD_ATTR_RUNTIME>; + panic_policy = <RD_ATTR_PANIC_ONESHOT>; + xlat_granule = <RD_ATTR_XLAT_GRANULE_4KB>; + binary_size = <CACTUS_IMAGE_SIZE>; + load_address = <0x00000000 CACTUS_IMAGE_BASE>; + entrypoint = <0x00000000 CACTUS_IMAGE_BASE>; + }; + + memory_regions { + v2m_iofpga { + str = "V2M IOFPGA"; + base = <0x00000000 V2M_IOFPGA_BASE>; + size = <0x00000000 V2M_IOFPGA_SIZE>; + attr = <RD_MEM_DEVICE>; + }; + + device0 { + str = "Device 0"; + base = <0x00000000 DEVICE0_BASE>; + size = <0x00000000 DEVICE0_SIZE>; + attr = <RD_MEM_DEVICE>; + }; + + spm_buffer { + str = "SPM buffer"; + base = <0x00000000 CACTUS_SPM_BUF_BASE>; + size = <0x00000000 CACTUS_SPM_BUF_SIZE>; + attr = <RD_MEM_NORMAL_SPM_SP_SHARED_MEM>; + }; + + ns_buffer { + str = "NS buffer"; + base = <0x00000000 CACTUS_NS_BUF_BASE>; + size = <0x00000000 CACTUS_NS_BUF_SIZE>; + attr = <RD_MEM_NORMAL_CLIENT_SHARED_MEM>; + }; + + test_memory { + str = "Test memory"; + base = <0x00000000 CACTUS_TEST_MEM_BASE>; + size = <0x00000000 CACTUS_TEST_MEM_SIZE>; + attr = <RD_MEM_NORMAL_MISCELLANEOUS>; + }; + }; + + notifications { + notification_0 { + attr = <0>; + pe = <0>; + }; + }; + + services { + test_service_1 { + uuid = <CACTUS_SERVICE1_UUID_RD>; + + accessibility = <(RD_SERV_ACCESS_SECURE | + RD_SERV_ACCESS_EL3 | + RD_SERV_ACCESS_NORMAL)>; + request_type = <(RD_SERV_SUPPORT_BLOCKING | + RD_SERV_SUPPORT_NON_BLOCKING)>; + connection_quota = <10>; + sec_mem_size = <0>; + interrupt_num = <0>; + + required_uuids { + uuid_0 = <CACTUS_SERVICE2_UUID_RD>; + }; + }; + + test_service_2 { + uuid = <CACTUS_SERVICE2_UUID_RD>; + + accessibility = <(RD_SERV_ACCESS_SECURE | + RD_SERV_ACCESS_EL3 | + RD_SERV_ACCESS_NORMAL)>; + request_type = <(RD_SERV_SUPPORT_BLOCKING | + RD_SERV_SUPPORT_NON_BLOCKING)>; + connection_quota = <10>; + sec_mem_size = <0>; + interrupt_num = <0>; + }; + }; +}; diff --git a/spm/cactus/cactus_def.h b/spm/cactus/cactus_def.h new file mode 100644 index 000000000..498321539 --- /dev/null +++ b/spm/cactus/cactus_def.h @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2018, Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef CACTUS_DEF_H +#define CACTUS_DEF_H + +#include <utils_def.h> + +/* + * Layout of the Secure Partition image. + */ + +/* Up to 2 MiB at an arbitrary address that doesn't overlap the devices. */ +#define CACTUS_IMAGE_BASE ULL(0x80000000) +#define CACTUS_IMAGE_SIZE ULL(0x200000) + +/* Memory shared between EL3 and S-EL0 (64 KiB). */ +#define CACTUS_SPM_BUF_BASE (CACTUS_IMAGE_BASE + CACTUS_IMAGE_SIZE) +#define CACTUS_SPM_BUF_SIZE ULL(0x10000) + +/* Memory shared between Normal world and S-EL0 (64 KiB). */ +#define CACTUS_NS_BUF_BASE (CACTUS_SPM_BUF_BASE + CACTUS_SPM_BUF_SIZE) +#define CACTUS_NS_BUF_SIZE ULL(0x10000) + +/* Memory area used by tests (128 KiB). */ +#define CACTUS_TEST_MEM_BASE (CACTUS_NS_BUF_BASE + CACTUS_NS_BUF_SIZE) +#define CACTUS_TEST_MEM_SIZE ULL(0x20000) + +/* + * UUIDs of Secure Services provided by Cactus + */ + +#define CACTUS_SERVICE1_UUID U(0x01234567), U(0x89ABCDEF), U(0x76543210), U(0xFEDCBA98) +#define CACTUS_SERVICE2_UUID U(0x0A1B2C3D), U(0x4E5F6789), U(0x55AA00FF), U(0x0F1E2D3C) +#define CACTUS_INVALID_UUID U(0x1), U(0x2), U(0x3), U(0x4) + +#define CACTUS_SERVICE1_UUID_RD U(0x01234567) U(0x89ABCDEF) U(0x76543210) U(0xFEDCBA98) +#define CACTUS_SERVICE2_UUID_RD U(0x0A1B2C3D) U(0x4E5F6789) U(0x55AA00FF) U(0x0F1E2D3C) +#define CACTUS_INVALID_UUID_RD U(0x1) U(0x2) U(0x3) U(0x4) + +/* + * Service IDs + */ + +/* Print a magic number unique to Cactus and return */ +#define CACTUS_PRINT_MAGIC U(1) +/* Return a magic number unique to Cactus */ +#define CACTUS_GET_MAGIC U(2) + +#define CACTUS_MAGIC_NUMBER U(0x12481369) + +#endif /* CACTUS_DEF_H */ |