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
1a3986a4
Commit
1a3986a4
authored
Feb 01, 2016
by
danh-arm
Browse files
Merge pull request #508 from soby-mathew/sm/debug_xlat
Use tf_printf() for debug logs from xlat_tables.c
parents
9f89feb9
d30ac1c3
Changes
4
Hide whitespace changes
Inline
Side-by-side
include/plat/arm/board/common/board_arm_def.h
View file @
1a3986a4
...
...
@@ -39,9 +39,7 @@
*/
/* Size of cacheable stacks */
#if DEBUG_XLAT_TABLE
# define PLATFORM_STACK_SIZE 0x800
#elif IMAGE_BL1
#if IMAGE_BL1
#if TRUSTED_BOARD_BOOT
# define PLATFORM_STACK_SIZE 0x1000
#else
...
...
lib/aarch64/xlat_tables.c
View file @
1a3986a4
...
...
@@ -33,17 +33,21 @@
#include <assert.h>
#include <bl_common.h>
#include <cassert.h>
#include <debug.h>
#include <platform_def.h>
#include <string.h>
#include <xlat_tables.h>
#ifndef DEBUG_XLAT_TABLE
#define DEBUG_XLAT_TABLE 0
#endif
#if DEBUG_XLAT_TABLE
#define debug_print(...) printf(__VA_ARGS__)
#if LOG_LEVEL >= LOG_LEVEL_VERBOSE
#define LVL0_SPACER ""
#define LVL1_SPACER " "
#define LVL2_SPACER " "
#define LVL3_SPACER " "
#define get_level_spacer(level) \
(((level) == 0) ? LVL0_SPACER : \
(((level) == 1) ? LVL1_SPACER : \
(((level) == 2) ? LVL2_SPACER : LVL3_SPACER)))
#define debug_print(...) tf_printf(__VA_ARGS__)
#else
#define debug_print(...) ((void)0)
#endif
...
...
@@ -74,12 +78,12 @@ static mmap_region_t mmap[MAX_MMAP_REGIONS + 1];
static
void
print_mmap
(
void
)
{
#if
DEBUG_XLAT_TABL
E
#if
LOG_LEVEL >= LOG_LEVEL_VERBOS
E
debug_print
(
"mmap:
\n
"
);
mmap_region_t
*
mm
=
mmap
;
while
(
mm
->
size
)
{
debug_print
(
"
%010lx %010lx %10lx %x
\n
"
,
mm
->
base_va
,
mm
->
base_pa
,
mm
->
size
,
mm
->
attr
);
debug_print
(
"
VA:0x%lx PA:0x%lx size:0x%lx attr:0x%x
\n
"
,
mm
->
base_va
,
mm
->
base_pa
,
mm
->
size
,
mm
->
attr
);
++
mm
;
};
debug_print
(
"
\n
"
);
...
...
@@ -209,8 +213,8 @@ static mmap_region_t *init_xlation_table(mmap_region_t *mm,
continue
;
}
debug_print
(
"
%010lx %8lx "
+
6
-
2
*
level
,
base_va
,
level_size
);
debug_print
(
"
%s VA:0x%lx size:0x%x "
,
get_level_spacer
(
level
)
,
base_va
,
level_size
);
if
(
mm
->
base_va
>=
base_va
+
level_size
)
{
/* Next region is after area so nothing to map yet */
...
...
plat/mediatek/mt8173/include/platform_def.h
View file @
1a3986a4
...
...
@@ -31,7 +31,6 @@
#ifndef __PLATFORM_DEF_H__
#define __PLATFORM_DEF_H__
#define DEBUG_XLAT_TABLE 0
/*******************************************************************************
* Platform binary types for linking
...
...
@@ -44,9 +43,7 @@
******************************************************************************/
/* Size of cacheable stacks */
#if DEBUG_XLAT_TABLE
#define PLATFORM_STACK_SIZE 0x800
#elif IMAGE_BL1
#if IMAGE_BL1
#define PLATFORM_STACK_SIZE 0x440
#elif IMAGE_BL2
#define PLATFORM_STACK_SIZE 0x400
...
...
plat/nvidia/tegra/include/platform_def.h
View file @
1a3986a4
...
...
@@ -40,9 +40,7 @@
******************************************************************************/
/* Size of cacheable stacks */
#if DEBUG_XLAT_TABLE
#define PLATFORM_STACK_SIZE 0x800
#elif IMAGE_BL31
#if IMAGE_BL31
#define PLATFORM_STACK_SIZE 0x400
#endif
...
...
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