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
f07d3985
Commit
f07d3985
authored
Apr 12, 2017
by
davidcunado-arm
Committed by
GitHub
Apr 12, 2017
Browse files
Merge pull request #885 from antonio-nino-diaz-arm/an/console-flush
Implement console_flush()
parents
45cd814b
1e09ff93
Changes
25
Hide whitespace changes
Inline
Side-by-side
plat/arm/common/aarch32/arm_helpers.S
View file @
f07d3985
/*
/*
*
Copyright
(
c
)
2016
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
Copyright
(
c
)
2016
-
2017
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
*
*
Redistribution
and
use
in
source
and
binary
forms
,
with
or
without
*
Redistribution
and
use
in
source
and
binary
forms
,
with
or
without
*
modification
,
are
permitted
provided
that
the
following
conditions
are
met
:
*
modification
,
are
permitted
provided
that
the
following
conditions
are
met
:
...
@@ -31,9 +31,10 @@
...
@@ -31,9 +31,10 @@
#include <platform_def.h>
#include <platform_def.h>
.
weak
plat_arm_calc_core_pos
.
weak
plat_arm_calc_core_pos
.
weak
plat_crash_console_init
.
weak
plat_crash_console_putc
.
weak
plat_my_core_pos
.
weak
plat_my_core_pos
.
globl
plat_crash_console_init
.
globl
plat_crash_console_putc
.
globl
plat_crash_console_flush
/
*
-----------------------------------------------------
/
*
-----------------------------------------------------
*
unsigned
int
plat_my_core_pos
(
void
)
*
unsigned
int
plat_my_core_pos
(
void
)
...
@@ -85,3 +86,16 @@ func plat_crash_console_putc
...
@@ -85,3 +86,16 @@ func plat_crash_console_putc
ldr
r1
,
=
PLAT_ARM_CRASH_UART_BASE
ldr
r1
,
=
PLAT_ARM_CRASH_UART_BASE
b
console_core_putc
b
console_core_putc
endfunc
plat_crash_console_putc
endfunc
plat_crash_console_putc
/
*
---------------------------------------------
*
int
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
.
*
Clobber
list
:
r0
-
r1
*
---------------------------------------------
*/
func
plat_crash_console_flush
ldr
r1
,
=
PLAT_ARM_CRASH_UART_BASE
b
console_core_flush
endfunc
plat_crash_console_flush
plat/arm/common/aarch64/arm_helpers.S
View file @
f07d3985
/*
/*
*
Copyright
(
c
)
2015
-
201
6
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
Copyright
(
c
)
2015
-
201
7
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
*
*
Redistribution
and
use
in
source
and
binary
forms
,
with
or
without
*
Redistribution
and
use
in
source
and
binary
forms
,
with
or
without
*
modification
,
are
permitted
provided
that
the
following
conditions
are
met
:
*
modification
,
are
permitted
provided
that
the
following
conditions
are
met
:
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
.
weak
plat_my_core_pos
.
weak
plat_my_core_pos
.
globl
plat_crash_console_init
.
globl
plat_crash_console_init
.
globl
plat_crash_console_putc
.
globl
plat_crash_console_putc
.
globl
plat_crash_console_flush
.
globl
platform_mem_init
.
globl
platform_mem_init
...
@@ -88,6 +89,19 @@ func plat_crash_console_putc
...
@@ -88,6 +89,19 @@ func plat_crash_console_putc
b
console_core_putc
b
console_core_putc
endfunc
plat_crash_console_putc
endfunc
plat_crash_console_putc
/
*
---------------------------------------------
*
int
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
.
*
Clobber
list
:
r0
-
r1
*
---------------------------------------------
*/
func
plat_crash_console_flush
mov_imm
x1
,
PLAT_ARM_CRASH_UART_BASE
b
console_core_flush
endfunc
plat_crash_console_flush
/
*
---------------------------------------------------------------------
/
*
---------------------------------------------------------------------
*
We
don
't need to carry out any memory initialization on ARM
*
We
don
't need to carry out any memory initialization on ARM
*
platforms
.
The
Secure
RAM
is
accessible
straight
away
.
*
platforms
.
The
Secure
RAM
is
accessible
straight
away
.
...
...
plat/common/aarch32/platform_helpers.S
View file @
f07d3985
/*
/*
*
Copyright
(
c
)
2016
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
Copyright
(
c
)
2016
-
2017
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
*
*
Redistribution
and
use
in
source
and
binary
forms
,
with
or
without
*
Redistribution
and
use
in
source
and
binary
forms
,
with
or
without
*
modification
,
are
permitted
provided
that
the
following
conditions
are
met
:
*
modification
,
are
permitted
provided
that
the
following
conditions
are
met
:
...
@@ -31,11 +31,43 @@
...
@@ -31,11 +31,43 @@
#include <arch.h>
#include <arch.h>
#include <asm_macros.S>
#include <asm_macros.S>
.
weak
plat_crash_console_init
.
weak
plat_crash_console_putc
.
weak
plat_crash_console_flush
.
weak
plat_reset_handler
.
weak
plat_reset_handler
.
weak
plat_disable_acp
.
weak
plat_disable_acp
.
weak
platform_mem_init
.
weak
platform_mem_init
.
weak
plat_panic_handler
.
weak
plat_panic_handler
/
*
-----------------------------------------------------
*
Placeholder
function
which
should
be
redefined
by
*
each
platform
.
*
-----------------------------------------------------
*/
func
plat_crash_console_init
mov
r0
,
#
0
bx
lr
endfunc
plat_crash_console_init
/
*
-----------------------------------------------------
*
Placeholder
function
which
should
be
redefined
by
*
each
platform
.
*
-----------------------------------------------------
*/
func
plat_crash_console_putc
bx
lr
endfunc
plat_crash_console_putc
/
*
-----------------------------------------------------
*
Placeholder
function
which
should
be
redefined
by
*
each
platform
.
*
-----------------------------------------------------
*/
func
plat_crash_console_flush
mov
r0
,
#
0
bx
lr
endfunc
plat_crash_console_flush
/
*
-----------------------------------------------------
/
*
-----------------------------------------------------
*
Placeholder
function
which
should
be
redefined
by
*
Placeholder
function
which
should
be
redefined
by
*
each
platform
.
*
each
platform
.
...
...
plat/common/aarch64/platform_helpers.S
View file @
f07d3985
/*
/*
*
Copyright
(
c
)
2013
-
201
6
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
Copyright
(
c
)
2013
-
201
7
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
*
*
Redistribution
and
use
in
source
and
binary
forms
,
with
or
without
*
Redistribution
and
use
in
source
and
binary
forms
,
with
or
without
*
modification
,
are
permitted
provided
that
the
following
conditions
are
met
:
*
modification
,
are
permitted
provided
that
the
following
conditions
are
met
:
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
.
weak
plat_report_exception
.
weak
plat_report_exception
.
weak
plat_crash_console_init
.
weak
plat_crash_console_init
.
weak
plat_crash_console_putc
.
weak
plat_crash_console_putc
.
weak
plat_crash_console_flush
.
weak
plat_reset_handler
.
weak
plat_reset_handler
.
weak
plat_disable_acp
.
weak
plat_disable_acp
.
weak
bl1_plat_prepare_exit
.
weak
bl1_plat_prepare_exit
...
@@ -96,6 +97,15 @@ func plat_crash_console_putc
...
@@ -96,6 +97,15 @@ func plat_crash_console_putc
ret
ret
endfunc
plat_crash_console_putc
endfunc
plat_crash_console_putc
/
*
-----------------------------------------------------
*
Placeholder
function
which
should
be
redefined
by
*
each
platform
.
*
-----------------------------------------------------
*/
func
plat_crash_console_flush
ret
endfunc
plat_crash_console_flush
/
*
-----------------------------------------------------
/
*
-----------------------------------------------------
*
Placeholder
function
which
should
be
redefined
by
*
Placeholder
function
which
should
be
redefined
by
*
each
platform
.
This
function
should
preserve
x19
-
x29
.
*
each
platform
.
This
function
should
preserve
x19
-
x29
.
...
...
plat/mediatek/common/drivers/uart/8250_console.S
View file @
f07d3985
/*
/*
*
Copyright
(
c
)
2015
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
Copyright
(
c
)
2015
-
2017
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
*
*
Redistribution
and
use
in
source
and
binary
forms
,
with
or
without
*
Redistribution
and
use
in
source
and
binary
forms
,
with
or
without
*
modification
,
are
permitted
provided
that
the
following
conditions
are
met
:
*
modification
,
are
permitted
provided
that
the
following
conditions
are
met
:
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
.
globl
console_core_init
.
globl
console_core_init
.
globl
console_core_putc
.
globl
console_core_putc
.
globl
console_core_getc
.
globl
console_core_getc
.
globl
console_core_flush
/
*
-----------------------------------------------
/
*
-----------------------------------------------
*
int
console_core_init
(
unsigned
long
base_addr
,
*
int
console_core_init
(
unsigned
long
base_addr
,
...
@@ -170,3 +171,18 @@ getc_error:
...
@@ -170,3 +171,18 @@ getc_error:
mov
w0
,
#-
1
mov
w0
,
#-
1
ret
ret
endfunc
console_core_getc
endfunc
console_core_getc
/
*
---------------------------------------------
*
int
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
.
*
Clobber
list
:
x0
,
x1
*
---------------------------------------------
*/
func
console_core_flush
/
*
Placeholder
*/
mov
w0
,
#
0
ret
endfunc
console_core_flush
Prev
1
2
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