Skip to content

Commit 2752367

Browse files
Nicolas PitreRussell King
authored andcommitted
ARM: 7737/1: fix kernel decompressor compilation error with CONFIG_DEBUG_SEMIHOSTING
Selecting this option produces: AS arch/arm/boot/compressed/debug.o arch/arm/boot/compressed/debug.S:4:33: fatal error: mach/debug-macro.S: No such file or directory compilation terminated. make[3]: *** [arch/arm/boot/compressed/debug.o] Error 1 The semihosting support cannot be modelled into a senduart macro as it requires memory space for argument passing. So the CONFIG_DEBUG_LL_INCLUDE may not have any sensible value and the include directive should be omitted. While at it, let's add proper semihosting output support to the decompressor. Signed-off-by: Nicolas Pitre <[email protected]> Acked-by: Shawn Guo <[email protected]> Signed-off-by: Russell King <[email protected]>
1 parent d683b96 commit 2752367

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

arch/arm/boot/compressed/debug.S

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#include <linux/linkage.h>
22
#include <asm/assembler.h>
33

4+
#ifndef CONFIG_DEBUG_SEMIHOSTING
5+
46
#include CONFIG_DEBUG_LL_INCLUDE
57

68
ENTRY(putc)
@@ -10,3 +12,29 @@ ENTRY(putc)
1012
busyuart r3, r1
1113
mov pc, lr
1214
ENDPROC(putc)
15+
16+
#else
17+
18+
ENTRY(putc)
19+
adr r1, 1f
20+
ldmia r1, {r2, r3}
21+
add r2, r2, r1
22+
ldr r1, [r2, r3]
23+
strb r0, [r1]
24+
mov r0, #0x03 @ SYS_WRITEC
25+
ARM( svc #0x123456 )
26+
THUMB( svc #0xab )
27+
mov pc, lr
28+
.align 2
29+
1: .word _GLOBAL_OFFSET_TABLE_ - .
30+
.word semi_writec_buf(GOT)
31+
ENDPROC(putc)
32+
33+
.bss
34+
.global semi_writec_buf
35+
.type semi_writec_buf, %object
36+
semi_writec_buf:
37+
.space 4
38+
.size semi_writec_buf, 4
39+
40+
#endif

0 commit comments

Comments
 (0)