Venkatesh Yadav Abbarapu | 1463dd5 | 2020-01-07 03:25:16 -0700 | [diff] [blame] | 1 | /* |
Michal Simek | 2a47faa | 2023-04-14 08:43:51 +0200 | [diff] [blame] | 2 | * Copyright (c) 2020, Arm Limited and Contributors. All rights reserved. |
Michal Simek | 0129707 | 2023-04-25 14:14:06 +0200 | [diff] [blame] | 3 | * Copyright (c) 2023, Advanced Micro Devices, Inc. All rights reserved. |
Venkatesh Yadav Abbarapu | 1463dd5 | 2020-01-07 03:25:16 -0700 | [diff] [blame] | 4 | * |
| 5 | * SPDX-License-Identifier: BSD-3-Clause |
| 6 | */ |
| 7 | |
| 8 | #ifndef PLAT_STARTUP_H |
| 9 | #define PLAT_STARTUP_H |
| 10 | |
Claus Pedersen | 785e66c | 2022-09-12 22:42:58 +0000 | [diff] [blame] | 11 | #include <common/bl_common.h> |
| 12 | |
Prasad Kummari | 07795fa | 2023-06-08 21:36:38 +0530 | [diff] [blame^] | 13 | /* For Xilinx bootloader XBL handover */ |
| 14 | enum xbl_handoff { |
| 15 | XBL_HANDOFF_SUCCESS = 0, |
| 16 | XBL_HANDOFF_NO_STRUCT, |
| 17 | XBL_HANDOFF_INVAL_STRUCT, |
| 18 | XBL_HANDOFF_TOO_MANY_PARTS |
Venkatesh Yadav Abbarapu | 1463dd5 | 2020-01-07 03:25:16 -0700 | [diff] [blame] | 19 | }; |
| 20 | |
Prasad Kummari | 07795fa | 2023-06-08 21:36:38 +0530 | [diff] [blame^] | 21 | #define XBL_MAX_PARTITIONS 8U |
Venkatesh Yadav Abbarapu | 31b8ca2 | 2022-07-12 09:11:23 +0530 | [diff] [blame] | 22 | |
| 23 | /* Structure corresponding to each partition entry */ |
Prasad Kummari | 07795fa | 2023-06-08 21:36:38 +0530 | [diff] [blame^] | 24 | struct xbl_partition { |
Venkatesh Yadav Abbarapu | 31b8ca2 | 2022-07-12 09:11:23 +0530 | [diff] [blame] | 25 | uint64_t entry_point; |
| 26 | uint64_t flags; |
| 27 | }; |
| 28 | |
Prasad Kummari | e078311 | 2023-04-26 11:02:07 +0530 | [diff] [blame] | 29 | /* Structure for handoff parameters to TrustedFirmware-A (TF-A) */ |
Prasad Kummari | 07795fa | 2023-06-08 21:36:38 +0530 | [diff] [blame^] | 30 | struct xbl_handoff_params { |
Venkatesh Yadav Abbarapu | 31b8ca2 | 2022-07-12 09:11:23 +0530 | [diff] [blame] | 31 | uint8_t magic[4]; |
| 32 | uint32_t num_entries; |
Prasad Kummari | 07795fa | 2023-06-08 21:36:38 +0530 | [diff] [blame^] | 33 | struct xbl_partition partition[XBL_MAX_PARTITIONS]; |
Venkatesh Yadav Abbarapu | 31b8ca2 | 2022-07-12 09:11:23 +0530 | [diff] [blame] | 34 | }; |
| 35 | |
Prasad Kummari | 07795fa | 2023-06-08 21:36:38 +0530 | [diff] [blame^] | 36 | #define HANDOFF_PARAMS_MAX_SIZE sizeof(struct xbl_handoff_params) |
Venkatesh Yadav Abbarapu | 58b24d8 | 2022-07-12 09:19:03 +0530 | [diff] [blame] | 37 | |
Prasad Kummari | 07795fa | 2023-06-08 21:36:38 +0530 | [diff] [blame^] | 38 | enum xbl_handoff xbl_handover(entry_point_info_t *bl32, |
Venkatesh Yadav Abbarapu | c70726f | 2022-05-16 17:44:33 +0530 | [diff] [blame] | 39 | entry_point_info_t *bl33, |
Prasad Kummari | 07795fa | 2023-06-08 21:36:38 +0530 | [diff] [blame^] | 40 | uint64_t handoff_addr); |
Venkatesh Yadav Abbarapu | 1463dd5 | 2020-01-07 03:25:16 -0700 | [diff] [blame] | 41 | |
Michal Simek | c98da1c | 2023-02-09 10:28:58 +0100 | [diff] [blame] | 42 | /* JEDEC Standard Manufacturer's Identification Code and Bank ID JEP106 */ |
| 43 | #define JEDEC_XILINX_MFID U(0x49) |
| 44 | #define JEDEC_XILINX_BKID U(0) |
| 45 | |
Venkatesh Yadav Abbarapu | 1463dd5 | 2020-01-07 03:25:16 -0700 | [diff] [blame] | 46 | #endif /* PLAT_STARTUP_H */ |