* [U-Boot] A question in lowlevel_init.S @ 2011-01-22 4:18 krrish53 2011-01-22 7:25 ` Albert ARIBAUD 0 siblings, 1 reply; 8+ messages in thread From: krrish53 @ 2011-01-22 4:18 UTC (permalink / raw) To: u-boot Hello everybody, I have a question pertaining to almost every lowlevel_init.S. The code goes like /*make r0 relative the current location so that it*/ /*reads SMRDATA out of flash rather than memory*/ ldr r0,=SMRDATA ldr r1,_TEXT_BASE sub r10,r0,r1 I couldn't relate the code to comments made ahead of that(how does TEXT_BASE - addrof(SMRDATA) yield the location of SMRDATA in flash. I totally dint get it. Please enlighten me. I greatly appreciate any response. Thanks, Vamsi -- View this message in context: http://old.nabble.com/A-question-in-lowlevel_init.S-tp30734554p30734554.html Sent from the Uboot - Users mailing list archive at Nabble.com. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] A question in lowlevel_init.S 2011-01-22 4:18 [U-Boot] A question in lowlevel_init.S krrish53 @ 2011-01-22 7:25 ` Albert ARIBAUD 2011-01-22 7:39 ` Reinhard Meyer 2011-01-24 0:00 ` krrish53 0 siblings, 2 replies; 8+ messages in thread From: Albert ARIBAUD @ 2011-01-22 7:25 UTC (permalink / raw) To: u-boot Hi Vamsi, Le 22/01/2011 05:18, krrish53 a ?crit : > > Hello everybody, > I have a question pertaining to almost every lowlevel_init.S. The code goes > like > > /*make r0 relative the current location so that it*/ > /*reads SMRDATA out of flash rather than memory*/ > ldr r0,=SMRDATA > ldr r1,_TEXT_BASE > sub r10,r0,r1 > > I couldn't relate the code to comments made ahead of that(how does TEXT_BASE > - addrof(SMRDATA) yield the location of SMRDATA in flash. I totally dint get > it. Please enlighten me. I greatly appreciate any response. It would be easier if you gave the precise source code origin, filename and location of the code you're mentioning. I took the u-boot-arm current master branch, and could not exactly find any occurrence of "sub r10, r0, r1" so I looked for an appraoching sequence, and found e.g. arch/arm/cpu/arm926ejs/at91/lowlevel_init.S, line 63. Is this what you meant? /* memory control configuration */ /* this isn't very elegant, but what the heck */ ldr r0, =SMRDATA ldr r1, _MTEXT_BASE sub r0, r0, r1 add r2, r0, #80 If so, the code does not compute TEXT_BASE - SMRDATA, rather the reverse : SMRDATA - TEXT_BASE, .i.e. the relative address of SMRDATA with respect to the image start (depending on START_FROM_MEM, in Flash or physical RAM). I assume #80 is an absolute base address of the actual SMRDATA, but I'm no at91 specialist. > Thanks, > Vamsi Amicalement, -- Albert. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] A question in lowlevel_init.S 2011-01-22 7:25 ` Albert ARIBAUD @ 2011-01-22 7:39 ` Reinhard Meyer 2011-01-22 9:58 ` Eric Bénard 2011-01-24 0:00 ` krrish53 1 sibling, 1 reply; 8+ messages in thread From: Reinhard Meyer @ 2011-01-22 7:39 UTC (permalink / raw) To: u-boot Dear Albert ARIBAUD, > Hi Vamsi, > > Le 22/01/2011 05:18, krrish53 a ?crit : >> >> Hello everybody, >> I have a question pertaining to almost every lowlevel_init.S. The code goes >> like >> >> /*make r0 relative the current location so that it*/ >> /*reads SMRDATA out of flash rather than memory*/ >> ldr r0,=SMRDATA >> ldr r1,_TEXT_BASE >> sub r10,r0,r1 >> >> I couldn't relate the code to comments made ahead of that(how does TEXT_BASE >> - addrof(SMRDATA) yield the location of SMRDATA in flash. I totally dint get >> it. Please enlighten me. I greatly appreciate any response. > > It would be easier if you gave the precise source code origin, filename > and location of the code you're mentioning. I took the u-boot-arm > current master branch, and could not exactly find any occurrence of "sub > r10, r0, r1" so I looked for an appraoching sequence, and found e.g. > arch/arm/cpu/arm926ejs/at91/lowlevel_init.S, line 63. Is this what you > meant? > > /* memory control configuration */ > /* this isn't very elegant, but what the heck */ > ldr r0, =SMRDATA > ldr r1, _MTEXT_BASE > sub r0, r0, r1 > add r2, r0, #80 > > If so, the code does not compute TEXT_BASE - SMRDATA, rather the reverse > : SMRDATA - TEXT_BASE, .i.e. the relative address of SMRDATA with > respect to the image start (depending on START_FROM_MEM, in Flash or > physical RAM). I assume #80 is an absolute base address of the actual > SMRDATA, but I'm no at91 specialist. I am not aware of any AT91SAM9xxx systems right now that uses low-level init, it would only make sense for those that boot directly from NOR, without AT91BOOTSTRAP involved. Since we also have no NAND_SPL for AT91, it might well be that only AT91RM9200 systems use low level init code... To clarify, AT91BOOTSTRAP is the first code loaded by the SoC ROM into internal SRAM and therefore restricted in size to only 4k for some AT91 SoCs. This code has to init the SDRAM and load u-boot into SDRAM (hence the relocation stuff was not really needed for AT91). Best Regards, Reinhard Best Regards, Reinhard ^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] A question in lowlevel_init.S 2011-01-22 7:39 ` Reinhard Meyer @ 2011-01-22 9:58 ` Eric Bénard 2011-01-22 10:19 ` Reinhard Meyer 0 siblings, 1 reply; 8+ messages in thread From: Eric Bénard @ 2011-01-22 9:58 UTC (permalink / raw) To: u-boot Hi, On 22/01/2011 08:39, Reinhard Meyer wrote: > I am not aware of any AT91SAM9xxx systems right now that uses low-level init, it > would only make sense for those that boot directly from NOR, without > AT91BOOTSTRAP involved. cpu9260 (at91sam9260 / 9g20 based) is using low-level init as it boots from NOR and is not using at91bootstrap. Eric ^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] A question in lowlevel_init.S 2011-01-22 9:58 ` Eric Bénard @ 2011-01-22 10:19 ` Reinhard Meyer 2011-01-22 16:11 ` krrish53 2011-01-23 17:25 ` Ulf Samuelsson 0 siblings, 2 replies; 8+ messages in thread From: Reinhard Meyer @ 2011-01-22 10:19 UTC (permalink / raw) To: u-boot Dear Eric B?nard wrote: > Hi, > > On 22/01/2011 08:39, Reinhard Meyer wrote: >> I am not aware of any ADD: working >> AT91SAM9xxx systems right now that uses low-level init, it >> would only make sense for those that boot directly from NOR, without >> AT91BOOTSTRAP involved. > > cpu9260 (at91sam9260 / 9g20 based) is using low-level init as it boots from > NOR and is not using at91bootstrap. Those CPUs are broken since relocation was introduced. It would be nice to see them demonstrated working out of NOR with low level init enabled... Best Regards, Reinhard ^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] A question in lowlevel_init.S 2011-01-22 10:19 ` Reinhard Meyer @ 2011-01-22 16:11 ` krrish53 2011-01-23 17:25 ` Ulf Samuelsson 1 sibling, 0 replies; 8+ messages in thread From: krrish53 @ 2011-01-22 16:11 UTC (permalink / raw) To: u-boot Sorry for not mentioning the file name. its here uboot/arch/arm/cpu/arm920t/at91rm9200/lowlevel_init.S and also in uboot/board/samsung/smdk2410/lowlevel_init.S Thanks for all your responses so far people. Reinhard Meyer wrote: > > Dear Eric B?nard wrote: >> Hi, >> >> On 22/01/2011 08:39, Reinhard Meyer wrote: >>> I am not aware of any > ADD: working >>> AT91SAM9xxx systems right now that uses low-level init, it >>> would only make sense for those that boot directly from NOR, without >>> AT91BOOTSTRAP involved. >> >> cpu9260 (at91sam9260 / 9g20 based) is using low-level init as it boots >> from >> NOR and is not using at91bootstrap. > > Those CPUs are broken since relocation was introduced. It would be nice to > see > them demonstrated working out of NOR with low level init enabled... > > Best Regards, > Reinhard > _______________________________________________ > U-Boot mailing list > U-Boot at lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot > > -- View this message in context: http://old.nabble.com/A-question-in-lowlevel_init.S-tp30734554p30737145.html Sent from the Uboot - Users mailing list archive at Nabble.com. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] A question in lowlevel_init.S 2011-01-22 10:19 ` Reinhard Meyer 2011-01-22 16:11 ` krrish53 @ 2011-01-23 17:25 ` Ulf Samuelsson 1 sibling, 0 replies; 8+ messages in thread From: Ulf Samuelsson @ 2011-01-23 17:25 UTC (permalink / raw) To: u-boot 2011-01-22 11:19, Reinhard Meyer skrev: > Dear Eric B?nard wrote: >> Hi, >> >> On 22/01/2011 08:39, Reinhard Meyer wrote: >>> I am not aware of any > ADD: working >>> AT91SAM9xxx systems right now that uses low-level init, it >>> would only make sense for those that boot directly from NOR, without >>> AT91BOOTSTRAP involved. >> cpu9260 (at91sam9260 / 9g20 based) is using low-level init as it boots from >> NOR and is not using at91bootstrap. > Those CPUs are broken since relocation was introduced. It would be nice to see > them demonstrated working out of NOR with low level init enabled... I do not think the term "NOR" flash is correct. "NOR" refers to the technology used in the memory cell, and both "SPI Flash" and "Dataflash" are "NOR" flashes. A better term is "parallel flash". Atmel obsoleted all "parallel" flash during 2010, so don't expect any boards to contain "parallel" flash to come out in the future. Looks like boards.cfg does not even contain most at91 boards for some reason, so MAKEALL does not even try to build them Think that should be fixed. > Best Regards, > Reinhard > _______________________________________________ > U-Boot mailing list > U-Boot at lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot -- Best Regards Ulf Samuelsson ^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] A question in lowlevel_init.S 2011-01-22 7:25 ` Albert ARIBAUD 2011-01-22 7:39 ` Reinhard Meyer @ 2011-01-24 0:00 ` krrish53 1 sibling, 0 replies; 8+ messages in thread From: krrish53 @ 2011-01-24 0:00 UTC (permalink / raw) To: u-boot Hi Albert, Thanks for your response. Albert ARIBAUD wrote: > > Hi Vamsi, > Thanks for your response. Sorry for not mentioning the file name. its here > uboot/arch/arm/cpu/arm920t/at91rm9200/lowlevel_init.S and also in > uboot/board/samsung/smdk2410/lowlevel_init.S. My doubt is that as of now > no relocation happened and the code is still being executed from flash > rite, why would TEXT_BASE required in fetching the values from flash. This > really confuses me. > > Let me tell my understanding about. When the system starts u-boot.bin > resides in the flash and starts executing start.S(by figuring out the > entry point from u-boot.lds). And from u-boot.lds, the text section starts > at 0x0000000 and other sections follow it. I really dont understand here > the necessity of considering TEXT_BASE for writing SMRDATA values into > registers as there is no RAM in the picture yet. This is the I would > greatly appreciate a little detailed response. > > Thanks very much. > > Le 22/01/2011 05:18, krrish53 a ?crit : >> >> Hello everybody, >> I have a question pertaining to almost every lowlevel_init.S. The code >> goes >> like >> >> /*make r0 relative the current location so that it*/ >> /*reads SMRDATA out of flash rather than memory*/ >> ldr r0,=SMRDATA >> ldr r1,_TEXT_BASE >> sub r10,r0,r1 >> >> I couldn't relate the code to comments made ahead of that(how does >> TEXT_BASE >> - addrof(SMRDATA) yield the location of SMRDATA in flash. I totally dint >> get >> it. Please enlighten me. I greatly appreciate any response. > > It would be easier if you gave the precise source code origin, filename > and location of the code you're mentioning. I took the u-boot-arm > current master branch, and could not exactly find any occurrence of "sub > r10, r0, r1" so I looked for an appraoching sequence, and found e.g. > arch/arm/cpu/arm926ejs/at91/lowlevel_init.S, line 63. Is this what you > meant? > > /* memory control configuration */ > /* this isn't very elegant, but what the heck */ > ldr r0, =SMRDATA > ldr r1, _MTEXT_BASE > sub r0, r0, r1 > add r2, r0, #80 > > If so, the code does not compute TEXT_BASE - SMRDATA, rather the reverse > : SMRDATA - TEXT_BASE, .i.e. the relative address of SMRDATA with > respect to the image start (depending on START_FROM_MEM, in Flash or > physical RAM). I assume #80 is an absolute base address of the actual > SMRDATA, but I'm no at91 specialist. > >> Thanks, >> Vamsi > > Amicalement, > -- > Albert. > _______________________________________________ > U-Boot mailing list > U-Boot at lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot > > -- View this message in context: http://old.nabble.com/A-question-in-lowlevel_init.S-tp30734554p30744824.html Sent from the Uboot - Users mailing list archive at Nabble.com. ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-01-24 0:00 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-01-22 4:18 [U-Boot] A question in lowlevel_init.S krrish53 2011-01-22 7:25 ` Albert ARIBAUD 2011-01-22 7:39 ` Reinhard Meyer 2011-01-22 9:58 ` Eric Bénard 2011-01-22 10:19 ` Reinhard Meyer 2011-01-22 16:11 ` krrish53 2011-01-23 17:25 ` Ulf Samuelsson 2011-01-24 0:00 ` krrish53
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.