Olivier Deprez | fb05f3c | 2020-11-10 17:48:04 +0100 | [diff] [blame^] | 1 | /* |
| 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. */ |
| 13 | uintreg_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 | */ |
| 19 | paddr_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 | */ |
| 28 | uintreg_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 |
| 35 | * as there is no initrd. |
| 36 | */ |
| 37 | bool plat_boot_flow_get_initrd_range(const struct fdt *fdt, paddr_t *begin, |
| 38 | paddr_t *end) |
| 39 | { |
| 40 | (void)fdt; |
| 41 | (void)begin; |
| 42 | (void)end; |
| 43 | |
| 44 | return true; |
| 45 | } |
| 46 | |
| 47 | /** |
| 48 | * This wrapper is unused in context of the SPMC. |
| 49 | */ |
| 50 | bool plat_boot_flow_update(struct mm_stage1_locked stage1_locked, |
| 51 | const struct manifest *manifest, |
| 52 | struct boot_params_update *update, |
| 53 | struct memiter *cpio, struct mpool *ppool) |
| 54 | { |
| 55 | (void)stage1_locked; |
| 56 | (void)manifest; |
| 57 | (void)update; |
| 58 | (void)cpio; |
| 59 | (void)ppool; |
| 60 | |
| 61 | return true; |
| 62 | } |