mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-22 04:24:19 +00:00

When an external RMM is not provided during make invocation, include the Test Realm Payload (TRP) to the FIP. Change-Id: I15d396cf268a08d79da63075aadb4172238eb225 Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
48 lines
1.2 KiB
C
48 lines
1.2 KiB
C
/*
|
|
* Copyright (c) 2024, Arm Limited. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#include <common/bl_common.h>
|
|
#include <platform_def.h>
|
|
#include <services/rmm_core_manifest.h>
|
|
#include <services/rmmd_svc.h>
|
|
#include <services/trp/platform_trp.h>
|
|
#include <trp_helpers.h>
|
|
|
|
#include "../qemu_private.h"
|
|
|
|
/*******************************************************************************
|
|
* Received from boot manifest and populated here
|
|
******************************************************************************/
|
|
extern uint32_t trp_boot_manifest_version;
|
|
|
|
static int qemu_trp_process_manifest(struct rmm_manifest *manifest)
|
|
{
|
|
/* padding field on the manifest must be RES0 */
|
|
assert(manifest->padding == 0U);
|
|
|
|
/* Verify the Boot Manifest Version. Only the Major is considered */
|
|
if (RMMD_MANIFEST_VERSION_MAJOR !=
|
|
RMMD_GET_MANIFEST_VERSION_MAJOR(manifest->version)) {
|
|
return E_RMM_BOOT_MANIFEST_VERSION_NOT_SUPPORTED;
|
|
}
|
|
|
|
trp_boot_manifest_version = manifest->version;
|
|
flush_dcache_range((uintptr_t)manifest, sizeof(struct rmm_manifest));
|
|
|
|
return 0;
|
|
}
|
|
|
|
void trp_early_platform_setup(struct rmm_manifest *manifest)
|
|
{
|
|
int rc;
|
|
|
|
rc = qemu_trp_process_manifest(manifest);
|
|
if (rc != 0) {
|
|
trp_boot_abort(rc);
|
|
}
|
|
|
|
qemu_console_init();
|
|
}
|