mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-08-15 00:47:02 +02:00
Booting e.g. Linux in the non-secure world does not work with the msm8916 port yet because essential hardware is not made available to the non-secure world. Add more platform initialization to: - Initialize the GICv2 and mark secure interrupts. Only secure SGIs/PPIs so far. Override the GICD_PIDR2_GICV2 register address in platform_def.h to avoid a failing assert() because of a (hardware) mistake in Qualcomm's GICv2 implementation. - Make a timer frame available to the non-secure world. The "Qualcomm Timer" (QTMR) implements the ARM generic timer specification, so the standard defines (CNTACR_BASE etc) can be used. - Make parts of the "APCS" register region available to the non-secure world, e.g. for CPU frequency control implemented in Linux. - Initialize a platform-specific register to route all SMMU context bank interrupts to the non-secure interrupt pin, since all control of the SMMUs is left up to the non-secure world for now. Change-Id: Icf676437b8e329dead06658e177107dfd0ba4f9d Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
58 lines
1.8 KiB
C
58 lines
1.8 KiB
C
/*
|
|
* Copyright (c) 2021, Stephan Gerhold <stephan@gerhold.net>
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
#ifndef PLATFORM_DEF_H
|
|
#define PLATFORM_DEF_H
|
|
|
|
#include <plat/common/common_def.h>
|
|
|
|
/*
|
|
* There is at least 1 MiB available for BL31. However, at the moment the
|
|
* "msm8916_entry_point" variable in the data section is read through the
|
|
* 64 KiB region of the "boot remapper" after reset. For simplicity, limit
|
|
* the end of the data section (BL31_PROGBITS_LIMIT) to 64 KiB for now and
|
|
* the overall limit to 128 KiB. This could be increased if needed by placing
|
|
* the "msm8916_entry_point" variable explicitly in the first 64 KiB of BL31.
|
|
*/
|
|
#define BL31_LIMIT (BL31_BASE + 0x20000) /* 128 KiB */
|
|
#define BL31_PROGBITS_LIMIT (BL31_BASE + 0x10000) /* 64 KiB */
|
|
|
|
#define CACHE_WRITEBACK_GRANULE U(64)
|
|
#define PLATFORM_STACK_SIZE U(0x1000)
|
|
|
|
/* CPU topology: single cluster with 4 cores */
|
|
#define PLATFORM_CLUSTER_COUNT U(1)
|
|
#define PLATFORM_MAX_CPUS_PER_CLUSTER U(4)
|
|
#define PLATFORM_CORE_COUNT (PLATFORM_CLUSTER_COUNT * \
|
|
PLATFORM_MAX_CPUS_PER_CLUSTER)
|
|
|
|
/* Power management */
|
|
#define PLATFORM_SYSTEM_COUNT U(1)
|
|
#define PLAT_NUM_PWR_DOMAINS (PLATFORM_SYSTEM_COUNT + \
|
|
PLATFORM_CLUSTER_COUNT + \
|
|
PLATFORM_CORE_COUNT)
|
|
#define PLAT_MAX_PWR_LVL MPIDR_AFFLVL2
|
|
#define PLAT_MAX_RET_STATE U(2)
|
|
#define PLAT_MAX_OFF_STATE U(3)
|
|
|
|
/* Translation tables */
|
|
#define MAX_MMAP_REGIONS 8
|
|
#define MAX_XLAT_TABLES 4
|
|
|
|
#define PLAT_PHY_ADDR_SPACE_SIZE (ULL(1) << 32)
|
|
#define PLAT_VIRT_ADDR_SPACE_SIZE (ULL(1) << 32)
|
|
|
|
/* Timer frequency */
|
|
#define PLAT_SYSCNT_FREQ 19200000
|
|
|
|
/*
|
|
* The Qualcomm QGIC2 implementation seems to have PIDR0-4 and PIDR4-7
|
|
* erroneously swapped for some reason. PIDR2 is actually at 0xFD8.
|
|
* Override the address in <drivers/arm/gicv2.h> to avoid a failing assert().
|
|
*/
|
|
#define GICD_PIDR2_GICV2 U(0xFD8)
|
|
|
|
#endif /* PLATFORM_DEF_H */
|