
Hi Łukasz,
Am Montag, 24. Juli 2017, 11:23:05 CEST schrieb Łukasz Majewski:
On 07/24/2017 10:59 AM, Heiko Stübner wrote:
Am Montag, 24. Juli 2017, 16:38:52 CEST schrieb Andy Yan:
Hi Philipp:
On 2017年07月21日 18:55, Dr. Philipp Tomsich wrote:
On 21 Jul 2017, at 04:33, Andy Yan andy.yan@rock-chips.com wrote:
Hi:
On 2017年07月19日 04:35, Philipp Tomsich wrote:
Here's a series that has a lot going on, but I didn't want to split it to allow everyone to understand the motivation between some of the changes to the SPL/TPL framework. The short summary of this is "enablement for DRAM init on the RK3368 with everything else that's necessary to do it using OF_PLATDATA in TPL".
Enabling the RK3368 created a few more challenges that I'd expected:
I needed different stack locations, text addresses and sizes for
TPL and SPL
the TPL stage was to use OF_PLATDATA and SPL was to use full
OF_CONTROL
- with the RK3368 TPL stage, there was a need to extend the
back-to-bootrom
support for Rockchip to AArch64
- I wanted to start folding some of the Rockchip specific SPL
support
(i.e. back-to-bootrom) back into the general SPL framework to allow using it as a general boot method
I have a confusion here: according to the README.TPL, TPL is Third Program Loader, which loaded by the SPL. So I think it should run after the SPL. But from RK3188 and RK3368 TPL implementation , they all run before SPL.Maybe it is my misunderstanding, hope to get some guidance.:-)>
I think you are right and most Rockchip boards have been using this the wrong way around.
Actually at first I also had the ordering of SPL -> TPL -> uboot for rk3188 but after discussions with Simon and Tom Rini, the opinion was that TPL stands for "tiny" program loader and should run before the full SPL.
Has something changed since:
http://www.denx.de/wiki/pub/U-Boot/MiniSummitELCE2013/tpl-presentation.pdf
I've always thought that we do have SPL -> TPL -> u-boot -> Linux
If there was a change, then:
- The TPL name is a bit misleading (considering the above
presentation/status)
- IMHO the code running before SPL (to do some _real_ early init)
should be named more descriptive like PreSPL.
I've gone back and looked up the previous discussion. It was part of a thread where we only included Tom later on to clarify spl/tpl usage, so there is no list-reference, but I guess I can just quote the part:
----------------- 8< ------------------- Am Donnerstag, 26. Januar 2017, 12:57:40 CEST schrieben Tom Rini:
On Thu, Jan 26, 2017 at 07:23:25AM -0700, Simon Glass wrote:
+Tom for question below.
Hi Heiko,
On 17 December 2016 at 15:51, Heiko Stübner heiko@sntech.de wrote:
Hi,
Am Samstag, 17. Dezember 2016, 09:57:51 schrieb Simon Glass:
I cannot see the .S code in that tree. If it is a few instructions then it is fine. But if it is a lot of code I question why it cannot be written mostly in C?
The .S was just my question to Kever how he envisioned this "preloader" being implemented. Right now all my parts are fully C-based.
Using TPL seems OK to me. But from my understanding TPL runs before SPL. So the sequence should be: TPL -> SPL -> U-Boot. This makes some sense because SPL is a more full-featured loader, and TPL is just a mini-loader to get the SPL running.
hmm, I think SPL -> TPL -> U-Boot would be the correct order :-) Based on the TPL being the "tertiary program loader" where the SPL only is the "secondary program loader" and based on the slides from 2013 in [0].>
That seems wrong to me. A secondary load loads the primary loader, which surely means that the tertiary should load the secondary, i.e.
I think it should be: 2 loads 1 (SPL loads U-Boot) 3 loads 2 which loads 1 (TPL loads SPL which loads U-Boot)
The alternative is: 2 loads 3 which loads 1
which seems really odd.
Note that PowerPC appears to use TPL->SPL->U-Boot when I last looked at it. Of course I could be wrong.
Yes, naming is hard. TPL (which is maybe better thought of as Tiny not Tertiary) loads SPL loads U-Boot.
----------------- 8< -------------------
Heiko