1 /* 2 * Copyright (c) 2018-2020, Arm Limited and Contributors. All rights reserved. 3 * Copyright (C) 2022-2023, Advanced Micro Devices, Inc. All rights reserved. 4 * 5 * SPDX-License-Identifier: BSD-3-Clause 6 */ 7 8 #include <plat_ipi.h> 9 #include <versal_def.h> 10 #include <plat_private.h> 11 #include <common/debug.h> 12 #include <drivers/generic_delay_timer.h> 13 #include <lib/mmio.h> 14 #include <lib/xlat_tables/xlat_tables_v2.h> 15 #include <plat/common/platform.h> 16 17 /* 18 * Table of regions to map using the MMU. 19 * This doesn't include TZRAM as the 'mem_layout' argument passed to 20 * configure_mmu_elx() will give the available subset of that, 21 */ 22 const mmap_region_t plat_versal_mmap[] = { 23 MAP_REGION_FLAT(DEVICE0_BASE, DEVICE0_SIZE, MT_DEVICE | MT_RW | MT_SECURE), 24 MAP_REGION_FLAT(DEVICE1_BASE, DEVICE1_SIZE, MT_DEVICE | MT_RW | MT_SECURE), 25 MAP_REGION_FLAT(CRF_BASE, CRF_SIZE, MT_DEVICE | MT_RW | MT_SECURE), 26 MAP_REGION_FLAT(PLAT_ARM_CCI_BASE, PLAT_ARM_CCI_SIZE, MT_DEVICE | MT_RW | 27 MT_SECURE), 28 { 0 } 29 }; 30 31 const mmap_region_t *plat_versal_get_mmap(void) 32 { 33 return plat_versal_mmap; 34 } 35 36 static void versal_print_platform_name(void) 37 { 38 NOTICE("TF-A running on %s\n", PLATFORM_NAME); 39 } 40 41 void versal_config_setup(void) 42 { 43 /* Configure IPI data for versal */ 44 versal_ipi_config_table_init(); 45 46 versal_print_platform_name(); 47 48 generic_delay_timer_init(); 49 } 50 51 uint32_t plat_get_syscnt_freq2(void) 52 { 53 return VERSAL_CPU_CLOCK; 54 } 55 56