* [U-Boot] commit "powerpc: Remove warm reset entry point" does not work on mpc83xx @ 2010-10-19 10:07 Joakim Tjernlund 2010-10-19 15:51 ` Peter Tyser 0 siblings, 1 reply; 9+ messages in thread From: Joakim Tjernlund @ 2010-10-19 10:07 UTC (permalink / raw) To: u-boot My board has a problem with this change. I added it manually to my tree and now it wont boot at all(only with BDI2000 connected). It seems like my board uses the warm start vector at all times. Padding with 4 nop's after the _start symbol fixes the problem. It might be due to a somewhat peculiar reset design but I cannot understand why. Does this work for everyone else using 83xx? Jocke ^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] commit "powerpc: Remove warm reset entry point" does not work on mpc83xx 2010-10-19 10:07 [U-Boot] commit "powerpc: Remove warm reset entry point" does not work on mpc83xx Joakim Tjernlund @ 2010-10-19 15:51 ` Peter Tyser 2010-10-19 17:14 ` Joakim Tjernlund 0 siblings, 1 reply; 9+ messages in thread From: Peter Tyser @ 2010-10-19 15:51 UTC (permalink / raw) To: u-boot On Tue, 2010-10-19 at 12:07 +0200, Joakim Tjernlund wrote: > My board has a problem with this change. I added it manually to my tree > and > now it wont boot at all(only with BDI2000 connected). Just to clarify, it won't boot with or without the BDI2000 connected, correct? > It seems like my board uses the warm start vector at all times. > Padding with 4 nop's after the _start symbol fixes the problem. > It might be due to a somewhat peculiar reset design but I cannot > understand > why. Does this work for everyone else using 83xx? Odd... I don't have an 83xx board to test on unfortunately. Nothing jumps out as being obviously wrong in the assembly: ===== Pre-commit (works): fe000100 <_start>: fe000100: 3a a0 00 01 li r21,1 fe000104: 60 00 00 00 nop fe000108: 48 00 00 10 b fe000118 <boot_cold> fe00010c: 00 00 00 00 .long 0x0 fe000110 <_start_warm>: fe000110: 3a a0 00 02 li r21,2 fe000114: 48 00 00 0c b fe000120 <boot_warm> fe000118 <boot_cold>: fe000118: 3c 80 ff 40 lis r4,-192 fe00011c: 60 00 00 00 nop fe000120 <boot_warm>: fe000120: 7c a0 00 a6 mfmsr r5 fe000124: 48 00 00 05 bl fe000128 <boot_warm+0x8> fe000128: 7c e8 02 a6 mflr r7 ===== Post-commit (doesn't work): fe000100 <_start>: fe000100: 3c 80 ff 40 lis r4,-192 fe000104: 60 00 00 00 nop fe000108: 7c a0 00 a6 mfmsr r5 fe00010c: 48 00 00 05 bl fe000110 <_start+0x10> fe000110: 7c e8 02 a6 mflr r7 It'll be interesting to hear if the change affects other boards in the same way. Best, Peter ^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] commit "powerpc: Remove warm reset entry point" does not work on mpc83xx 2010-10-19 15:51 ` Peter Tyser @ 2010-10-19 17:14 ` Joakim Tjernlund 2010-10-19 18:39 ` Peter Tyser 0 siblings, 1 reply; 9+ messages in thread From: Joakim Tjernlund @ 2010-10-19 17:14 UTC (permalink / raw) To: u-boot Peter Tyser <ptyser@xes-inc.com> wrote on 2010/10/19 17:51:11: > > On Tue, 2010-10-19 at 12:07 +0200, Joakim Tjernlund wrote: > > My board has a problem with this change. I added it manually to my tree > > and > > now it wont boot at all(only with BDI2000 connected). > > Just to clarify, it won't boot with or without the BDI2000 connected, > correct? It will only boot WITH the BDI2000. That is because my BDI sets the PC before execute. > > > It seems like my board uses the warm start vector at all times. > > Padding with 4 nop's after the _start symbol fixes the problem. > > It might be due to a somewhat peculiar reset design but I cannot > > understand > > why. Does this work for everyone else using 83xx? > > Odd... I don't have an 83xx board to test on unfortunately. Nothing > jumps out as being obviously wrong in the assembly: The difference is that I suspect execution starts at 0xXXXXXX110 rather than 0xXXXXXX100. BTW, I have my reset vector at 0x0 What causes a warm reset? Jocke ^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] commit "powerpc: Remove warm reset entry point" does not work on mpc83xx 2010-10-19 17:14 ` Joakim Tjernlund @ 2010-10-19 18:39 ` Peter Tyser 2010-10-19 19:24 ` Joakim Tjernlund 0 siblings, 1 reply; 9+ messages in thread From: Peter Tyser @ 2010-10-19 18:39 UTC (permalink / raw) To: u-boot > > > It seems like my board uses the warm start vector at all times. > > > Padding with 4 nop's after the _start symbol fixes the problem. > > > It might be due to a somewhat peculiar reset design but I cannot > > > understand > > > why. Does this work for everyone else using 83xx? > > > > Odd... I don't have an 83xx board to test on unfortunately. Nothing > > jumps out as being obviously wrong in the assembly: > > The difference is that I suspect execution starts at 0xXXXXXX110 rather > than 0xXXXXXX100. BTW, I have my reset vector at 0x0 > > What causes a warm reset? My understanding is that a warm reset on the 8xxx CPUs isn't really a hardware reset - its just when code explicitly jumps to the warm reset entry point. For example, this board used to jump to _start_warm when "reset" was ran in U-Boot: http://git.denx.de/?p=u-boot.git;a=commitdiff;h=3792d7436e2bf881b6abdede5a481a62b5dedd55 During normal use I thought that the reset entry point was always 0xXXXXX100 and a warm reset would never occur. What is the power on reset process like on your board? Best, Peter ^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] commit "powerpc: Remove warm reset entry point" does not work on mpc83xx 2010-10-19 18:39 ` Peter Tyser @ 2010-10-19 19:24 ` Joakim Tjernlund 2010-10-19 20:04 ` Wolfgang Denk 0 siblings, 1 reply; 9+ messages in thread From: Joakim Tjernlund @ 2010-10-19 19:24 UTC (permalink / raw) To: u-boot Peter Tyser <ptyser@xes-inc.com> wrote on 2010/10/19 20:39:41: > > > > > It seems like my board uses the warm start vector at all times. > > > > Padding with 4 nop's after the _start symbol fixes the problem. > > > > It might be due to a somewhat peculiar reset design but I cannot > > > > understand > > > > why. Does this work for everyone else using 83xx? > > > > > > Odd... I don't have an 83xx board to test on unfortunately. Nothing > > > jumps out as being obviously wrong in the assembly: > > > > The difference is that I suspect execution starts at 0xXXXXXX110 rather > > than 0xXXXXXX100. BTW, I have my reset vector at 0x0 > > > > What causes a warm reset? > > My understanding is that a warm reset on the 8xxx CPUs isn't really a > hardware reset - its just when code explicitly jumps to the warm reset > entry point. For example, this board used to jump to _start_warm when > "reset" was ran in U-Boot: > http://git.denx.de/?p=u-boot.git;a=commitdiff;h=3792d7436e2bf881b6abdede5a481a62b5dedd55 > > During normal use I thought that the reset entry point was always > 0xXXXXX100 and a warm reset would never occur. I am not so sure about this. Perhaps the Freescale guys can set us straight? > > What is the power on reset process like on your board? A bit fuzzy ATM, will have to look at that. ^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] commit "powerpc: Remove warm reset entry point" does not work on mpc83xx 2010-10-19 19:24 ` Joakim Tjernlund @ 2010-10-19 20:04 ` Wolfgang Denk 2010-10-19 21:06 ` Joakim Tjernlund 0 siblings, 1 reply; 9+ messages in thread From: Wolfgang Denk @ 2010-10-19 20:04 UTC (permalink / raw) To: u-boot Dear Joakim Tjernlund, In message <OFBC383CCF.86B567D6-ONC12577C1.006A80D5-C12577C1.006AA773@transmode.se> you wrote: > > > During normal use I thought that the reset entry point was always > > 0xXXXXX100 and a warm reset would never occur. > > I am not so sure about this. Perhaps the Freescale guys can set us > straight? Originally U-Boot (well, PPCBoot, to be more precise) had this notion of a "warm start", but I quickly learned that this makes little sense in a boot loader. When we execute the "reset" command,. we usually want to _really_ reset the system into operational mode, including not only the CPU itself but also co-processors (which might be running some form of microcode or DMA), external controllers (to stop them from doing DMA or other data transfers), NOR flash (to make sure it is in read mode so we can execute code from it), etc. Whenever this was not possible (usually due to hardware design "features") this almost always was experienced as a "bug in U-Boot" because there were situations where the board could only be reset through full power cycle. My recommendation is: stop thinking of "warm boot"; either perform a "reset" (and that be a real, hard reset of the CPU core and all peripherals), or just continue to run ;-) Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Wenn Du ein' weise Antwort verlangst, Mu?t Du vern?nftig fragen. -- Goethe, Invektiven ^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] commit "powerpc: Remove warm reset entry point" does not work on mpc83xx 2010-10-19 20:04 ` Wolfgang Denk @ 2010-10-19 21:06 ` Joakim Tjernlund 2010-10-19 21:13 ` Wolfgang Denk 0 siblings, 1 reply; 9+ messages in thread From: Joakim Tjernlund @ 2010-10-19 21:06 UTC (permalink / raw) To: u-boot Wolfgang Denk <wd@denx.de> wrote on 2010/10/19 22:04:17: > > Dear Joakim Tjernlund, > > In message <OFBC383CCF.86B567D6-ONC12577C1.006A80D5-C12577C1. > 006AA773 at transmode.se> you wrote: > > > > > During normal use I thought that the reset entry point was always > > > 0xXXXXX100 and a warm reset would never occur. > > > > I am not so sure about this. Perhaps the Freescale guys can set us > > straight? > > Originally U-Boot (well, PPCBoot, to be more precise) had this notion > of a "warm start", but I quickly learned that this makes little sense > in a boot loader. When we execute the "reset" command,. we usually > want to _really_ reset the system into operational mode, including > not only the CPU itself but also co-processors (which might be running > some form of microcode or DMA), external controllers (to stop them > from doing DMA or other data transfers), NOR flash (to make sure it is > in read mode so we can execute code from it), etc. > > Whenever this was not possible (usually due to hardware design > "features") this almost always was experienced as a "bug in U-Boot" > because there were situations where the board could only be reset > through full power cycle. > > My recommendation is: stop thinking of "warm boot"; either perform a > "reset" (and that be a real, hard reset of the CPU core and all > peripherals), or just continue to run ;-) We do. Even have a HRESET button and it still doesn't work. There is one thing though: At address 0x100(and 0x110) we have a branch to where the boot is really located. This is because we have small sectors in the beginning of the flash and we want to use those as environment etc. Jocke ^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] commit "powerpc: Remove warm reset entry point" does not work on mpc83xx 2010-10-19 21:06 ` Joakim Tjernlund @ 2010-10-19 21:13 ` Wolfgang Denk 2010-10-19 21:24 ` Joakim Tjernlund 0 siblings, 1 reply; 9+ messages in thread From: Wolfgang Denk @ 2010-10-19 21:13 UTC (permalink / raw) To: u-boot Dear Joakim Tjernlund, In message <OF7EBFC833.2F0E9C3D-ONC12577C1.00737E7A-C12577C1.0073EC18@transmode.se> you wrote: > > There is one thing though: At address 0x100(and 0x110) we have a > branch to where the boot is really located. This is because > we have small sectors in the beginning of the flash and we want to > use those as environment etc. Why don't you use the rest of this sector for code? All you need to do is adapt the linker script a bit... Without that - where is your exception handler code? This is supposed to be there, too... Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de The management question ... is not _whether_ to build a pilot system and throw it away. You _will_ do that. The only question is whether to plan in advance to build a throwaway, or to promise to deliver the throwaway to customers. - Fred Brooks, "The Mythical Man Month" ^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] commit "powerpc: Remove warm reset entry point" does not work on mpc83xx 2010-10-19 21:13 ` Wolfgang Denk @ 2010-10-19 21:24 ` Joakim Tjernlund 0 siblings, 0 replies; 9+ messages in thread From: Joakim Tjernlund @ 2010-10-19 21:24 UTC (permalink / raw) To: u-boot Wolfgang Denk <wd@denx.de> wrote on 2010/10/19 23:13:59: > > Dear Joakim Tjernlund, > > In message <OF7EBFC833.2F0E9C3D-ONC12577C1.00737E7A-C12577C1. > 0073EC18 at transmode.se> you wrote: > > > > There is one thing though: At address 0x100(and 0x110) we have a > > branch to where the boot is really located. This is because > > we have small sectors in the beginning of the flash and we want to > > use those as environment etc. > > Why don't you use the rest of this sector for code? All you need to do > is adapt the linker script a bit... > > Without that - where is your exception handler code? This is supposed > to be there, too... ah, this is only during the early steps. The flash gets mapped to 0xf0000000 and RAM is mapped to 0x0 ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-10-19 21:24 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-10-19 10:07 [U-Boot] commit "powerpc: Remove warm reset entry point" does not work on mpc83xx Joakim Tjernlund 2010-10-19 15:51 ` Peter Tyser 2010-10-19 17:14 ` Joakim Tjernlund 2010-10-19 18:39 ` Peter Tyser 2010-10-19 19:24 ` Joakim Tjernlund 2010-10-19 20:04 ` Wolfgang Denk 2010-10-19 21:06 ` Joakim Tjernlund 2010-10-19 21:13 ` Wolfgang Denk 2010-10-19 21:24 ` Joakim Tjernlund
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox