| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
#include <common/bl_common.h> |
| 8 |
#include <platform_def.h> |
| 9 |
#include <services/rmm_core_manifest.h> |
| 10 |
#include <services/rmmd_svc.h> |
| 11 |
#include <services/trp/platform_trp.h> |
| 12 |
#include <trp_helpers.h> |
| 13 |
|
| 14 |
#include "../qemu_private.h" |
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
extern uint32_t trp_boot_manifest_version; |
| 20 |
|
| 21 |
static int qemu_trp_process_manifest(struct rmm_manifest *manifest) |
| 22 |
{ |
| 23 |
|
| 24 |
assert(manifest->padding == 0U); |
| 25 |
|
| 26 |
|
| 27 |
if (RMMD_MANIFEST_VERSION_MAJOR != |
| 28 |
RMMD_GET_MANIFEST_VERSION_MAJOR(manifest->version)) { |
| 29 |
return E_RMM_BOOT_MANIFEST_VERSION_NOT_SUPPORTED; |
| 30 |
} |
| 31 |
|
| 32 |
trp_boot_manifest_version = manifest->version; |
| 33 |
flush_dcache_range((uintptr_t)manifest, sizeof(struct rmm_manifest)); |
| 34 |
|
| 35 |
return 0; |
| 36 |
} |
| 37 |
|
| 38 |
void trp_early_platform_setup(struct rmm_manifest *manifest) |
| 39 |
{ |
| 40 |
int rc; |
| 41 |
|
| 42 |
rc = qemu_trp_process_manifest(manifest); |
| 43 |
if (rc != 0) { |
| 44 |
trp_boot_abort(rc); |
| 45 |
} |
| 46 |
|
| 47 |
qemu_console_init(); |
| 48 |
} |