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
dfe577a8
Commit
dfe577a8
authored
Oct 14, 2020
by
Mark Dykes
Committed by
TrustedFirmware Code Review
Oct 14, 2020
Browse files
Merge "Don't return error information from console_flush" into integration
parents
5dfe680f
831b0e98
Changes
55
Show whitespace changes
Inline
Side-by-side
lib/libc/assert.c
View file @
dfe577a8
/*
* 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
*/
...
...
@@ -23,7 +23,7 @@ void __dead2 __assert(const char *file, unsigned int line,
{
printf
(
"ASSERT: %s:%d:%s
\n
"
,
file
,
line
,
assertion
);
backtrace
(
"assert"
);
(
void
)
console_flush
();
console_flush
();
plat_panic_handler
();
}
#elif PLAT_LOG_LEVEL_ASSERT >= LOG_LEVEL_INFO
...
...
@@ -31,14 +31,14 @@ void __dead2 __assert(const char *file, unsigned int line)
{
printf
(
"ASSERT: %s:%d
\n
"
,
file
,
line
);
backtrace
(
"assert"
);
(
void
)
console_flush
();
console_flush
();
plat_panic_handler
();
}
#else
void
__dead2
__assert
(
void
)
{
backtrace
(
"assert"
);
(
void
)
console_flush
();
console_flush
();
plat_panic_handler
();
}
#endif
lib/psci/psci_system_off.c
View file @
dfe577a8
/*
* 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
*/
...
...
@@ -25,7 +25,7 @@ void __dead2 psci_system_off(void)
psci_spd_pm
->
svc_system_off
();
}
(
void
)
console_flush
();
console_flush
();
/* Call the platform specific hook */
psci_plat_pm_ops
->
system_off
();
...
...
@@ -44,7 +44,7 @@ void __dead2 psci_system_reset(void)
psci_spd_pm
->
svc_system_reset
();
}
(
void
)
console_flush
();
console_flush
();
/* Call the platform specific hook */
psci_plat_pm_ops
->
system_reset
();
...
...
@@ -77,7 +77,7 @@ u_register_t psci_system_reset2(uint32_t reset_type, u_register_t cookie)
if
((
psci_spd_pm
!=
NULL
)
&&
(
psci_spd_pm
->
svc_system_reset
!=
NULL
))
{
psci_spd_pm
->
svc_system_reset
();
}
(
void
)
console_flush
();
console_flush
();
return
(
u_register_t
)
psci_plat_pm_ops
->
system_reset2
((
int
)
is_vendor
,
reset_type
,
...
...
plat/amlogic/common/aarch64/aml_helpers.S
View file @
dfe577a8
/*
*
Copyright
(
c
)
2018
-
20
19
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
Copyright
(
c
)
2018
-
20
20
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
*
SPDX
-
License
-
Identifier
:
BSD
-
3
-
Clause
*/
...
...
@@ -78,8 +78,8 @@ func plat_crash_console_putc
endfunc
plat_crash_console_putc
/
*
---------------------------------------------
*
int
plat_crash_console_flush
()
*
Out
:
return
-
1
on
error
else
return
0
.
*
void
plat_crash_console_flush
()
*
Out
:
void
.
*
Clobber
list
:
x0
,
x1
*
---------------------------------------------
*/
...
...
plat/arm/board/fvp/fvp_console.c
View file @
dfe577a8
...
...
@@ -49,6 +49,6 @@ void arm_console_runtime_init(void)
void
arm_console_runtime_end
(
void
)
{
(
void
)
console_flush
();
console_flush
();
(
void
)
console_unregister
(
&
fvp_runtime_console
);
}
plat/arm/board/fvp/fvp_err.c
View file @
dfe577a8
...
...
@@ -37,7 +37,7 @@ __dead2 void plat_arm_error_handler(int err)
break
;
}
(
void
)
console_flush
();
console_flush
();
/* Setup the watchdog to reset the system as soon as possible */
sp805_refresh
(
ARM_SP805_TWDG_BASE
,
1U
);
...
...
plat/arm/common/aarch32/arm_helpers.S
View file @
dfe577a8
/*
*
Copyright
(
c
)
2016
-
20
18
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
Copyright
(
c
)
2016
-
20
20
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
*
SPDX
-
License
-
Identifier
:
BSD
-
3
-
Clause
*/
...
...
@@ -64,10 +64,10 @@ func plat_crash_console_putc
endfunc
plat_crash_console_putc
/
*
---------------------------------------------
*
int
plat_crash_console_flush
()
*
void
plat_crash_console_flush
()
*
Function
to
force
a
write
of
all
buffered
*
data
that
hasn
't been output.
*
Out
:
return
-
1
on
error
else
return
0
.
*
Out
:
void
.
*
Clobber
list
:
r0
*
---------------------------------------------
*/
...
...
plat/arm/common/aarch64/arm_helpers.S
View file @
dfe577a8
/*
*
Copyright
(
c
)
2015
-
20
18
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
Copyright
(
c
)
2015
-
20
20
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
*
SPDX
-
License
-
Identifier
:
BSD
-
3
-
Clause
*/
...
...
@@ -66,10 +66,10 @@ func plat_crash_console_putc
endfunc
plat_crash_console_putc
/
*
---------------------------------------------
*
int
plat_crash_console_flush
()
*
void
plat_crash_console_flush
()
*
Function
to
force
a
write
of
all
buffered
*
data
that
hasn
't been output.
*
Out
:
return
-
1
on
error
else
return
0
.
*
Out
:
void
.
*
Clobber
list
:
r0
*
---------------------------------------------
*/
...
...
plat/arm/common/arm_console.c
View file @
dfe577a8
/*
* Copyright (c) 2018-20
19
, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2018-20
20
, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
...
...
@@ -43,7 +43,7 @@ void __init arm_console_boot_init(void)
void
arm_console_boot_end
(
void
)
{
(
void
)
console_flush
();
console_flush
();
(
void
)
console_unregister
(
&
arm_boot_console
);
}
...
...
@@ -62,5 +62,5 @@ void arm_console_runtime_init(void)
void
arm_console_runtime_end
(
void
)
{
(
void
)
console_flush
();
console_flush
();
}
plat/brcm/board/common/bcm_console.c
View file @
dfe577a8
...
...
@@ -39,7 +39,7 @@ void bcm_console_boot_init(void)
void
bcm_console_boot_end
(
void
)
{
(
void
)
console_flush
();
console_flush
();
(
void
)
console_unregister
(
&
bcm_boot_console
);
}
...
...
@@ -59,7 +59,7 @@ void bcm_console_runtime_init(void)
void
bcm_console_runtime_end
(
void
)
{
(
void
)
console_flush
();
console_flush
();
(
void
)
console_unregister
(
&
bcm_runtime_console
);
}
plat/brcm/board/stingray/aarch64/plat_helpers.S
View file @
dfe577a8
...
...
@@ -182,7 +182,7 @@ func plat_crash_console_putc
endfunc
plat_crash_console_putc
/
*
---------------------------------------------
*
int
plat_crash_console_flush
(
void
)
*
void
plat_crash_console_flush
(
void
)
*
Function
to
flush
crash
console
*
Clobber
list
:
x0
,
x1
*
---------------------------------------------
...
...
plat/common/aarch64/plat_common.c
View file @
dfe577a8
...
...
@@ -96,7 +96,7 @@ void plat_ea_handler(unsigned int ea_reason, uint64_t syndrome, void *cookie,
#if HANDLE_EA_EL3_FIRST
/* Skip backtrace for lower EL */
if
(
level
!=
MODE_EL3
)
{
(
void
)
console_flush
();
console_flush
();
do_panic
();
}
#endif
...
...
plat/hisilicon/hikey/aarch64/hikey_helpers.S
View file @
dfe577a8
/*
*
Copyright
(
c
)
2017
-
20
18
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
Copyright
(
c
)
2017
-
20
20
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
*
SPDX
-
License
-
Identifier
:
BSD
-
3
-
Clause
*/
...
...
@@ -62,10 +62,10 @@ func plat_crash_console_putc
endfunc
plat_crash_console_putc
/
*
---------------------------------------------
*
int
plat_crash_console_flush
()
*
void
plat_crash_console_flush
()
*
Function
to
force
a
write
of
all
buffered
*
data
that
hasn
't been output.
*
Out
:
return
-
1
on
error
else
return
0
.
*
Out
:
void
.
*
Clobber
list
:
x0
,
x1
*
---------------------------------------------
*/
...
...
plat/hisilicon/hikey960/aarch64/hikey960_helpers.S
View file @
dfe577a8
/*
*
Copyright
(
c
)
2017
-
20
18
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
Copyright
(
c
)
2017
-
20
20
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
*
SPDX
-
License
-
Identifier
:
BSD
-
3
-
Clause
*/
...
...
@@ -66,10 +66,10 @@ func plat_crash_console_putc
endfunc
plat_crash_console_putc
/
*
---------------------------------------------
*
int
plat_crash_console_flush
()
*
void
plat_crash_console_flush
()
*
Function
to
force
a
write
of
all
buffered
*
data
that
hasn
't been output.
*
Out
:
return
-
1
on
error
else
return
0
.
*
Out
:
void
.
*
Clobber
list
:
x0
,
x1
*
---------------------------------------------
*/
...
...
plat/hisilicon/poplar/aarch64/poplar_helpers.S
View file @
dfe577a8
/*
*
Copyright
(
c
)
2018
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
Copyright
(
c
)
2018
-
2020
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
*
SPDX
-
License
-
Identifier
:
BSD
-
3
-
Clause
*/
...
...
@@ -65,10 +65,10 @@ func plat_crash_console_putc
endfunc
plat_crash_console_putc
/
*
---------------------------------------------
*
int
plat_crash_console_flush
()
*
void
plat_crash_console_flush
()
*
Function
to
force
a
write
of
all
buffered
*
data
that
hasn
't been output.
*
Out
:
return
-
1
on
error
else
return
0
.
*
Out
:
void
.
*
Clobber
list
:
r0
*
---------------------------------------------
*/
...
...
plat/imx/common/imx_uart_console.S
View file @
dfe577a8
/*
*
Copyright
(
c
)
2018
-
20
19
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
Copyright
(
c
)
2018
-
20
20
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
*
SPDX
-
License
-
Identifier
:
BSD
-
3
-
Clause
*/
...
...
@@ -84,6 +84,5 @@ getc_error:
endfunc
console_imx_uart_getc
func
console_imx_uart_flush
mov
x0
,
#
0
ret
endfunc
console_imx_uart_flush
plat/imx/common/lpuart_console.S
View file @
dfe577a8
/*
*
Copyright
(
c
)
2015
-
20
19
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
Copyright
(
c
)
2015
-
20
20
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
*
SPDX
-
License
-
Identifier
:
BSD
-
3
-
Clause
*/
...
...
@@ -72,6 +72,5 @@ getc_error:
endfunc
console_lpuart_getc
func
console_lpuart_flush
mov
x0
,
#
0
ret
endfunc
console_lpuart_flush
plat/layerscape/common/aarch64/ls_console.S
View file @
dfe577a8
/*
*
Copyright
(
c
)
2018
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
Copyright
(
c
)
2018
-
2020
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
*
SPDX
-
License
-
Identifier
:
BSD
-
3
-
Clause
*/
...
...
@@ -214,11 +214,11 @@ func console_ls_16550_getc
endfunc
console_ls_16550_getc
/
*
---------------------------------------------
*
int
console_ls_16550_core_flush
(
uintptr_t
base_addr
)
*
void
console_ls_16550_core_flush
(
uintptr_t
base_addr
)
*
Function
to
force
a
write
of
all
buffered
*
data
that
hasn
't been output.
*
In
:
x0
-
console
base
address
*
Out
:
return
-
1
on
error
else
return
0
.
*
Out
:
void
*
Clobber
list
:
x0
,
x1
*
---------------------------------------------
*/
...
...
@@ -234,16 +234,15 @@ func console_ls_16550_core_flush
cmp
w1
,
#(
UARTLSR_TEMT
|
UARTLSR_THRE
)
b.ne
1
b
mov
w0
,
#
0
ret
endfunc
console_ls_16550_core_flush
/
*
---------------------------------------------
*
int
console_ls_16550_flush
(
console_t
*
console
)
*
void
console_ls_16550_flush
(
console_t
*
console
)
*
Function
to
force
a
write
of
all
buffered
*
data
that
hasn
't been output.
*
In
:
x0
-
pointer
to
console_t
structure
*
Out
:
return
-
1
on
error
else
return
0
.
*
Out
:
void
*
Clobber
list
:
x0
,
x1
*
---------------------------------------------
*/
...
...
plat/marvell/armada/common/aarch64/marvell_helpers.S
View file @
dfe577a8
/*
*
Copyright
(
c
)
2020
,
ARM
Limited
.
All
rights
reserved
.
*
Copyright
(
C
)
2018
Marvell
International
Ltd
.
*
*
SPDX
-
License
-
Identifier
:
BSD
-
3
-
Clause
...
...
@@ -90,10 +91,10 @@ func plat_crash_console_putc
endfunc
plat_crash_console_putc
/
*
---------------------------------------------
*
int
plat_crash_console_flush
()
*
void
plat_crash_console_flush
()
*
Function
to
force
a
write
of
all
buffered
*
data
that
hasn
't been output.
*
Out
:
return
-
1
on
error
else
return
0
.
*
Out
:
void
.
*
Clobber
list
:
r0
*
---------------------------------------------
*/
...
...
plat/marvell/armada/common/marvell_console.c
View file @
dfe577a8
/*
* Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2018
-2020
, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
...
...
@@ -49,7 +49,7 @@ void marvell_console_boot_init(void)
void
marvell_console_boot_end
(
void
)
{
(
void
)
console_flush
();
console_flush
();
(
void
)
console_unregister
(
&
marvell_boot_console
);
}
...
...
@@ -70,7 +70,7 @@ void marvell_console_runtime_init(void)
void
marvell_console_runtime_end
(
void
)
{
(
void
)
console_flush
();
console_flush
();
(
void
)
console_unregister
(
&
marvell_runtime_console
);
}
plat/mediatek/common/drivers/uart/8250_console.S
View file @
dfe577a8
/*
*
Copyright
(
c
)
2015
-
20
17
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
Copyright
(
c
)
2015
-
20
20
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
*
SPDX
-
License
-
Identifier
:
BSD
-
3
-
Clause
*/
...
...
@@ -149,16 +149,15 @@ getc_error:
endfunc
console_core_getc
/
*
---------------------------------------------
*
int
console_core_flush
(
uintptr_t
base_addr
)
*
void
console_core_flush
(
uintptr_t
base_addr
)
*
Function
to
force
a
write
of
all
buffered
*
data
that
hasn
't been output.
*
In
:
x0
-
console
base
address
*
Out
:
return
-
1
on
error
else
return
0
.
*
Out
:
void
.
*
Clobber
list
:
x0
,
x1
*
---------------------------------------------
*/
func
console_core_flush
/
*
Placeholder
*/
mov
w0
,
#
0
ret
endfunc
console_core_flush
Prev
1
2
3
Next
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