Venkatesh Yadav Abbarapu | 1463dd5 | 2020-01-07 03:25:16 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2020, ARM Limited and Contributors. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #ifndef PLAT_STARTUP_H |
| 8 | #define PLAT_STARTUP_H |
| 9 | |
Claus Pedersen | 785e66c | 2022-09-12 22:42:58 +0000 | [diff] [blame] | 10 | #include <common/bl_common.h> |
| 11 | |
Venkatesh Yadav Abbarapu | 1463dd5 | 2020-01-07 03:25:16 -0700 | [diff] [blame] | 12 | /* For FSBL handover */ |
| 13 | enum fsbl_handoff { |
| 14 | FSBL_HANDOFF_SUCCESS = 0, |
| 15 | FSBL_HANDOFF_NO_STRUCT, |
| 16 | FSBL_HANDOFF_INVAL_STRUCT, |
| 17 | FSBL_HANDOFF_TOO_MANY_PARTS |
| 18 | }; |
| 19 | |
Venkatesh Yadav Abbarapu | 31b8ca2 | 2022-07-12 09:11:23 +0530 | [diff] [blame] | 20 | #define FSBL_MAX_PARTITIONS 8U |
| 21 | |
| 22 | /* Structure corresponding to each partition entry */ |
| 23 | struct xfsbl_partition { |
| 24 | uint64_t entry_point; |
| 25 | uint64_t flags; |
| 26 | }; |
| 27 | |
| 28 | /* Structure for handoff parameters to ARM Trusted Firmware (ATF) */ |
| 29 | struct xfsbl_atf_handoff_params { |
| 30 | uint8_t magic[4]; |
| 31 | uint32_t num_entries; |
| 32 | struct xfsbl_partition partition[FSBL_MAX_PARTITIONS]; |
| 33 | }; |
| 34 | |
Venkatesh Yadav Abbarapu | 58b24d8 | 2022-07-12 09:19:03 +0530 | [diff] [blame] | 35 | #define ATF_HANDOFF_PARAMS_MAX_SIZE sizeof(struct xfsbl_atf_handoff_params) |
| 36 | |
Venkatesh Yadav Abbarapu | c70726f | 2022-05-16 17:44:33 +0530 | [diff] [blame] | 37 | enum fsbl_handoff fsbl_atf_handover(entry_point_info_t *bl32, |
| 38 | entry_point_info_t *bl33, |
Venkatesh Yadav Abbarapu | 1463dd5 | 2020-01-07 03:25:16 -0700 | [diff] [blame] | 39 | uint64_t atf_handoff_addr); |
| 40 | |
| 41 | #endif /* PLAT_STARTUP_H */ |