Debian Codegraph @

plat/arm/board/neoverse_rd/platform/rdv1/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(16)
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 PLAT_ARM_TZC_FILTERS TZC_400_REGION_ATTR_FILTER_BIT(0)
29
30 #define TZC400_OFFSET UL(0x1000000)
31 #define TZC400_COUNT 4
32
33 #define TZC400_BASE(n) (PLAT_ARM_TZC_BASE + \
34 (n * TZC400_OFFSET))
35
36 #define TZC_NSAID_ALL_AP U(0)
37 #define TZC_NSAID_PCI U(1)
38 #define TZC_NSAID_HDLCD0 U(2)
39 #define TZC_NSAID_CLCD U(7)
40 #define TZC_NSAID_AP U(9)
41 #define TZC_NSAID_VIRTIO U(15)
42
43 #define PLAT_ARM_TZC_NS_DEV_ACCESS \
44 (TZC_REGION_ACCESS_RDWR(TZC_NSAID_ALL_AP)) | \
45 (TZC_REGION_ACCESS_RDWR(TZC_NSAID_HDLCD0)) | \
46 (TZC_REGION_ACCESS_RDWR(TZC_NSAID_PCI)) | \
47 (TZC_REGION_ACCESS_RDWR(TZC_NSAID_AP)) | \
48 (TZC_REGION_ACCESS_RDWR(TZC_NSAID_CLCD)) | \
49 (TZC_REGION_ACCESS_RDWR(TZC_NSAID_VIRTIO))
50
51 /* Maximum number of address bits used per chip */
52 #define NRD_ADDR_BITS_PER_CHIP U(42)
53
54 /* GIC related constants */
55 #define PLAT_ARM_GICD_BASE UL(0x30000000)
56 #define PLAT_ARM_GICR_BASE UL(0x30140000)
57
58 #endif /* PLATFORM_DEF_H */