]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
plat/arm: rename rddaniel to rdv1
authorAditya Angadi <aditya.angadi@arm.com>
Tue, 15 Dec 2020 11:40:50 +0000 (17:10 +0530)
committerAditya Angadi <aditya.angadi@arm.com>
Mon, 11 Jan 2021 06:58:54 +0000 (12:28 +0530)
Reference Design platform RD-Daniel has been renamed to RD-V1.
Correspondingly, remove all uses of 'rddaniel' and replace it with
'rdv1' where appropriate.

Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>
Change-Id: I1702bab39c501f8c0a09df131cb2394d54c83bcf

22 files changed:
plat/arm/board/rddaniel/fdts/rddaniel_fw_config.dts [deleted file]
plat/arm/board/rddaniel/fdts/rddaniel_nt_fw_config.dts [deleted file]
plat/arm/board/rddaniel/fdts/rddaniel_tb_fw_config.dts [deleted file]
plat/arm/board/rddaniel/include/platform_def.h [deleted file]
plat/arm/board/rddaniel/platform.mk [deleted file]
plat/arm/board/rddaniel/rddaniel_err.c [deleted file]
plat/arm/board/rddaniel/rddaniel_plat.c [deleted file]
plat/arm/board/rddaniel/rddaniel_security.c [deleted file]
plat/arm/board/rddaniel/rddaniel_topology.c [deleted file]
plat/arm/board/rddaniel/rddaniel_trusted_boot.c [deleted file]
plat/arm/board/rdv1/fdts/rdv1_fw_config.dts [new file with mode: 0644]
plat/arm/board/rdv1/fdts/rdv1_nt_fw_config.dts [new file with mode: 0644]
plat/arm/board/rdv1/fdts/rdv1_tb_fw_config.dts [new file with mode: 0644]
plat/arm/board/rdv1/include/platform_def.h [new file with mode: 0644]
plat/arm/board/rdv1/platform.mk [new file with mode: 0644]
plat/arm/board/rdv1/rdv1_err.c [new file with mode: 0644]
plat/arm/board/rdv1/rdv1_plat.c [new file with mode: 0644]
plat/arm/board/rdv1/rdv1_security.c [new file with mode: 0644]
plat/arm/board/rdv1/rdv1_topology.c [new file with mode: 0644]
plat/arm/board/rdv1/rdv1_trusted_boot.c [new file with mode: 0644]
plat/arm/css/sgi/include/sgi_variant.h
plat/arm/css/sgi/sgi_bl31_setup.c

diff --git a/plat/arm/board/rddaniel/fdts/rddaniel_fw_config.dts b/plat/arm/board/rddaniel/fdts/rddaniel_fw_config.dts
deleted file mode 100644 (file)
index 9c9cefe..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (c) 2020, ARM Limited and Contributors. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include <common/tbbr/tbbr_img_def.h>
-
-/dts-v1/;
-
-/ {
-       dtb-registry {
-               compatible = "fconf,dyn_cfg-dtb_registry";
-
-               tb_fw-config {
-                       load-address = <0x0 0x4001300>;
-                       max-size = <0x200>;
-                       id = <TB_FW_CONFIG_ID>;
-               };
-
-               nt_fw-config {
-                       load-address = <0x0 0xFEF00000>;
-                       max-size = <0x0100000>;
-                       id = <NT_FW_CONFIG_ID>;
-               };
-       };
-};
diff --git a/plat/arm/board/rddaniel/fdts/rddaniel_nt_fw_config.dts b/plat/arm/board/rddaniel/fdts/rddaniel_nt_fw_config.dts
deleted file mode 100644 (file)
index 4d4580d..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (c) 2020, ARM Limited and Contributors. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-/dts-v1/;
-/ {
-       /* compatible string */
-       compatible = "arm,rd-daniel";
-
-       /*
-        * Place holder for system-id node with default values. The
-        * value of platform-id and config-id will be set to the
-        * correct values during the BL2 stage of boot.
-        */
-       system-id {
-               platform-id = <0x0>;
-               config-id = <0x0>;
-               multi-chip-mode = <0x0>;
-       };
-};
diff --git a/plat/arm/board/rddaniel/fdts/rddaniel_tb_fw_config.dts b/plat/arm/board/rddaniel/fdts/rddaniel_tb_fw_config.dts
deleted file mode 100644 (file)
index 49eda27..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (c) 2020, ARM Limited and Contributors. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-/dts-v1/;
-
-/ {
-       tb_fw-config {
-               compatible = "arm,tb_fw";
-
-               /* Disable authentication for development */
-               disable_auth = <0x0>;
-
-               /*
-                * The following two entries are placeholders for Mbed TLS
-                * heap information. The default values don't matter since
-                * they will be overwritten by BL1.
-                * In case of having shared Mbed TLS heap between BL1 and BL2,
-                * BL1 will populate these two properties with the respective
-                * info about the shared heap. This info will be available for
-                * BL2 in order to locate and re-use the heap.
-                */
-               mbedtls_heap_addr = <0x0 0x0>;
-               mbedtls_heap_size = <0x0>;
-       };
-};
diff --git a/plat/arm/board/rddaniel/include/platform_def.h b/plat/arm/board/rddaniel/include/platform_def.h
deleted file mode 100644 (file)
index 5b98b4e..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2020, ARM Limited and Contributors. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#ifndef PLATFORM_DEF_H
-#define PLATFORM_DEF_H
-
-#include <lib/utils_def.h>
-
-#include <sgi_soc_platform_def.h>
-
-#define PLAT_ARM_CLUSTER_COUNT         U(16)
-#define CSS_SGI_MAX_CPUS_PER_CLUSTER   U(1)
-#define CSS_SGI_MAX_PE_PER_CPU         U(1)
-
-#define PLAT_CSS_MHU_BASE              UL(0x45400000)
-#define PLAT_MHUV2_BASE                        PLAT_CSS_MHU_BASE
-
-#define CSS_SYSTEM_PWR_DMN_LVL         ARM_PWR_LVL2
-#define PLAT_MAX_PWR_LVL               ARM_PWR_LVL1
-
-/* TZC Related Constants */
-#define PLAT_ARM_TZC_BASE              UL(0x21830000)
-#define PLAT_ARM_TZC_FILTERS           TZC_400_REGION_ATTR_FILTER_BIT(0)
-
-#define TZC400_OFFSET                  UL(0x1000000)
-#define TZC400_COUNT                   4
-
-#define TZC400_BASE(n)                 (PLAT_ARM_TZC_BASE + \
-                                        (n * TZC400_OFFSET))
-
-#define TZC_NSAID_ALL_AP               U(0)
-#define TZC_NSAID_PCI                  U(1)
-#define TZC_NSAID_HDLCD0               U(2)
-#define TZC_NSAID_CLCD                 U(7)
-#define TZC_NSAID_AP                   U(9)
-#define TZC_NSAID_VIRTIO               U(15)
-
-#define PLAT_ARM_TZC_NS_DEV_ACCESS     \
-               (TZC_REGION_ACCESS_RDWR(TZC_NSAID_ALL_AP)) | \
-               (TZC_REGION_ACCESS_RDWR(TZC_NSAID_HDLCD0)) | \
-               (TZC_REGION_ACCESS_RDWR(TZC_NSAID_PCI))    | \
-               (TZC_REGION_ACCESS_RDWR(TZC_NSAID_AP))     | \
-               (TZC_REGION_ACCESS_RDWR(TZC_NSAID_CLCD))   | \
-               (TZC_REGION_ACCESS_RDWR(TZC_NSAID_VIRTIO))
-
-/*
- * Physical and virtual address space limits for MMU in AARCH64 & AARCH32 modes
- */
-#ifdef __aarch64__
-#define PLAT_PHY_ADDR_SPACE_SIZE       (1ULL << 42)
-#define PLAT_VIRT_ADDR_SPACE_SIZE      (1ULL << 42)
-#else
-#define PLAT_PHY_ADDR_SPACE_SIZE       (1ULL << 32)
-#define PLAT_VIRT_ADDR_SPACE_SIZE      (1ULL << 32)
-#endif
-
-/* GIC related constants */
-#define PLAT_ARM_GICD_BASE             UL(0x30000000)
-#define PLAT_ARM_GICC_BASE             UL(0x2C000000)
-#define PLAT_ARM_GICR_BASE             UL(0x30140000)
-
-#endif /* PLATFORM_DEF_H */
diff --git a/plat/arm/board/rddaniel/platform.mk b/plat/arm/board/rddaniel/platform.mk
deleted file mode 100644 (file)
index 6553ae2..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright (c) 2020, ARM Limited and Contributors. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-
-# RD-Daniel platform uses GIC-Clayton which is based on GICv4.1
-GIC_ENABLE_V4_EXTN     :=      1
-
-include plat/arm/css/sgi/sgi-common.mk
-
-RDDANIEL_BASE          =       plat/arm/board/rddaniel
-
-PLAT_INCLUDES          +=      -I${RDDANIEL_BASE}/include/
-
-SGI_CPU_SOURCES                :=      lib/cpus/aarch64/neoverse_v1.S
-
-PLAT_BL_COMMON_SOURCES +=      ${CSS_ENT_BASE}/sgi_plat.c
-
-BL1_SOURCES            +=      ${SGI_CPU_SOURCES}                      \
-                               ${RDDANIEL_BASE}/rddaniel_err.c
-
-BL2_SOURCES            +=      ${RDDANIEL_BASE}/rddaniel_plat.c        \
-                               ${RDDANIEL_BASE}/rddaniel_security.c    \
-                               ${RDDANIEL_BASE}/rddaniel_err.c         \
-                               lib/utils/mem_region.c                  \
-                               drivers/arm/tzc/tzc400.c                \
-                               plat/arm/common/arm_tzc400.c            \
-                               plat/arm/common/arm_nor_psci_mem_protect.c
-
-BL31_SOURCES           +=      ${SGI_CPU_SOURCES}                      \
-                               ${RDDANIEL_BASE}/rddaniel_plat.c        \
-                               ${RDDANIEL_BASE}/rddaniel_topology.c    \
-                               drivers/cfi/v2m/v2m_flash.c             \
-                               lib/utils/mem_region.c                  \
-                               plat/arm/common/arm_nor_psci_mem_protect.c
-
-ifeq (${TRUSTED_BOARD_BOOT}, 1)
-BL1_SOURCES            +=      ${RDDANIEL_BASE}/rddaniel_trusted_boot.c
-BL2_SOURCES            +=      ${RDDANIEL_BASE}/rddaniel_trusted_boot.c
-endif
-
-# Add the FDT_SOURCES and options for Dynamic Config
-FDT_SOURCES            +=      ${RDDANIEL_BASE}/fdts/${PLAT}_fw_config.dts     \
-                               ${RDDANIEL_BASE}/fdts/${PLAT}_tb_fw_config.dts
-FW_CONFIG              :=      ${BUILD_PLAT}/fdts/${PLAT}_fw_config.dtb
-TB_FW_CONFIG           :=      ${BUILD_PLAT}/fdts/${PLAT}_tb_fw_config.dtb
-
-# Add the FW_CONFIG to FIP and specify the same to certtool
-$(eval $(call TOOL_ADD_PAYLOAD,${FW_CONFIG},--fw-config,${FW_CONFIG}))
-# Add the TB_FW_CONFIG to FIP and specify the same to certtool
-$(eval $(call TOOL_ADD_PAYLOAD,${TB_FW_CONFIG},--tb-fw-config,${TB_FW_CONFIG}))
-
-FDT_SOURCES            +=      ${RDDANIEL_BASE}/fdts/${PLAT}_nt_fw_config.dts
-NT_FW_CONFIG           :=      ${BUILD_PLAT}/fdts/${PLAT}_nt_fw_config.dtb
-
-# Add the NT_FW_CONFIG to FIP and specify the same to certtool
-$(eval $(call TOOL_ADD_PAYLOAD,${NT_FW_CONFIG},--nt-fw-config,${NT_FW_CONFIG}))
-
-override CTX_INCLUDE_AARCH32_REGS      := 0
diff --git a/plat/arm/board/rddaniel/rddaniel_err.c b/plat/arm/board/rddaniel/rddaniel_err.c
deleted file mode 100644 (file)
index 5e10942..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Copyright (c) 2020, ARM Limited and Contributors. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include <plat/arm/common/plat_arm.h>
-
-/*
- * rddaniel error handler
- */
-void __dead2 plat_arm_error_handler(int err)
-{
-       while (1) {
-               wfi();
-       }
-}
diff --git a/plat/arm/board/rddaniel/rddaniel_plat.c b/plat/arm/board/rddaniel/rddaniel_plat.c
deleted file mode 100644 (file)
index ab5251e..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2020, ARM Limited and Contributors. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include <plat/common/platform.h>
-#include <sgi_plat.h>
-
-unsigned int plat_arm_sgi_get_platform_id(void)
-{
-       return mmio_read_32(SID_REG_BASE + SID_SYSTEM_ID_OFFSET)
-                               & SID_SYSTEM_ID_PART_NUM_MASK;
-}
-
-unsigned int plat_arm_sgi_get_config_id(void)
-{
-       return mmio_read_32(SID_REG_BASE + SID_SYSTEM_CFG_OFFSET);
-}
-
-unsigned int plat_arm_sgi_get_multi_chip_mode(void)
-{
-       return (mmio_read_32(SID_REG_BASE + SID_NODE_ID_OFFSET) &
-                       SID_MULTI_CHIP_MODE_MASK) >> SID_MULTI_CHIP_MODE_SHIFT;
-}
-
-void bl31_platform_setup(void)
-{
-       sgi_bl31_common_platform_setup();
-}
diff --git a/plat/arm/board/rddaniel/rddaniel_security.c b/plat/arm/board/rddaniel/rddaniel_security.c
deleted file mode 100644 (file)
index 1247db8..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (c) 2020, ARM Limited and Contributors. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include <plat/arm/common/plat_arm.h>
-#include <platform_def.h>
-
-static const arm_tzc_regions_info_t tzc_regions[] = {
-       ARM_TZC_REGIONS_DEF,
-       {}
-};
-
-/* Initialize the secure environment */
-void plat_arm_security_setup(void)
-{
-       int i;
-
-       for (i = 0; i < TZC400_COUNT; i++)
-               arm_tzc400_setup(TZC400_BASE(i), tzc_regions);
-}
diff --git a/plat/arm/board/rddaniel/rddaniel_topology.c b/plat/arm/board/rddaniel/rddaniel_topology.c
deleted file mode 100644 (file)
index 55f5e04..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2020, ARM Limited and Contributors. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include <plat/arm/common/plat_arm.h>
-#include <plat/arm/css/common/css_pm.h>
-
-/******************************************************************************
- * The power domain tree descriptor.
- ******************************************************************************/
-const unsigned char rd_daniel_pd_tree_desc[] = {
-       PLAT_ARM_CLUSTER_COUNT,
-       CSS_SGI_MAX_CPUS_PER_CLUSTER,
-       CSS_SGI_MAX_CPUS_PER_CLUSTER,
-       CSS_SGI_MAX_CPUS_PER_CLUSTER,
-       CSS_SGI_MAX_CPUS_PER_CLUSTER,
-       CSS_SGI_MAX_CPUS_PER_CLUSTER,
-       CSS_SGI_MAX_CPUS_PER_CLUSTER,
-       CSS_SGI_MAX_CPUS_PER_CLUSTER,
-       CSS_SGI_MAX_CPUS_PER_CLUSTER,
-       CSS_SGI_MAX_CPUS_PER_CLUSTER,
-       CSS_SGI_MAX_CPUS_PER_CLUSTER,
-       CSS_SGI_MAX_CPUS_PER_CLUSTER,
-       CSS_SGI_MAX_CPUS_PER_CLUSTER,
-       CSS_SGI_MAX_CPUS_PER_CLUSTER,
-       CSS_SGI_MAX_CPUS_PER_CLUSTER,
-       CSS_SGI_MAX_CPUS_PER_CLUSTER,
-       CSS_SGI_MAX_CPUS_PER_CLUSTER
-};
-
-/*******************************************************************************
- * This function returns the topology tree information.
- ******************************************************************************/
-const unsigned char *plat_get_power_domain_tree_desc(void)
-{
-       return rd_daniel_pd_tree_desc;
-}
-
-/*******************************************************************************
- * The array mapping platform core position (implemented by plat_my_core_pos())
- * to the SCMI power domain ID implemented by SCP.
- ******************************************************************************/
-const uint32_t plat_css_core_pos_to_scmi_dmn_id_map[] = {
-       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0x0)),
-       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0x1)),
-       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0x2)),
-       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0x3)),
-       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0x4)),
-       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0x5)),
-       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0x6)),
-       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0x7)),
-       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0x8)),
-       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0x9)),
-       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0xA)),
-       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0xB)),
-       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0xC)),
-       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0xD)),
-       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0xE)),
-       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0xF))
-};
diff --git a/plat/arm/board/rddaniel/rddaniel_trusted_boot.c b/plat/arm/board/rddaniel/rddaniel_trusted_boot.c
deleted file mode 100644 (file)
index 4592b8f..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (c) 2020, Arm Limited. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include <plat/arm/common/plat_arm.h>
-
-/*
- * Return the ROTPK hash in the following ASN.1 structure in DER format:
- *
- * AlgorithmIdentifier  ::=  SEQUENCE  {
- *     algorithm         OBJECT IDENTIFIER,
- *     parameters        ANY DEFINED BY algorithm OPTIONAL
- * }
- *
- * DigestInfo ::= SEQUENCE {
- *     digestAlgorithm   AlgorithmIdentifier,
- *     digest            OCTET STRING
- * }
- */
-int plat_get_rotpk_info(void *cookie, void **key_ptr, unsigned int *key_len,
-                       unsigned int *flags)
-{
-       return arm_get_rotpk_info(cookie, key_ptr, key_len, flags);
-}
diff --git a/plat/arm/board/rdv1/fdts/rdv1_fw_config.dts b/plat/arm/board/rdv1/fdts/rdv1_fw_config.dts
new file mode 100644 (file)
index 0000000..9c9cefe
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2020, ARM Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <common/tbbr/tbbr_img_def.h>
+
+/dts-v1/;
+
+/ {
+       dtb-registry {
+               compatible = "fconf,dyn_cfg-dtb_registry";
+
+               tb_fw-config {
+                       load-address = <0x0 0x4001300>;
+                       max-size = <0x200>;
+                       id = <TB_FW_CONFIG_ID>;
+               };
+
+               nt_fw-config {
+                       load-address = <0x0 0xFEF00000>;
+                       max-size = <0x0100000>;
+                       id = <NT_FW_CONFIG_ID>;
+               };
+       };
+};
diff --git a/plat/arm/board/rdv1/fdts/rdv1_nt_fw_config.dts b/plat/arm/board/rdv1/fdts/rdv1_nt_fw_config.dts
new file mode 100644 (file)
index 0000000..62ba2c3
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2020, ARM Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/dts-v1/;
+/ {
+       /* compatible string */
+       compatible = "arm,rd-v1";
+
+       /*
+        * Place holder for system-id node with default values. The
+        * value of platform-id and config-id will be set to the
+        * correct values during the BL2 stage of boot.
+        */
+       system-id {
+               platform-id = <0x0>;
+               config-id = <0x0>;
+               multi-chip-mode = <0x0>;
+       };
+};
diff --git a/plat/arm/board/rdv1/fdts/rdv1_tb_fw_config.dts b/plat/arm/board/rdv1/fdts/rdv1_tb_fw_config.dts
new file mode 100644 (file)
index 0000000..49eda27
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2020, ARM Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/dts-v1/;
+
+/ {
+       tb_fw-config {
+               compatible = "arm,tb_fw";
+
+               /* Disable authentication for development */
+               disable_auth = <0x0>;
+
+               /*
+                * The following two entries are placeholders for Mbed TLS
+                * heap information. The default values don't matter since
+                * they will be overwritten by BL1.
+                * In case of having shared Mbed TLS heap between BL1 and BL2,
+                * BL1 will populate these two properties with the respective
+                * info about the shared heap. This info will be available for
+                * BL2 in order to locate and re-use the heap.
+                */
+               mbedtls_heap_addr = <0x0 0x0>;
+               mbedtls_heap_size = <0x0>;
+       };
+};
diff --git a/plat/arm/board/rdv1/include/platform_def.h b/plat/arm/board/rdv1/include/platform_def.h
new file mode 100644 (file)
index 0000000..5b98b4e
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2020, ARM Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef PLATFORM_DEF_H
+#define PLATFORM_DEF_H
+
+#include <lib/utils_def.h>
+
+#include <sgi_soc_platform_def.h>
+
+#define PLAT_ARM_CLUSTER_COUNT         U(16)
+#define CSS_SGI_MAX_CPUS_PER_CLUSTER   U(1)
+#define CSS_SGI_MAX_PE_PER_CPU         U(1)
+
+#define PLAT_CSS_MHU_BASE              UL(0x45400000)
+#define PLAT_MHUV2_BASE                        PLAT_CSS_MHU_BASE
+
+#define CSS_SYSTEM_PWR_DMN_LVL         ARM_PWR_LVL2
+#define PLAT_MAX_PWR_LVL               ARM_PWR_LVL1
+
+/* TZC Related Constants */
+#define PLAT_ARM_TZC_BASE              UL(0x21830000)
+#define PLAT_ARM_TZC_FILTERS           TZC_400_REGION_ATTR_FILTER_BIT(0)
+
+#define TZC400_OFFSET                  UL(0x1000000)
+#define TZC400_COUNT                   4
+
+#define TZC400_BASE(n)                 (PLAT_ARM_TZC_BASE + \
+                                        (n * TZC400_OFFSET))
+
+#define TZC_NSAID_ALL_AP               U(0)
+#define TZC_NSAID_PCI                  U(1)
+#define TZC_NSAID_HDLCD0               U(2)
+#define TZC_NSAID_CLCD                 U(7)
+#define TZC_NSAID_AP                   U(9)
+#define TZC_NSAID_VIRTIO               U(15)
+
+#define PLAT_ARM_TZC_NS_DEV_ACCESS     \
+               (TZC_REGION_ACCESS_RDWR(TZC_NSAID_ALL_AP)) | \
+               (TZC_REGION_ACCESS_RDWR(TZC_NSAID_HDLCD0)) | \
+               (TZC_REGION_ACCESS_RDWR(TZC_NSAID_PCI))    | \
+               (TZC_REGION_ACCESS_RDWR(TZC_NSAID_AP))     | \
+               (TZC_REGION_ACCESS_RDWR(TZC_NSAID_CLCD))   | \
+               (TZC_REGION_ACCESS_RDWR(TZC_NSAID_VIRTIO))
+
+/*
+ * Physical and virtual address space limits for MMU in AARCH64 & AARCH32 modes
+ */
+#ifdef __aarch64__
+#define PLAT_PHY_ADDR_SPACE_SIZE       (1ULL << 42)
+#define PLAT_VIRT_ADDR_SPACE_SIZE      (1ULL << 42)
+#else
+#define PLAT_PHY_ADDR_SPACE_SIZE       (1ULL << 32)
+#define PLAT_VIRT_ADDR_SPACE_SIZE      (1ULL << 32)
+#endif
+
+/* GIC related constants */
+#define PLAT_ARM_GICD_BASE             UL(0x30000000)
+#define PLAT_ARM_GICC_BASE             UL(0x2C000000)
+#define PLAT_ARM_GICR_BASE             UL(0x30140000)
+
+#endif /* PLATFORM_DEF_H */
diff --git a/plat/arm/board/rdv1/platform.mk b/plat/arm/board/rdv1/platform.mk
new file mode 100644 (file)
index 0000000..5033b18
--- /dev/null
@@ -0,0 +1,59 @@
+# Copyright (c) 2020, ARM Limited and Contributors. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+# RD-V1 platform uses GIC-Clayton which is based on GICv4.1
+GIC_ENABLE_V4_EXTN     :=      1
+
+include plat/arm/css/sgi/sgi-common.mk
+
+RDV1_BASE              =       plat/arm/board/rdv1
+
+PLAT_INCLUDES          +=      -I${RDV1_BASE}/include/
+
+SGI_CPU_SOURCES                :=      lib/cpus/aarch64/neoverse_v1.S
+
+PLAT_BL_COMMON_SOURCES +=      ${CSS_ENT_BASE}/sgi_plat.c
+
+BL1_SOURCES            +=      ${SGI_CPU_SOURCES}                      \
+                               ${RDV1_BASE}/rdv1_err.c
+
+BL2_SOURCES            +=      ${RDV1_BASE}/rdv1_plat.c        \
+                               ${RDV1_BASE}/rdv1_security.c    \
+                               ${RDV1_BASE}/rdv1_err.c         \
+                               lib/utils/mem_region.c                  \
+                               drivers/arm/tzc/tzc400.c                \
+                               plat/arm/common/arm_tzc400.c            \
+                               plat/arm/common/arm_nor_psci_mem_protect.c
+
+BL31_SOURCES           +=      ${SGI_CPU_SOURCES}                      \
+                               ${RDV1_BASE}/rdv1_plat.c        \
+                               ${RDV1_BASE}/rdv1_topology.c    \
+                               drivers/cfi/v2m/v2m_flash.c             \
+                               lib/utils/mem_region.c                  \
+                               plat/arm/common/arm_nor_psci_mem_protect.c
+
+ifeq (${TRUSTED_BOARD_BOOT}, 1)
+BL1_SOURCES            +=      ${RDV1_BASE}/rdv1_trusted_boot.c
+BL2_SOURCES            +=      ${RDV1_BASE}/rdv1_trusted_boot.c
+endif
+
+# Add the FDT_SOURCES and options for Dynamic Config
+FDT_SOURCES            +=      ${RDV1_BASE}/fdts/${PLAT}_fw_config.dts \
+                               ${RDV1_BASE}/fdts/${PLAT}_tb_fw_config.dts
+FW_CONFIG              :=      ${BUILD_PLAT}/fdts/${PLAT}_fw_config.dtb
+TB_FW_CONFIG           :=      ${BUILD_PLAT}/fdts/${PLAT}_tb_fw_config.dtb
+
+# Add the FW_CONFIG to FIP and specify the same to certtool
+$(eval $(call TOOL_ADD_PAYLOAD,${FW_CONFIG},--fw-config,${FW_CONFIG}))
+# Add the TB_FW_CONFIG to FIP and specify the same to certtool
+$(eval $(call TOOL_ADD_PAYLOAD,${TB_FW_CONFIG},--tb-fw-config,${TB_FW_CONFIG}))
+
+FDT_SOURCES            +=      ${RDV1_BASE}/fdts/${PLAT}_nt_fw_config.dts
+NT_FW_CONFIG           :=      ${BUILD_PLAT}/fdts/${PLAT}_nt_fw_config.dtb
+
+# Add the NT_FW_CONFIG to FIP and specify the same to certtool
+$(eval $(call TOOL_ADD_PAYLOAD,${NT_FW_CONFIG},--nt-fw-config,${NT_FW_CONFIG}))
+
+override CTX_INCLUDE_AARCH32_REGS      := 0
diff --git a/plat/arm/board/rdv1/rdv1_err.c b/plat/arm/board/rdv1/rdv1_err.c
new file mode 100644 (file)
index 0000000..68f9a3e
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) 2020, ARM Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <plat/arm/common/plat_arm.h>
+
+/*
+ * rdv1 error handler
+ */
+void __dead2 plat_arm_error_handler(int err)
+{
+       while (1) {
+               wfi();
+       }
+}
diff --git a/plat/arm/board/rdv1/rdv1_plat.c b/plat/arm/board/rdv1/rdv1_plat.c
new file mode 100644 (file)
index 0000000..ab5251e
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2020, ARM Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <plat/common/platform.h>
+#include <sgi_plat.h>
+
+unsigned int plat_arm_sgi_get_platform_id(void)
+{
+       return mmio_read_32(SID_REG_BASE + SID_SYSTEM_ID_OFFSET)
+                               & SID_SYSTEM_ID_PART_NUM_MASK;
+}
+
+unsigned int plat_arm_sgi_get_config_id(void)
+{
+       return mmio_read_32(SID_REG_BASE + SID_SYSTEM_CFG_OFFSET);
+}
+
+unsigned int plat_arm_sgi_get_multi_chip_mode(void)
+{
+       return (mmio_read_32(SID_REG_BASE + SID_NODE_ID_OFFSET) &
+                       SID_MULTI_CHIP_MODE_MASK) >> SID_MULTI_CHIP_MODE_SHIFT;
+}
+
+void bl31_platform_setup(void)
+{
+       sgi_bl31_common_platform_setup();
+}
diff --git a/plat/arm/board/rdv1/rdv1_security.c b/plat/arm/board/rdv1/rdv1_security.c
new file mode 100644 (file)
index 0000000..1247db8
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2020, ARM Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <plat/arm/common/plat_arm.h>
+#include <platform_def.h>
+
+static const arm_tzc_regions_info_t tzc_regions[] = {
+       ARM_TZC_REGIONS_DEF,
+       {}
+};
+
+/* Initialize the secure environment */
+void plat_arm_security_setup(void)
+{
+       int i;
+
+       for (i = 0; i < TZC400_COUNT; i++)
+               arm_tzc400_setup(TZC400_BASE(i), tzc_regions);
+}
diff --git a/plat/arm/board/rdv1/rdv1_topology.c b/plat/arm/board/rdv1/rdv1_topology.c
new file mode 100644 (file)
index 0000000..ab64fd8
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2020, ARM Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <plat/arm/common/plat_arm.h>
+#include <plat/arm/css/common/css_pm.h>
+
+/******************************************************************************
+ * The power domain tree descriptor.
+ ******************************************************************************/
+const unsigned char rd_v1_pd_tree_desc[] = {
+       PLAT_ARM_CLUSTER_COUNT,
+       CSS_SGI_MAX_CPUS_PER_CLUSTER,
+       CSS_SGI_MAX_CPUS_PER_CLUSTER,
+       CSS_SGI_MAX_CPUS_PER_CLUSTER,
+       CSS_SGI_MAX_CPUS_PER_CLUSTER,
+       CSS_SGI_MAX_CPUS_PER_CLUSTER,
+       CSS_SGI_MAX_CPUS_PER_CLUSTER,
+       CSS_SGI_MAX_CPUS_PER_CLUSTER,
+       CSS_SGI_MAX_CPUS_PER_CLUSTER,
+       CSS_SGI_MAX_CPUS_PER_CLUSTER,
+       CSS_SGI_MAX_CPUS_PER_CLUSTER,
+       CSS_SGI_MAX_CPUS_PER_CLUSTER,
+       CSS_SGI_MAX_CPUS_PER_CLUSTER,
+       CSS_SGI_MAX_CPUS_PER_CLUSTER,
+       CSS_SGI_MAX_CPUS_PER_CLUSTER,
+       CSS_SGI_MAX_CPUS_PER_CLUSTER,
+       CSS_SGI_MAX_CPUS_PER_CLUSTER
+};
+
+/*******************************************************************************
+ * This function returns the topology tree information.
+ ******************************************************************************/
+const unsigned char *plat_get_power_domain_tree_desc(void)
+{
+       return rd_v1_pd_tree_desc;
+}
+
+/*******************************************************************************
+ * The array mapping platform core position (implemented by plat_my_core_pos())
+ * to the SCMI power domain ID implemented by SCP.
+ ******************************************************************************/
+const uint32_t plat_css_core_pos_to_scmi_dmn_id_map[] = {
+       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0x0)),
+       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0x1)),
+       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0x2)),
+       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0x3)),
+       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0x4)),
+       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0x5)),
+       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0x6)),
+       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0x7)),
+       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0x8)),
+       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0x9)),
+       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0xA)),
+       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0xB)),
+       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0xC)),
+       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0xD)),
+       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0xE)),
+       (SET_SCMI_CHANNEL_ID(0x0) | SET_SCMI_DOMAIN_ID(0xF))
+};
diff --git a/plat/arm/board/rdv1/rdv1_trusted_boot.c b/plat/arm/board/rdv1/rdv1_trusted_boot.c
new file mode 100644 (file)
index 0000000..4592b8f
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2020, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <plat/arm/common/plat_arm.h>
+
+/*
+ * Return the ROTPK hash in the following ASN.1 structure in DER format:
+ *
+ * AlgorithmIdentifier  ::=  SEQUENCE  {
+ *     algorithm         OBJECT IDENTIFIER,
+ *     parameters        ANY DEFINED BY algorithm OPTIONAL
+ * }
+ *
+ * DigestInfo ::= SEQUENCE {
+ *     digestAlgorithm   AlgorithmIdentifier,
+ *     digest            OCTET STRING
+ * }
+ */
+int plat_get_rotpk_info(void *cookie, void **key_ptr, unsigned int *key_len,
+                       unsigned int *flags)
+{
+       return arm_get_rotpk_info(cookie, key_ptr, key_len, flags);
+}
index eb12f3f35394a6c6a4a3c9e18fde72e17a7e166c..ecf6d93d6f6c142da352785a9cd2f8a2c1f57cac 100644 (file)
@@ -14,8 +14,8 @@
 #define RD_N1E1_EDGE_SID_VER_PART_NUM          0x0786
 #define RD_E1_EDGE_CONFIG_ID                   0x2
 
-/* SID Version values for RD-Daniel */
-#define RD_DANIEL_SID_VER_PART_NUM             0x078a
+/* SID Version values for RD-V1 */
+#define RD_V1_SID_VER_PART_NUM                 0x078a
 
 /* SID Version values for RD-N2 */
 #define RD_N2_SID_VER_PART_NUM                 0x07B7
index d5c7593f688a44757561b80c2085fe18e1dde1f5..89e2cab089846d244b52570e63b0cfb47e0a38b1 100644 (file)
@@ -74,7 +74,7 @@ static scmi_channel_plat_info_t rd_n1e1_edge_scmi_plat_info[] = {
 scmi_channel_plat_info_t *plat_css_get_scmi_info(int channel_id)
 {
        if (sgi_plat_info.platform_id == RD_N1E1_EDGE_SID_VER_PART_NUM ||
-               sgi_plat_info.platform_id == RD_DANIEL_SID_VER_PART_NUM ||
+               sgi_plat_info.platform_id == RD_V1_SID_VER_PART_NUM ||
                sgi_plat_info.platform_id == RD_N2_SID_VER_PART_NUM) {
                if (channel_id >= ARRAY_SIZE(rd_n1e1_edge_scmi_plat_info))
                        panic();
@@ -108,12 +108,12 @@ void sgi_bl31_common_platform_setup(void)
 const plat_psci_ops_t *plat_arm_psci_override_pm_ops(plat_psci_ops_t *ops)
 {
        /*
-        * For RD-E1-Edge and RD-Daniel platforms, only CPU power ON/OFF
+        * For RD-E1-Edge and RD-V1 platforms, only CPU power ON/OFF
         * PSCI platform callbacks are supported.
         */
        if (((sgi_plat_info.platform_id == RD_N1E1_EDGE_SID_VER_PART_NUM) &&
            (sgi_plat_info.config_id == RD_E1_EDGE_CONFIG_ID)) ||
-           (sgi_plat_info.platform_id == RD_DANIEL_SID_VER_PART_NUM)) {
+           (sgi_plat_info.platform_id == RD_V1_SID_VER_PART_NUM)) {
                ops->cpu_standby = NULL;
                ops->system_off = NULL;
                ops->system_reset = NULL;