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
7b4838e4
Commit
7b4838e4
authored
Apr 14, 2016
by
danh-arm
Browse files
Merge pull request #549 from ljerry/tf_issue_373
Allow to dump platform-defined regs in crash log
parents
df03c6ed
9ff67fa6
Changes
10
Show whitespace changes
Inline
Side-by-side
bl31/aarch64/crash_reporting.S
View file @
7b4838e4
...
@@ -346,11 +346,8 @@ func do_crash_reporting
...
@@ -346,11 +346,8 @@ func do_crash_reporting
bl
do_cpu_reg_dump
bl
do_cpu_reg_dump
bl
str_in_crash_buf_print
bl
str_in_crash_buf_print
/
*
Print
the
gic
registers
*/
/
*
Print
some
platform
registers
*/
plat_print_gic_regs
plat_crash_print_regs
/
*
Print
the
interconnect
registers
*/
plat_print_interconnect_regs
/
*
Done
reporting
*/
/
*
Done
reporting
*/
bl
plat_panic_handler
bl
plat_panic_handler
...
...
docs/porting-guide.md
View file @
7b4838e4
...
@@ -489,20 +489,15 @@ Each platform must ensure a file of this name is in the system include path with
...
@@ -489,20 +489,15 @@ Each platform must ensure a file of this name is in the system include path with
the following macro defined. In the ARM development platforms, this file is
the following macro defined. In the ARM development platforms, this file is
found in
`plat/arm/board/<plat_name>/include/plat_macros.S`
.
found in
`plat/arm/board/<plat_name>/include/plat_macros.S`
.
*
**Macro : plat_print_
gic_
regs**
*
**Macro : plat_
crash_
print_regs**
This macro allows the crash reporting routine to print GIC registers
This macro allows the crash reporting routine to print relevant platform
in case of an unhandled exception in BL31. This aids in debugging and
this macro can be defined to be empty in case GIC register reporting is
not desired.
*
**Macro : plat_print_interconnect_regs**
This macro allows the crash reporting routine to print interconnect
registers in case of an unhandled exception in BL31. This aids in debugging
registers in case of an unhandled exception in BL31. This aids in debugging
and this macro can be defined to be empty in case interconnect register
and this macro can be defined to be empty in case register reporting is not
reporting is not desired. In ARM standard platforms, the CCI snoop
desired.
control registers are reported.
For instance, GIC or interconnect registers may be helpful for
troubleshooting.
2.2 Handling Reset
2.2 Handling Reset
...
...
include/plat/arm/common/aarch64/cci_macros.S
View file @
7b4838e4
...
@@ -44,7 +44,7 @@ cci_iface_regs:
...
@@ -44,7 +44,7 @@ cci_iface_regs:
*
Clobbers
:
x0
-
x9
,
sp
*
Clobbers
:
x0
-
x9
,
sp
*
------------------------------------------------
*
------------------------------------------------
*/
*/
.
macro
p
lat_print_interconnect
_regs
.
macro
p
rint_cci
_regs
adr
x6
,
cci_iface_regs
adr
x6
,
cci_iface_regs
/
*
Store
in
x7
the
base
address
of
the
first
interface
*/
/
*
Store
in
x7
the
base
address
of
the
first
interface
*/
mov_imm
x7
,
(
PLAT_ARM_CCI_BASE
+
SLAVE_IFACE_OFFSET
(
\
mov_imm
x7
,
(
PLAT_ARM_CCI_BASE
+
SLAVE_IFACE_OFFSET
(
\
...
...
include/plat/arm/css/common/aarch64/css_macros.S
View file @
7b4838e4
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
*
Clobbers
:
x0
-
x10
,
x16
,
x17
,
sp
*
Clobbers
:
x0
-
x10
,
x16
,
x17
,
sp
*
---------------------------------------------
*
---------------------------------------------
*/
*/
.
macro
plat
_print_gic_regs
.
macro
css
_print_gic_regs
mov_imm
x16
,
PLAT_ARM_GICD_BASE
mov_imm
x16
,
PLAT_ARM_GICD_BASE
mov_imm
x17
,
PLAT_ARM_GICC_BASE
mov_imm
x17
,
PLAT_ARM_GICC_BASE
arm_print_gic_regs
arm_print_gic_regs
...
...
plat/arm/board/fvp/include/plat_macros.S
View file @
7b4838e4
...
@@ -37,12 +37,13 @@
...
@@ -37,12 +37,13 @@
/
*
---------------------------------------------
/
*
---------------------------------------------
*
The
below
required
platform
porting
macro
*
The
below
required
platform
porting
macro
*
prints
out
relevant
GIC
registers
whenever
an
*
prints
out
relevant
GIC
and
CCI
registers
*
unhandled
exception
is
taken
in
BL31
.
*
whenever
an
unhandled
exception
is
taken
in
*
BL31
.
*
Clobbers
:
x0
-
x10
,
x16
,
x17
,
sp
*
Clobbers
:
x0
-
x10
,
x16
,
x17
,
sp
*
---------------------------------------------
*
---------------------------------------------
*/
*/
.
macro
plat_print_
gic_
regs
.
macro
plat_
crash_
print_regs
/
*
/
*
*
Detect
if
we
're using the base memory map or
*
Detect
if
we
're using the base memory map or
*
the
legacy
VE
memory
map
*
the
legacy
VE
memory
map
...
@@ -63,6 +64,7 @@ use_ve_mmap:
...
@@ -63,6 +64,7 @@ use_ve_mmap:
mov_imm
x16
,
VE_GICD_BASE
mov_imm
x16
,
VE_GICD_BASE
print_gic_regs
:
print_gic_regs
:
arm_print_gic_regs
arm_print_gic_regs
print_cci_regs
.
endm
.
endm
#endif /* __PLAT_MACROS_S__ */
#endif /* __PLAT_MACROS_S__ */
plat/arm/board/juno/include/plat_macros.S
View file @
7b4838e4
...
@@ -33,10 +33,16 @@
...
@@ -33,10 +33,16 @@
#include <cci_macros.S>
#include <cci_macros.S>
#include <css_macros.S>
#include <css_macros.S>
/*
/
*
---------------------------------------------
*
Required
platform
porting
macros
*
The
below
required
platform
porting
macro
*
(
Provided
by
included
headers
)
*
prints
out
relevant
platform
registers
*
whenever
an
unhandled
exception
is
taken
in
*
BL31
.
*
---------------------------------------------
*/
*/
.
macro
plat_crash_print_regs
css_print_gic_regs
print_cci_regs
.
endm
#endif /* __PLAT_MACROS_S__ */
#endif /* __PLAT_MACROS_S__ */
plat/mediatek/mt8173/include/plat_macros.S
View file @
7b4838e4
...
@@ -43,14 +43,18 @@ newline:
...
@@ -43,14 +43,18 @@ newline:
spacer
:
spacer
:
.
asciz
":\t\t0x"
.
asciz
":\t\t0x"
.
section
.
rodata.
cci_reg_name
,
"aS"
cci_iface_regs
:
.
asciz
"cci_snoop_ctrl_cluster0"
,
"cci_snoop_ctrl_cluster1"
,
""
/
*
---------------------------------------------
/
*
---------------------------------------------
*
The
below
macro
prints
out
relevant
GIC
*
The
below
macro
prints
out
relevant
GIC
and
*
registers
whenever
an
unhandled
exception
is
*
CCI
registers
whenever
an
unhandled
exception
*
taken
in
BL3
-
1
.
*
is
taken
in
BL3
-
1
.
*
Clobbers
:
x0
-
x10
,
x16
,
x17
,
sp
*
Clobbers
:
x0
-
x10
,
x16
,
x17
,
sp
*
---------------------------------------------
*
---------------------------------------------
*/
*/
.
macro
plat_print_
gic_
regs
.
macro
plat_
crash_
print_regs
mov_imm
x16
,
BASE_GICD_BASE
mov_imm
x16
,
BASE_GICD_BASE
mov_imm
x17
,
BASE_GICC_BASE
mov_imm
x17
,
BASE_GICC_BASE
/
*
Load
the
gicc
reg
list
to
x6
*/
/
*
Load
the
gicc
reg
list
to
x6
*/
...
@@ -82,20 +86,7 @@ gicd_ispendr_loop:
...
@@ -82,20 +86,7 @@ gicd_ispendr_loop:
bl
asm_print_str
bl
asm_print_str
b
gicd_ispendr_loop
b
gicd_ispendr_loop
exit_print_gic_regs
:
exit_print_gic_regs
:
.
endm
.
section
.
rodata.
cci_reg_name
,
"aS"
cci_iface_regs
:
.
asciz
"cci_snoop_ctrl_cluster0"
,
"cci_snoop_ctrl_cluster1"
,
""
/
*
------------------------------------------------
*
The
below
macro
prints
out
relevant
interconnect
*
registers
whenever
an
unhandled
exception
is
*
taken
in
BL3
-
1
.
*
Clobbers
:
x0
-
x9
,
sp
*
------------------------------------------------
*/
.
macro
plat_print_interconnect_regs
adr
x6
,
cci_iface_regs
adr
x6
,
cci_iface_regs
/
*
Store
in
x7
the
base
address
of
the
first
interface
*/
/
*
Store
in
x7
the
base
address
of
the
first
interface
*/
mov_imm
x7
,
(
PLAT_MT_CCI_BASE
+
SLAVE_IFACE_OFFSET
(
\
mov_imm
x7
,
(
PLAT_MT_CCI_BASE
+
SLAVE_IFACE_OFFSET
(
\
...
...
plat/nvidia/tegra/include/plat_macros.S
View file @
7b4838e4
...
@@ -50,7 +50,7 @@ spacer:
...
@@ -50,7 +50,7 @@ spacer:
*
taken
in
BL31
.
*
taken
in
BL31
.
*
---------------------------------------------
*
---------------------------------------------
*/
*/
.
macro
plat_print_
gic_
regs
.
macro
plat_
crash_
print_regs
mov_imm
x16
,
TEGRA_GICC_BASE
mov_imm
x16
,
TEGRA_GICC_BASE
cbz
x16
,
1
f
cbz
x16
,
1
f
/
*
gicc
base
address
is
now
in
x16
*/
/
*
gicc
base
address
is
now
in
x16
*/
...
@@ -81,14 +81,4 @@ spacer:
...
@@ -81,14 +81,4 @@ spacer:
1
:
1
:
.
endm
.
endm
/*
------------------------------------------------
*
The
below
required
platform
porting
macro
prints
*
out
relevant
interconnect
registers
whenever
an
*
unhandled
exception
is
taken
in
BL3
-
1
.
*
------------------------------------------------
*/
.
macro
plat_print_interconnect_regs
nop
.
endm
#endif /* __PLAT_MACROS_S__ */
#endif /* __PLAT_MACROS_S__ */
plat/rockchip/common/include/plat_macros.S
View file @
7b4838e4
...
@@ -54,15 +54,19 @@ newline:
...
@@ -54,15 +54,19 @@ newline:
spacer
:
spacer
:
.
asciz
":\t\t0x"
.
asciz
":\t\t0x"
.
section
.
rodata.
cci_reg_name
,
"aS"
cci_iface_regs
:
.
asciz
"cci_snoop_ctrl_cluster0"
,
"cci_snoop_ctrl_cluster1"
,
""
/
*
---------------------------------------------
/
*
---------------------------------------------
*
The
below
utility
macro
prints
out
relevant
GIC
*
The
below
utility
macro
prints
out
relevant
GIC
*
registers
whenever
an
unhandled
exception
is
*
and
CCI
registers
whenever
an
unhandled
*
taken
in
BL31
on
ARM
standard
platforms
.
*
exception
is
taken
in
BL31
.
*
Expects
:
GICD
base
in
x16
,
GICC
base
in
x17
*
Expects
:
GICD
base
in
x16
,
GICC
base
in
x17
*
Clobbers
:
x0
-
x10
,
sp
*
Clobbers
:
x0
-
x10
,
sp
*
---------------------------------------------
*
---------------------------------------------
*/
*/
.
macro
plat_print_
gic_
regs
.
macro
plat_
crash_
print_regs
mov_imm
x16
,
PLAT_RK_GICD_BASE
mov_imm
x16
,
PLAT_RK_GICD_BASE
mov_imm
x17
,
PLAT_RK_GICC_BASE
mov_imm
x17
,
PLAT_RK_GICC_BASE
...
@@ -119,20 +123,7 @@ gicd_ispendr_loop:
...
@@ -119,20 +123,7 @@ gicd_ispendr_loop:
bl
asm_print_str
bl
asm_print_str
b
gicd_ispendr_loop
b
gicd_ispendr_loop
exit_print_gic_regs
:
exit_print_gic_regs
:
.
endm
.
section
.
rodata.
cci_reg_name
,
"aS"
cci_iface_regs
:
.
asciz
"cci_snoop_ctrl_cluster0"
,
"cci_snoop_ctrl_cluster1"
,
""
/
*
------------------------------------------------
*
The
below
macro
prints
out
relevant
interconnect
*
registers
whenever
an
unhandled
exception
is
*
taken
in
BL3
-
1
.
*
Clobbers
:
x0
-
x9
,
sp
*
------------------------------------------------
*/
.
macro
plat_print_interconnect_regs
#if PLATFORM_CLUSTER_COUNT > 1
#if PLATFORM_CLUSTER_COUNT > 1
adr
x6
,
cci_iface_regs
adr
x6
,
cci_iface_regs
/
*
Store
in
x7
the
base
address
of
the
first
interface
*/
/
*
Store
in
x7
the
base
address
of
the
first
interface
*/
...
...
plat/xilinx/zynqmp/include/plat_macros.S
View file @
7b4838e4
...
@@ -36,16 +36,17 @@
...
@@ -36,16 +36,17 @@
/
*
---------------------------------------------
/
*
---------------------------------------------
*
The
below
required
platform
porting
macro
*
The
below
required
platform
porting
macro
*
prints
out
relevant
GIC
registers
whenever
an
*
prints
out
relevant
GIC
and
CCI
registers
*
unhandled
exception
is
taken
in
BL31
.
*
whenever
an
unhandled
exception
is
taken
in
*
Clobbers
:
x0
-
x10
,
x16
,
sp
*
BL31
.
*
Clobbers
:
x0
-
x10
,
x16
,
x17
,
sp
*
---------------------------------------------
*
---------------------------------------------
*/
*/
.
macro
plat_print_
gic_
regs
.
macro
plat_
crash_
print_regs
mov_imm
x17
,
BASE_GICC_BASE
mov_imm
x17
,
BASE_GICC_BASE
mov_imm
x16
,
BASE_GICD_BASE
mov_imm
x16
,
BASE_GICD_BASE
arm_print_gic_regs
arm_print_gic_regs
mov
x0
,
x1
print_cci_regs
.
endm
.
endm
#endif /* __PLAT_MACROS_S__ */
#endif /* __PLAT_MACROS_S__ */
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