Merge "feat(versal2): update platform version to versal2" into integration

This commit is contained in:
Joanna Farley 2025-02-06 09:25:09 +01:00 committed by TrustedFirmware Code Review
commit 90e36ad849
4 changed files with 14 additions and 3 deletions

View file

@ -18,7 +18,7 @@
#include <plat_ipi.h>
#include <plat_private.h>
uint32_t platform_id, platform_version;
uint32_t platform_id, platform_version, rtlversion, psversion, pmcversion;
/*
* Table of regions to map using the MMU.
@ -77,6 +77,9 @@ void board_detection(void)
version_type = mmio_read_32(PMC_TAP_VERSION);
platform_id = FIELD_GET((uint32_t)PLATFORM_MASK, version_type);
platform_version = FIELD_GET((uint32_t)PLATFORM_VERSION_MASK, version_type);
rtlversion = FIELD_GET((uint32_t)RTL_VERSION, version_type);
psversion = FIELD_GET((uint32_t)PS_VERSION, version_type);
pmcversion = FIELD_GET((uint32_t)PMC_VERSION, version_type);
if (platform_id == QEMU_COSIM) {
platform_id = QEMU;

View file

@ -132,8 +132,12 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
setup_console();
NOTICE("TF-A running on %s %d.%d\n", board_name_decode(),
platform_version / 10U, platform_version % 10U);
NOTICE("TF-A running on %s v%d.%d, RTL v%d.%d, PS v%d.%d, PMC v%d.%d\n",
board_name_decode(),
(platform_version >> 1), platform_version % 10U,
(rtlversion >> 1), rtlversion % 10U,
(psversion >> 1), psversion % 10U,
(pmcversion >> 1), pmcversion % 10U);
/*
* Do initial security configuration to allow DRAM/device access. On

View file

@ -45,6 +45,9 @@
/* For platform detection */
#define PMC_TAP U(0xF11A0000)
#define PMC_TAP_VERSION (PMC_TAP + 0x4U)
# define PMC_VERSION GENMASK(7U, 0U)
# define PS_VERSION GENMASK(15U, 8U)
# define RTL_VERSION GENMASK(23U, 16U)
# define PLATFORM_MASK GENMASK(27U, 24U)
# define PLATFORM_VERSION_MASK GENMASK(31U, 28U)

View file

@ -41,6 +41,7 @@ void plat_gic_redistif_on(void);
void plat_gic_redistif_off(void);
extern uint32_t cpu_clock, platform_id, platform_version;
extern uint32_t rtlversion, psversion, pmcversion;
void board_detection(void);
const char *board_name_decode(void);
uint64_t smc_handler(uint32_t smc_fid, uint64_t x1, uint64_t x2, uint64_t x3,