Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
744a1d6e
Commit
744a1d6e
authored
Jan 23, 2020
by
Alexei Fedorov
Committed by
TrustedFirmware Code Review
Jan 23, 2020
Browse files
Merge "xilinx: common: Move ATF handover to common file" into integration
parents
4302e045
4d9f825a
Changes
5
Hide whitespace changes
Inline
Side-by-side
plat/xilinx/common/include/plat_startup.h
0 → 100644
View file @
744a1d6e
/*
* Copyright (c) 2020, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef PLAT_STARTUP_H
#define PLAT_STARTUP_H
/* For FSBL handover */
enum
fsbl_handoff
{
FSBL_HANDOFF_SUCCESS
=
0
,
FSBL_HANDOFF_NO_STRUCT
,
FSBL_HANDOFF_INVAL_STRUCT
,
FSBL_HANDOFF_TOO_MANY_PARTS
};
enum
fsbl_handoff
fsbl_atf_handover
(
entry_point_info_t
*
bl32_image_ep_info
,
entry_point_info_t
*
bl33_image_ep_info
,
uint64_t
atf_handoff_addr
);
#endif
/* PLAT_STARTUP_H */
plat/xilinx/
zynqmp
/plat_startup.c
→
plat/xilinx/
common
/plat_startup.c
View file @
744a1d6e
/*
* Copyright (c) 2014-20
18
, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2014-20
20
, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
...
...
@@ -8,10 +8,8 @@
#include <arch_helpers.h>
#include <common/debug.h>
#include <lib/mmio.h>
#include <plat_private.h>
#include <plat_startup.h>
#include "zynqmp_def.h"
/*
* ATFHandoffParams
...
...
@@ -147,6 +145,7 @@ static int get_fsbl_estate(const struct xfsbl_partition *partition)
* Populates the bl32 and bl33 image info structures
* @bl32: BL32 image info structure
* @bl33: BL33 image info structure
* atf_handoff_addr: ATF handoff address
*
* Process the handoff paramters from the FSBL and populate the BL32 and BL33
* image info structures accordingly.
...
...
@@ -154,12 +153,11 @@ static int get_fsbl_estate(const struct xfsbl_partition *partition)
* Return: Return the status of the handoff. The value will be from the
* fsbl_handoff enum.
*/
enum
fsbl_handoff
fsbl_atf_handover
(
entry_point_info_t
*
bl32
,
entry_point_info_t
*
bl33
)
enum
fsbl_handoff
fsbl_atf_handover
(
entry_point_info_t
*
bl32
,
entry_point_info_t
*
bl33
,
uint64_t
atf_handoff_addr
)
{
uint64_t
atf_handoff_addr
;
const
struct
xfsbl_atf_handoff_params
*
ATFHandoffParams
;
atf_handoff_addr
=
mmio_read_32
(
PMU_GLOBAL_GEN_STORAGE6
);
assert
((
atf_handoff_addr
<
BL31_BASE
)
||
(
atf_handoff_addr
>
(
uint64_t
)
&
__BL31_END__
));
if
(
!
atf_handoff_addr
)
{
...
...
plat/xilinx/zynqmp/bl31_zynqmp_setup.c
View file @
744a1d6e
/*
* Copyright (c) 2013-20
19
, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2013-20
20
, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
...
...
@@ -13,8 +13,11 @@
#include <drivers/console.h>
#include <plat/arm/common/plat_arm.h>
#include <plat/common/platform.h>
#include <lib/mmio.h>
#include <plat_startup.h>
#include <plat_private.h>
#include <zynqmp_def.h>
static
entry_point_info_t
bl32_image_ep_info
;
static
entry_point_info_t
bl33_image_ep_info
;
...
...
@@ -57,6 +60,7 @@ static inline void bl31_set_default_config(void)
void
bl31_early_platform_setup2
(
u_register_t
arg0
,
u_register_t
arg1
,
u_register_t
arg2
,
u_register_t
arg3
)
{
uint64_t
atf_handoff_addr
;
/* Register the console to provide early debug support */
static
console_cdns_t
bl31_boot_console
;
(
void
)
console_cdns_register
(
ZYNQMP_UART_BASE
,
...
...
@@ -86,12 +90,15 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
SET_PARAM_HEAD
(
&
bl33_image_ep_info
,
PARAM_EP
,
VERSION_1
,
0
);
SET_SECURITY_STATE
(
bl33_image_ep_info
.
h
.
attr
,
NON_SECURE
);
atf_handoff_addr
=
mmio_read_32
(
PMU_GLOBAL_GEN_STORAGE6
);
if
(
zynqmp_get_bootmode
()
==
ZYNQMP_BOOTMODE_JTAG
)
{
bl31_set_default_config
();
}
else
{
/* use parameters from FSBL */
enum
fsbl_handoff
ret
=
fsbl_atf_handover
(
&
bl32_image_ep_info
,
&
bl33_image_ep_info
);
&
bl33_image_ep_info
,
atf_handoff_addr
);
if
(
ret
==
FSBL_HANDOFF_NO_STRUCT
)
bl31_set_default_config
();
else
if
(
ret
!=
FSBL_HANDOFF_SUCCESS
)
...
...
plat/xilinx/zynqmp/include/plat_private.h
View file @
744a1d6e
/*
* Copyright (c) 2014-20
19
, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2014-20
20
, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
...
...
@@ -21,13 +21,6 @@ unsigned int zynqmp_calc_core_pos(u_register_t mpidr);
unsigned
int
zynqmp_get_uart_clk
(
void
);
unsigned
int
zynqmp_get_bootmode
(
void
);
/* For FSBL handover */
enum
fsbl_handoff
{
FSBL_HANDOFF_SUCCESS
=
0
,
FSBL_HANDOFF_NO_STRUCT
,
FSBL_HANDOFF_INVAL_STRUCT
,
FSBL_HANDOFF_TOO_MANY_PARTS
,
};
#if ZYNQMP_WDT_RESTART
/*
...
...
@@ -37,7 +30,4 @@ enum fsbl_handoff {
int
request_intr_type_el3
(
uint32_t
,
interrupt_type_handler_t
);
#endif
enum
fsbl_handoff
fsbl_atf_handover
(
entry_point_info_t
*
bl32_image_ep_info
,
entry_point_info_t
*
bl33_image_ep_info
);
#endif
/* PLAT_PRIVATE_H */
plat/xilinx/zynqmp/platform.mk
View file @
744a1d6e
...
...
@@ -82,10 +82,10 @@ BL31_SOURCES += drivers/arm/cci/cci.c \
plat/common/plat_psci_common.c
\
plat/xilinx/common/ipi_mailbox_service/ipi_mailbox_svc.c
\
plat/xilinx/common/pm_service/pm_ipi.c
\
plat/xilinx/common/plat_startup.c
\
plat/xilinx/zynqmp/bl31_zynqmp_setup.c
\
plat/xilinx/zynqmp/plat_psci.c
\
plat/xilinx/zynqmp/plat_zynqmp.c
\
plat/xilinx/zynqmp/plat_startup.c
\
plat/xilinx/zynqmp/plat_topology.c
\
plat/xilinx/zynqmp/sip_svc_setup.c
\
plat/xilinx/zynqmp/pm_service/pm_svc_main.c
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment