diff options
author | Oleksij Rempel <linux@rempel-privat.de> | 2019-06-24 12:00:42 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-06-27 11:05:43 +0200 |
commit | c37cc2d725a496551113f4ebb1d116823eb0dbd1 (patch) | |
tree | b3490041740c7b20c343d885eebba336aac484ef /arch/arm/cpu | |
parent | d952a0eeba373e5dd2243acae1059d888cc7f3ac (diff) | |
download | barebox-c37cc2d725a496551113f4ebb1d116823eb0dbd1.tar.gz barebox-c37cc2d725a496551113f4ebb1d116823eb0dbd1.tar.xz |
add CONFIG_PBL_BREAK option
With this option barebox will be build with breakpoint instruction
in early pbl stage.
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/cpu')
-rw-r--r-- | arch/arm/cpu/common.c | 13 | ||||
-rw-r--r-- | arch/arm/cpu/start.c | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/cpu/common.c b/arch/arm/cpu/common.c index 821cafbf26..4a2b6734db 100644 --- a/arch/arm/cpu/common.c +++ b/arch/arm/cpu/common.c @@ -46,6 +46,19 @@ void sync_caches_for_execution(void) #define R_ARM_RELATIVE 23 #define R_AARCH64_RELATIVE 1027 +void pbl_barebox_break(void) +{ + __asm__ __volatile__ ( +#ifdef CONFIG_PBL_BREAK + "bkpt #17\n" + "nop\n" +#else + "nop\n" + "nop\n" +#endif + ); +} + /* * relocate binary to the currently running address */ diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c index 1b1659b315..c97b2770c4 100644 --- a/arch/arm/cpu/start.c +++ b/arch/arm/cpu/start.c @@ -168,6 +168,8 @@ __noreturn void barebox_non_pbl_start(unsigned long membase, barrier(); + pbl_barebox_break(); + pr_debug("memory at 0x%08lx, size 0x%08lx\n", membase, memsize); arm_endmem = endmem; |