arm-trusted-firmware/plat/arm/board/arm_fpga/fpga_bl31_setup.c
Oliver Swede 536d906abc plat/arm/board/arm_fpga: Enable basic BL31 port for an FPGA image
This adds the minimal functions and definitions to create a basic
BL31 port for an initial FPGA image, in order for the port to be
uploaded to one the FPGA boards operated by an internal group within
Arm, such that BL31 runs as a payload for an image.

Future changes will enable the port for a wide range of system
configurations running on the FPGA boards to ensure compatibility with
multiple FPGA images.

It is expected that this will replace the FPGA fork of the Linux kernel
bootwrapper by performing similar secure-world initialization and setup
through the use of drivers and other well-established methods, before
passing control to the kernel, which will act as the BL33 payload and
run in EL2NS.

This change introduces a basic, loadable port with the console
initialized by setting the baud rate and base address of the UART as
configured by the Zeus image.

It is a BL31-only port, and RESET_TO_BL31 is enabled to reflect this.

Signed-off-by: Oliver Swede <oli.swede@arm.com>
Change-Id: I1817ad81be00afddcdbbda1ab70eb697203178e2
2020-03-26 20:22:30 +00:00

52 lines
1.1 KiB
C

/*
* Copyright (c) 2020, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <plat/common/platform.h>
#include <platform_def.h>
#include "fpga_private.h"
void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
u_register_t arg2, u_register_t arg3)
{
fpga_console_init();
/*
* TODO: implement any extra early platform setup before jumping to BL33
* payload
*/
}
void bl31_plat_arch_setup(void)
{
}
void bl31_platform_setup(void)
{
/* TODO: initialize GIC and timer using the specifications of the FPGA image */
}
entry_point_info_t *bl31_plat_get_next_image_ep_info(uint32_t type)
{
/*
* TODO: return entry_point_info_t struct containing information about the
* BL33 payload, which will run in EL2NS mode.
*/
return NULL;
}
unsigned int plat_get_syscnt_freq2(void)
{
/*
* TODO: return the frequency of the System Counter as configured by the
* FPGA image
*/
return 0;
}
void bl31_plat_enable_mmu(uint32_t flags)
{
/* TODO: determine if MMU needs to be enabled */
}