blob: 3343cf00a6fae4b60f2527fdf3b42a3ef1667247 [file] [log] [blame]
Olivier Deprezfb05f3c2020-11-10 17:48:04 +01001/*
2 * Copyright 2020 The Hafnium Authors.
3 *
4 * Use of this source code is governed by a BSD-style
5 * license that can be found in the LICENSE file or at
6 * https://opensource.org/licenses/BSD-3-Clause.
7 */
8
9#include "hf/plat/boot_flow.h"
10#include "hf/std.h"
11
12/* Set by arch-specific boot-time hook. */
13uintreg_t plat_boot_flow_fdt_addr;
14
15/**
16 * Returns the physical address of SPMC manifest FDT blob. This was passed to
17 * SPMC cold boot entry by the SPMD.
18 */
19paddr_t plat_boot_flow_get_fdt_addr(void)
20{
21 return pa_init((uintpaddr_t)plat_boot_flow_fdt_addr);
22}
23
24/**
25 * The value returned by this function is not meaningful in context of the SPMC
26 * as there is no primary VM.
27 */
28uintreg_t plat_boot_flow_get_kernel_arg(void)
29{
30 return 0;
31}
32
33/**
34 * The value returned by this function is not meaningful in context of the SPMC
Olivier Depreza2d282a2022-02-22 14:13:05 +010035 * as there is no initrd. Initrd begin and end values are cleared such that the
36 * check done in one_time_init (initrd_begin is non null) is false, hinting a
37 * ramdisk is not present.
Olivier Deprezfb05f3c2020-11-10 17:48:04 +010038 */
39bool plat_boot_flow_get_initrd_range(const struct fdt *fdt, paddr_t *begin,
40 paddr_t *end)
41{
42 (void)fdt;
Olivier Depreza2d282a2022-02-22 14:13:05 +010043
44 *begin = pa_init(0);
45 *end = pa_init(0);
Olivier Deprezfb05f3c2020-11-10 17:48:04 +010046
47 return true;
48}
49
50/**
51 * This wrapper is unused in context of the SPMC.
52 */
53bool plat_boot_flow_update(struct mm_stage1_locked stage1_locked,
54 const struct manifest *manifest,
55 struct boot_params_update *update,
56 struct memiter *cpio, struct mpool *ppool)
57{
58 (void)stage1_locked;
59 (void)manifest;
60 (void)update;
61 (void)cpio;
62 (void)ppool;
63
64 return true;
65}