[U-Boot] [PATCH] i386 - resolve conflicting definitions of show_boot_progress

This patch eliminates an apparent conflict in the definition of show_boot_progress (defined in both assembler and in C) which the linker was not picking up but was causing a reset.
Signed-off-by: Graeme Russ graeme.russ@gmail.com ---
diff --git a/board/sc520_cdp/sc520_cdp_asm.S b/board/sc520_cdp/sc520_cdp_asm.S index 6ac5a5d..3a8a03f 100644 --- a/board/sc520_cdp/sc520_cdp_asm.S +++ b/board/sc520_cdp/sc520_cdp_asm.S @@ -76,8 +76,8 @@ done: movb $0x88, %al jmp *%ebp /* return to caller */
-.globl show_boot_progress -show_boot_progress: +.globl show_boot_progress_asm +show_boot_progress_asm: out %al, $0x80 xchg %al, %ah movw $0x680, %dx diff --git a/board/sc520_spunk/sc520_spunk_asm.S b/board/sc520_spunk/sc520_spunk_asm.S index 3430b6a..eda7e91 100644 --- a/board/sc520_spunk/sc520_spunk_asm.S +++ b/board/sc520_spunk/sc520_spunk_asm.S @@ -73,8 +73,8 @@ done: movl $0xfffefc32,%edx jmp *%ebp /* return to caller */
-.globl show_boot_progress -show_boot_progress: +.globl show_boot_progress_asm +show_boot_progress_asm: movl $0xfffefc32,%edx xorw $0xffff, %ax movw %ax,(%edx) diff --git a/cpu/i386/start.S b/cpu/i386/start.S index 264ac09..84888aa 100644 --- a/cpu/i386/start.S +++ b/cpu/i386/start.S @@ -55,7 +55,7 @@ early_board_init_ret: /* so we try to indicate progress */ movw $0x01, %ax movl $.progress0, %ebp - jmp show_boot_progress + jmp show_boot_progress_asm .progress0:
/* size memory */ @@ -74,7 +74,7 @@ mem_init_ret: /* indicate (lack of) progress */ movw $0x81, %ax movl $.progress0a, %ebp - jmp show_boot_progress + jmp show_boot_progress_asm .progress0a: jmp die mem_ok: @@ -82,7 +82,7 @@ mem_ok: /* indicate progress */ movw $0x02, %ax movl $.progress1, %ebp - jmp show_boot_progress + jmp show_boot_progress_asm .progress1:
/* create a stack after the bss */ @@ -104,7 +104,7 @@ no_stack: /* indicate (lack of) progress */ movw $0x82, %ax movl $.progress1a, %ebp - jmp show_boot_progress + jmp show_boot_progress_asm .progress1a: jmp die
@@ -113,7 +113,7 @@ stack_ok: /* indicate progress */ movw $0x03, %ax movl $.progress2, %ebp - jmp show_boot_progress + jmp show_boot_progress_asm .progress2:
/* copy data section to ram, size must be 4-byte aligned */ @@ -136,7 +136,7 @@ data_fail: /* indicate (lack of) progress */ movw $0x83, %ax movl $.progress2a, %ebp - jmp show_boot_progress + jmp show_boot_progress_asm .progress2a: jmp die
@@ -145,7 +145,7 @@ data_ok: /* indicate progress */ movw $0x04, %ax movl $.progress3, %ebp - jmp show_boot_progress + jmp show_boot_progress_asm .progress3:
/* clear bss section in ram, size must be 4-byte aligned */ @@ -168,7 +168,7 @@ bss_fail: /* indicate (lack of) progress */ movw $0x84, %ax movl $.progress3a, %ebp - jmp show_boot_progress + jmp show_boot_progress_asm .progress3a: jmp die
@@ -180,7 +180,7 @@ bss_ok: /* indicate progress */ movw $0x05, %ax movl $.progress4, %ebp - jmp show_boot_progress + jmp show_boot_progress_asm .progress4:
call start_i386boot /* Enter, U-boot! */ @@ -188,7 +188,7 @@ bss_ok: /* indicate (lack of) progress */ movw $0x85, %ax movl $.progress4a, %ebp - jmp show_boot_progress + jmp show_boot_progress_asm .progress4a:
die: hlt

hi,
please take a look hear
I've already send patch to fix X86
4698 F May18 To u-boot-users [PATCH 00/17] x86: Fix warning: type qualifiers ignored on function return type 4699 F May18 To u-boot-users ├─>[PATCH 01/17] example/82559_eeprom: Fix multiple warnings and errors 4700 F May18 To u-boot-users │ ├─>[PATCH 02/17] examples/eepro100_eeprom: Fix memcpy to return destination pointer 4701 F May18 To u-boot-users │ │ ├─>[PATCH 03/17] example/gitignore: update with all generated examples 4702 F May18 To u-boot-users │ │ │ ├─>[PATCH 04/17] i386: Fix global_data declaration 4703 F May18 To u-boot-users │ │ │ │ ├─>[PATCH 05/17] i386/bootm: remove unused var 4704 F May18 To u-boot-users │ │ │ │ │ ├─>[PATCH 06/17] ds1722: Fix mutliple warnings and errors and active the ssi for SC520 boards 4705 F May18 To u-boot-users │ │ │ │ │ │ ├─>[PATCH 07/17] drivers/pcmcia: add missing i82365 4706 F May18 To u-boot-users │ │ │ │ │ │ │ ├─>[PATCH 08/17] marabun_pcmcia: Move compile condition to the Makefile 4707 F May18 To u-boot-users │ │ │ │ │ │ │ │ ├─>[PATCH 09/17] pxa_pcmcia: Move compile condition to the Makefile 4708 F May18 To u-boot-users │ │ │ │ │ │ │ │ │ ├─>[PATCH 10/17] pcmcia/ti_pci1410a: Move compile condition to the Makefile 4710 F May18 To u-boot-users │ │ │ │ │ │ │ │ │ │ └─>[PATCH 11/17] Include pcmcia.h only when the drivers is used 4711 F May18 To u-boot-users │ │ │ │ │ │ │ │ │ │ ├─>[PATCH 12/17] ti_pci1410a: Fix multiple warnings and errors 4712 F May18 To u-boot-users │ │ │ │ │ │ │ │ │ │ │ ├─>[PATCH 13/17] sc520_spunk: Fix multiple warnings 4713 F May18 To u-boot-users │ │ │ │ │ │ │ │ │ │ │ │ ├─>[PATCH 14/17] sc520_spunk: Fix flash 4714 F May18 To u-boot-users │ │ │ │ │ │ │ │ │ │ │ │ │ ├─>[PATCH 15/17] sc530_spunk: add missing SOBJS entry 4715 F May18 To u-boot-users │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├─>[PATCH 16/17] i386: Fix multipple definition of __show_boot_progress 4716 F May18 To u-boot-users │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├─>[PATCH 17/17] sc520_cdp: Fix multiple warning
Best Regards, J.

Dear Jean-Christophe PLAGNIOL-VILLARD,
In message 20080915140423.GA13136@game.jcrosoft.org you wrote:
please take a look hear
I've already send patch to fix X86
4698 F May18 To u-boot-users [PATCH 00/17] x86: Fix warning: type qualifiers ignored on function return type 4699 F May18 To u-boot-users ââ>[PATCH 01/17] example/82559_eeprom: Fix multiple warnings and errors 4700 F May18 To u-boot-users â ââ>[PATCH 02/17] examples/eepro100_eeprom: Fix memcpy to return destination pointer 4701 F May18 To u-boot-users â â ââ>[PATCH 03/17] example/gitignore: update with all generated examples 4702 F May18 To u-boot-users â â â ââ>[PATCH 04/17] i386: Fix global_data declaration 4703 F May18 To u-boot-users â â â â ââ>[PATCH 05/17] i386/bootm: remove unused var 4704 F May18 To u-boot-users â â â â â ââ>[PATCH 06/17] ds1722: Fix mutliple warnings and errors and active the ssi for SC520 boards 4705 F May18 To u-boot-users â â â â â â ââ>[PATCH 07/17] drivers/pcmcia: add missing i82365 4706 F May18 To u-boot-users â â â â â â â ââ>[PATCH 08/17] marabun_pcmcia: Move compile condition to the Makefile 4707 F May18 To u-boot-users â â â â â â â â ââ>[PATCH 09/17] pxa_pcmcia: Move compile condition to the Makefile 4708 F May18 To u-boot-users â â â â â â â â â ââ>[PATCH 10/17] pcmcia/ti_pci1410a: Move compile condition to the Makefile 4710 F May18 To u-boot-users â â â â â â â â â â ââ>[PATCH 11/17] Include pcmcia.h only when the drivers is used 4711 F May18 To u-boot-users â â â â â â â â â â ââ>[PATCH 12/17] ti_pci1410a: Fix multiple warnings and errors 4712 F May18 To u-boot-users â â â â â â â â â â â ââ>[PATCH 13/17] sc520_spunk: Fix multiple warnings 4713 F May18 To u-boot-users â â â â â â â â â â â â ââ>[PATCH 14/17] sc520_spunk: Fix flash 4714 F May18 To u-boot-users â â â â â â â â â â â â â ââ>[PATCH 15/17] sc530_spunk: add missing SOBJS entry 4715 F May18 To u-boot-users â â â â â â â â â â â â â â ââ>[PATCH 16/17] i386: Fix multipple definition of __show_boot_progress 4716 F May18 To u-boot-users â â â â â â â â â â â â â â â ââ>[PATCH 17/17] sc520_cdp: Fix multiple warning
I don;t think that all these patches were actually applied to mainline?
Best regards,
Wolfgang Denk

On Tue, Sep 16, 2008 at 4:54 AM, Wolfgang Denk wd@denx.de wrote:
Dear Jean-Christophe PLAGNIOL-VILLARD,
In message 20080915140423.GA13136@game.jcrosoft.org you wrote:
please take a look hear
I've already send patch to fix X86
4698 F May18 To u-boot-users [PATCH 00/17] x86: Fix warning: type qualifiers ignored on function return type
I don;t think that all these patches were actually applied to mainline?
Best regards,
Wolfgang Denk
Wolfgang - You are correct. Several of Jean-Christophe's patches were applied and several were not. It looks like discussion on a few points of contention lost momentum and the rest of the patch set seemed to get abandoned. From what I can gather, Jean-Christophe's patches went a long way in getting the i386 build cleaned up though.
Jean-Christophe - I had already seen your patch set, which is why I raised the issue of taking on the changes myself (Aug 25 Building U-Boot 1.3.4 SC520 based custom board) thinking that there was a i386 maintainer. I have not intended to offend anyone by submitting these patches - I just wanted to get mainline U-Boot to a state where I could use it for my new board. Please accept my applogies if I have caused offence.
Regarding show_boot_progress, [PATCH 16/17] i386: Fix multipple definition of __show_boot_progress was applied but unfortunately added an unforseen side effect - The linker stopped complaining, but the ASM version of show_boot_progress was being called from C - With %bp in a totally random state, the result was that my board was resetting (this had me tearing out my hair for quite some time)
Regards,
Graeme

Dear Graeme Russ,
In message 48CE5C24.9090903@gmail.com you wrote:
This patch eliminates an apparent conflict in the definition of show_boot_progress (defined in both assembler and in C) which the linker was not picking up but was causing a reset.
Why do we need two implementations of the same function anyway?
Best regards,
Wolfgang Denk
participants (3)
-
Graeme Russ
-
Jean-Christophe PLAGNIOL-VILLARD
-
Wolfgang Denk