| John Tsichritzis | d325554 | 2018-10-10 13:13:43 +0100 | [diff] [blame] | 1 | /* |
| Boyan Karatotev | 6d144db | 2025-06-23 15:04:53 +0100 | [diff] [blame^] | 2 | * Copyright (c) 2018-2025, Arm Limited. All rights reserved. |
| John Tsichritzis | d325554 | 2018-10-10 13:13:43 +0100 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | |
| 8 | #ifndef PLATFORM_DEF_H |
| 9 | #define PLATFORM_DEF_H |
| 10 | |
| 11 | #include <arch.h> |
| 12 | |
| 13 | #define PLATFORM_LINKER_FORMAT "elf64-littleaarch64" |
| 14 | #define PLATFORM_LINKER_ARCH aarch64 |
| 15 | |
| 16 | #define TFTF_BASE 0x1AC98000 |
| 17 | |
| 18 | |
| 19 | #define CACHE_WRITEBACK_GRANULE 0x40 |
| 20 | |
| John Tsichritzis | e223699 | 2018-10-25 10:05:39 +0100 | [diff] [blame] | 21 | /* |
| 22 | * hikey960 has an unresolved power management bug, so for now we can only |
| 23 | * run single core tests. |
| 24 | * TODO:Update these values when power management bug is resolved |
| 25 | */ |
| 26 | #define PLATFORM_CLUSTER_COUNT 1 |
| 27 | #define PLATFORM_CORE_COUNT_PER_CLUSTER 1 |
| John Tsichritzis | d325554 | 2018-10-10 13:13:43 +0100 | [diff] [blame] | 28 | #define PLATFORM_CORE_COUNT (PLATFORM_CLUSTER_COUNT * \ |
| 29 | PLATFORM_CORE_COUNT_PER_CLUSTER) |
| 30 | #define PLATFORM_NUM_AFFS (PLATFORM_CORE_COUNT + \ |
| 31 | PLATFORM_CLUSTER_COUNT + 1) |
| 32 | #define PLATFORM_MAX_AFFLVL MPIDR_AFFLVL2 |
| 33 | #define PLAT_MAX_PWR_LEVEL MPIDR_AFFLVL2 |
| 34 | #define PLAT_MAX_PWR_STATES_PER_LVL 2 |
| 35 | |
| 36 | |
| 37 | #define PLATFORM_STACK_SIZE 0x2000 |
| 38 | #define PCPU_DV_MEM_STACK_SIZE 0x100 |
| 39 | |
| 40 | |
| 41 | #define PLAT_VIRT_ADDR_SPACE_SIZE (1ULL << 32) |
| 42 | #define PLAT_PHY_ADDR_SPACE_SIZE (1ULL << 32) |
| John Tsichritzis | 317632b | 2018-10-22 15:54:44 +0100 | [diff] [blame] | 43 | #define MAX_XLAT_TABLES 8 |
| John Tsichritzis | d325554 | 2018-10-10 13:13:43 +0100 | [diff] [blame] | 44 | #define MAX_MMAP_REGIONS 16 |
| 45 | |
| 46 | #define DRAM_BASE 0x0 |
| 47 | #define DRAM_SIZE 0xE0000000 |
| 48 | |
| 49 | #define FLASH_BASE 0x0 |
| 50 | #define FLASH_SIZE 0xC0000000 |
| 51 | |
| 52 | /* |
| 53 | * TFTF_NVM_OFFSET/SIZE correspond to the NVM partition in the partition table |
| 54 | */ |
| 55 | #define TFTF_NVM_SIZE 0x600000 |
| 56 | #define TFTF_NVM_OFFSET 0xBFA00000 |
| 57 | |
| 58 | /* Local state bit width for each level in the state-ID field of power state */ |
| 59 | #define PLAT_LOCAL_PSTATE_WIDTH 4 |
| 60 | |
| 61 | /* GIC-400 related addresses from datasheet */ |
| 62 | #define GICD_REG_BASE 0xE82B1000 |
| 63 | #define GICC_REG_BASE 0xE82B2000 |
| 64 | |
| John Tsichritzis | 317632b | 2018-10-22 15:54:44 +0100 | [diff] [blame] | 65 | /* |
| 66 | * Memory mapped devices that we must create MMU mappings for them |
| 67 | */ |
| 68 | #define GIC_BASE 0xE82B0000 |
| 69 | #define GIC_SIZE 0x8000 |
| 70 | #define SP805_WDOG_BASE 0xE8A06000 |
| 71 | #define SP805_WDOG_SIZE 0x1000 |
| 72 | #define SYS_CNT_BASE1 0xfff14000 |
| 73 | #define SYS_CNT_SIZE 0x1000 |
| 74 | |
| 75 | |
| 76 | /* ARM PL011 UART */ |
| 77 | #define PL011_UART6_BASE 0xFFF32000 |
| 78 | #define CRASH_CONSOLE_BASE PL011_UART6_BASE |
| 79 | #define CRASH_CONSOLE_SIZE 0x1000 |
| 80 | #define PL011_BAUDRATE 115200 |
| 81 | #define PL011_UART_CLK_IN_HZ 19200000 |
| 82 | |
| John Tsichritzis | d325554 | 2018-10-10 13:13:43 +0100 | [diff] [blame] | 83 | /* Per-CPU Hypervisor Timer Interrupt ID */ |
| 84 | #define IRQ_PCPU_HP_TIMER 26 |
| 85 | /* Datasheet: TIME00 event*/ |
| 86 | #define IRQ_CNTPSIRQ1 80 |
| 87 | |
| 88 | #define PLAT_MAX_SPI_OFFSET_ID 343 |
| John Tsichritzis | d325554 | 2018-10-10 13:13:43 +0100 | [diff] [blame] | 89 | |
| 90 | /* |
| 91 | * Times(in ms) used by test code for completion of different events. Kept the |
| 92 | * same as in FVP. |
| 93 | */ |
| 94 | #define PLAT_SUSPEND_ENTRY_TIME 15 |
| 95 | #define PLAT_SUSPEND_ENTRY_EXIT_TIME 30 |
| 96 | |
| 97 | /* |
| 98 | * Dummy definitions that we need just to compile... |
| 99 | */ |
| 100 | #define ARM_SECURE_SERVICE_BUFFER_BASE 0 |
| 101 | #define ARM_SECURE_SERVICE_BUFFER_SIZE 100 |
| 102 | |
| 103 | #endif /* PLATFORM_DEF_H */ |