Hi Tim, 2016-04-05 0:16 GMT+09:00 Tim Chick <tim.ch...@mediatek.com>: > Hi Masahiro, > > This patch breaks the debug_uart on my MIPS board. It means printascii now > uses the stack, and my board does not have a stack when debug_uart_init is > called. debug_uart_init calls printascii if DEBUG_UART_ANNOUNCE is defined. > > The patch below fixes it, and keeps your change: >
I think the current implementation of debug_uart requires the stack, anyway. I am not sure your patch is the right approach because your solution seems dependent on your compiler behavior. I tried your patch with CONFIG_DEBUG_UART_ANNOUNCE=y, but my ARM compiler still produced debug_uart_init code with the stack. 00101004 <printascii>: 101004: e92d4038 push {r3, r4, r5, lr} 101008: e2405001 sub r5, r0, #1 10100c: ea000005 b 101028 <printascii+0x24> 101010: e354000a cmp r4, #10 101014: 1a000001 bne 101020 <printascii+0x1c> 101018: e3a0000d mov r0, #13 10101c: ebffffdf bl 100fa0 <_debug_uart_putc> 101020: e1a00004 mov r0, r4 101024: ebffffdd bl 100fa0 <_debug_uart_putc> 101028: e5f54001 ldrb r4, [r5, #1]! 10102c: e3540000 cmp r4, #0 101030: 1afffff6 bne 101010 <printascii+0xc> 101034: e8bd8038 pop {r3, r4, r5, pc} 00101038 <debug_uart_init>: 101038: e92d4008 push {r3, lr} 10103c: ebffffdf bl 100fc0 <_debug_uart_init> 101040: e59f0004 ldr r0, [pc, #4] ; 10104c <debug_uart_init+0x14> 101044: e8bd4008 pop {r3, lr} 101048: eaffffed b 101004 <printascii> 10104c: 0010a079 .word 0x0010a079 -- Best Regards Masahiro Yamada _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot