Debian Codegraph @

plat/arm/board/neoverse_rd/platform/rdv1mc/include/platform_def.h

raw
1 /*
2 * Copyright (c) 2020-2024, Arm Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7 #ifndef PLATFORM_DEF_H
8 #define PLATFORM_DEF_H
9
10 #include <lib/utils_def.h>
11 #include <nrd_css_fw_def1.h>
12 #include <nrd_plat_arm_def1.h>
13 #include <nrd_ros_fw_def1.h>
14
15 /* Remote chip address offset */
16 #define NRD_REMOTE_CHIP_MEM_OFFSET(n) \
17 ((ULL(1) << NRD_ADDR_BITS_PER_CHIP) * (n))
18
19 #define PLAT_ARM_CLUSTER_COUNT U(4)
20 #define NRD_MAX_CPUS_PER_CLUSTER U(1)
21 #define NRD_MAX_PE_PER_CPU U(1)
22
23 #define PLAT_CSS_MHU_BASE UL(0x45400000)
24 #define PLAT_MHUV2_BASE PLAT_CSS_MHU_BASE
25
26 /* TZC Related Constants */
27 #define PLAT_ARM_TZC_BASE UL(0x21830000)
28 #define TZC400_BASE(n) (PLAT_ARM_TZC_BASE + \
29 (n * TZC400_OFFSET))
30 #define TZC400_OFFSET UL(0x1000000)
31 #define TZC400_COUNT U(8)
32 #define PLAT_ARM_TZC_FILTERS TZC_400_REGION_ATTR_FILTER_BIT(0)
33
34 #define TZC_NSAID_ALL_AP U(0)
35 #define TZC_NSAID_PCI U(1)
36 #define TZC_NSAID_HDLCD0 U(2)
37 #define TZC_NSAID_CLCD U(7)
38 #define TZC_NSAID_AP U(9)
39 #define TZC_NSAID_VIRTIO U(15)
40
41 #define PLAT_ARM_TZC_NS_DEV_ACCESS \
42 (TZC_REGION_ACCESS_RDWR(TZC_NSAID_ALL_AP)) | \
43 (TZC_REGION_ACCESS_RDWR(TZC_NSAID_HDLCD0)) | \
44 (TZC_REGION_ACCESS_RDWR(TZC_NSAID_PCI)) | \
45 (TZC_REGION_ACCESS_RDWR(TZC_NSAID_AP)) | \
46 (TZC_REGION_ACCESS_RDWR(TZC_NSAID_CLCD)) | \
47 (TZC_REGION_ACCESS_RDWR(TZC_NSAID_VIRTIO))
48
49 /* Virtual address used by dynamic mem_protect for chunk_base */
50 #define PLAT_ARM_MEM_PROTEC_VA_FRAME UL(0xC0000000)
51
52 /* Remote chip address offset (4TB per chip) */
53 #define NRD_ADDR_BITS_PER_CHIP U(42)
54
55 /* GIC related constants */
56 #define PLAT_ARM_GICD_BASE UL(0x30000000)
57 #define PLAT_ARM_GICR_BASE UL(0x30140000)
58
59 /* GIC SPI range for multichip */
60 #define NRD_CHIP0_SPI_MIN U(32)
61 #define NRD_CHIP0_SPI_MAX U(991)
62
63 #endif /* PLATFORM_DEF_H */