blob: d1c5303fae8625d53fda9f8c723d01eb101a00bb [file] [log] [blame]
Venkatesh Yadav Abbarapu1463dd52020-01-07 03:25:16 -07001/*
Michal Simek2a47faa2023-04-14 08:43:51 +02002 * Copyright (c) 2020, Arm Limited and Contributors. All rights reserved.
Michal Simek01297072023-04-25 14:14:06 +02003 * Copyright (c) 2023, Advanced Micro Devices, Inc. All rights reserved.
Venkatesh Yadav Abbarapu1463dd52020-01-07 03:25:16 -07004 *
5 * SPDX-License-Identifier: BSD-3-Clause
6 */
7
8#ifndef PLAT_STARTUP_H
9#define PLAT_STARTUP_H
10
Claus Pedersen785e66c2022-09-12 22:42:58 +000011#include <common/bl_common.h>
12
Venkatesh Yadav Abbarapu1463dd52020-01-07 03:25:16 -070013/* For FSBL handover */
14enum fsbl_handoff {
15 FSBL_HANDOFF_SUCCESS = 0,
16 FSBL_HANDOFF_NO_STRUCT,
17 FSBL_HANDOFF_INVAL_STRUCT,
18 FSBL_HANDOFF_TOO_MANY_PARTS
19};
20
Venkatesh Yadav Abbarapu31b8ca22022-07-12 09:11:23 +053021#define FSBL_MAX_PARTITIONS 8U
22
23/* Structure corresponding to each partition entry */
24struct xfsbl_partition {
25 uint64_t entry_point;
26 uint64_t flags;
27};
28
Prasad Kummarie0783112023-04-26 11:02:07 +053029/* Structure for handoff parameters to TrustedFirmware-A (TF-A) */
30struct xfsbl_tfa_handoff_params {
Venkatesh Yadav Abbarapu31b8ca22022-07-12 09:11:23 +053031 uint8_t magic[4];
32 uint32_t num_entries;
33 struct xfsbl_partition partition[FSBL_MAX_PARTITIONS];
34};
35
Prasad Kummarie0783112023-04-26 11:02:07 +053036#define TFA_HANDOFF_PARAMS_MAX_SIZE sizeof(struct xfsbl_tfa_handoff_params)
Venkatesh Yadav Abbarapu58b24d82022-07-12 09:19:03 +053037
Prasad Kummarie0783112023-04-26 11:02:07 +053038enum fsbl_handoff fsbl_tfa_handover(entry_point_info_t *bl32,
Venkatesh Yadav Abbarapuc70726f2022-05-16 17:44:33 +053039 entry_point_info_t *bl33,
Prasad Kummarie0783112023-04-26 11:02:07 +053040 uint64_t tfa_handoff_addr);
Venkatesh Yadav Abbarapu1463dd52020-01-07 03:25:16 -070041
Michal Simekc98da1c2023-02-09 10:28:58 +010042/* 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 Abbarapu1463dd52020-01-07 03:25:16 -070046#endif /* PLAT_STARTUP_H */