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
beff4910
"vscode:/vscode.git/clone" did not exist on "d959283898f4c969579346a6d3596d9dd8fa3532"
Commit
beff4910
authored
May 22, 2020
by
Mark Dykes
Committed by
TrustedFirmware Code Review
May 22, 2020
Browse files
Merge "plat/arm/fvp: populate runtime console parameters dynamically" into integration
parents
de9d0d7c
12d13430
Changes
4
Hide whitespace changes
Inline
Side-by-side
plat/arm/board/fvp/fvp_console.c
0 → 100644
View file @
beff4910
/*
* Copyright (c) 2020, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <assert.h>
#include <platform_def.h>
#include <common/debug.h>
#include <drivers/arm/pl011.h>
#include <drivers/console.h>
#include <fconf_hw_config_getter.h>
#include <plat/arm/common/plat_arm.h>
static
console_t
fvp_runtime_console
;
/* Initialize the runtime console */
void
arm_console_runtime_init
(
void
)
{
uintptr_t
uart_base
;
uint32_t
uart_clk
;
/*
* fconf APIs are not supported for RESET_TO_SP_MIN, RESET_TO_BL31 and
* BL2_AT_EL3 systems.
*/
#if RESET_TO_SP_MIN || RESET_TO_BL31 || BL2_AT_EL3
uart_base
=
PLAT_ARM_RUN_UART_BASE
;
uart_clk
=
PLAT_ARM_RUN_UART_CLK_IN_HZ
;
#else
uart_base
=
FCONF_GET_PROPERTY
(
hw_config
,
uart_serial_config
,
uart_base
);
uart_clk
=
FCONF_GET_PROPERTY
(
hw_config
,
uart_serial_config
,
uart_clk
);
#endif
int
rc
=
console_pl011_register
(
uart_base
,
uart_clk
,
ARM_CONSOLE_BAUDRATE
,
&
fvp_runtime_console
);
if
(
rc
==
0
)
{
panic
();
}
console_set_scope
(
&
fvp_runtime_console
,
CONSOLE_FLAG_RUNTIME
);
}
void
arm_console_runtime_end
(
void
)
{
(
void
)
console_flush
();
(
void
)
console_unregister
(
&
fvp_runtime_console
);
}
plat/arm/board/fvp/platform.mk
View file @
beff4910
...
...
@@ -205,6 +205,7 @@ BL31_SOURCES += drivers/arm/fvp/fvp_pwrc.c \
drivers/cfi/v2m/v2m_flash.c
\
lib/utils/mem_region.c
\
plat/arm/board/fvp/fvp_bl31_setup.c
\
plat/arm/board/fvp/fvp_console.c
\
plat/arm/board/fvp/fvp_pm.c
\
plat/arm/board/fvp/fvp_topology.c
\
plat/arm/board/fvp/aarch64/fvp_helpers.S
\
...
...
plat/arm/board/fvp/sp_min/sp_min-fvp.mk
View file @
beff4910
...
...
@@ -10,6 +10,7 @@ BL32_SOURCES += drivers/arm/fvp/fvp_pwrc.c \
lib/utils/mem_region.c
\
plat/arm/board/fvp/aarch32/fvp_helpers.S
\
plat/arm/board/fvp/fvp_pm.c
\
plat/arm/board/fvp/fvp_console.c
\
plat/arm/board/fvp/fvp_topology.c
\
plat/arm/board/fvp/sp_min/fvp_sp_min_setup.c
\
plat/arm/common/arm_nor_psci_mem_protect.c
\
...
...
plat/arm/common/arm_console.c
View file @
beff4910
...
...
@@ -13,6 +13,9 @@
#include <drivers/console.h>
#include <plat/arm/common/plat_arm.h>
#pragma weak arm_console_runtime_init
#pragma weak arm_console_runtime_end
/*******************************************************************************
* Functions that set up the console
******************************************************************************/
...
...
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