Skip to content
Snippets Groups Projects
Commit e8e35efc authored by Mike Frysinger's avatar Mike Frysinger
Browse files

Blackfin: serial: move early debug strings into .rodata section


Rewrite the assembly serial_early_puts() helper to place the strings
in the .rodata section rather than embedding them directly in the
.text section.  Using .text is a little simpler, but it doesn't let
people execute out of internal L1 sram (since core reads don't work
on those regions).

Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
parent fd48d591
No related branches found
No related tags found
No related merge requests found
...@@ -288,16 +288,16 @@ static inline void serial_early_puts(const char *s) ...@@ -288,16 +288,16 @@ static inline void serial_early_puts(const char *s)
*/ */
#ifdef CONFIG_DEBUG_EARLY_SERIAL #ifdef CONFIG_DEBUG_EARLY_SERIAL
# define serial_early_puts(str) \ # define serial_early_puts(str) \
call _get_pc; \ .section .rodata; \
jump 1f; \ 7: \
.ascii "Early:"; \ .ascii "Early:"; \
.ascii __FILE__; \ .ascii __FILE__; \
.ascii ": "; \ .ascii ": "; \
.ascii str; \ .ascii str; \
.asciz "\n"; \ .asciz "\n"; \
.align 4; \ .previous; \
1: \ R0.L = 7b; \
R0 += 2; \ R0.H = 7b; \
call _serial_puts; call _serial_puts;
#else #else
# define serial_early_puts(str) # define serial_early_puts(str)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment