<mmind00>
qschulz: currious question, what happens when you reboot in TPL on such DDR init failures? ... trying to find out if the issue persists (= controller config thing) or does it go away (= some timing thing)
<qschulz>
mmind00: wdym?
<qschulz>
it's stuck
<qschulz>
so not sure how I would be able to reboot?
<mmind00>
qschulz: ah, so it is fully stuck
<mmind00>
qschulz: was remembering from last week there being some ddr-init-fail message ... so was somehow assuming the TPL was still running somewhat
<helene>
Kwiboo: possible... though I'm using this headless, so... (maybe I have something to turn off?)
<helene>
i'm not getting any warnings from rockchip-drm in my dmesg (in fact, rockchip-drm complains that it can't find an available VOP)
<helene>
i have two nvme SSDs that each use 32MiB of host memory, but i feel like memory should still be plentiful under the 4GiB boundary...
<qschulz>
Kwiboo: i would see that maskrom/hang thingy more of a debug thing especially since it doesn't "fix" anything
<Kwiboo>
when I played around I ended up limiting ram to ~4gb with `mem=3838M` at cmdline to work around my issue :-D, not ideal
<qschulz>
Kwiboo: for context, I have a misbehaving RK3399 Puma that sometimes fails DRAM init
<qschulz>
we have a PMIC reset line that we toggle when rebooting
<qschulz>
but only in SPL, so after the TPL has failed to init the DRAM
<qschulz>
so I thought I should just move that code before the DRAM init, but it still fails
<qschulz>
and now I figured that my specific error is calling while(1); in the sdram driver
<qschulz>
and if we were to use panic() instead, the board would reboot on its own
<qschulz>
which is IMO better than just getting stuck forever
<helene>
Kwiboo: i'm looking a bit closer now and it's quite suspicious; I have 8GiB of RAM total on the board (CM3588), u-boot detects 8GiB, Linux only has 5.5GiB total recognised
<qschulz>
Kwiboo: what's the U-Boot veorsion you're using?
<helene>
welp, removing the swiotlb kernel parameter restored my memory, so it was taken by the kernel... but it still complained about a full buffer with so much ram given to it!
<qschulz>
Kwiboo: interesting, because we have capacity detection issues on our PX30, sometimes it shows 1.5GiB sometimes 2GiB
<qschulz>
but I don't think we actually got any capacity issue on RK3399, only that sometimes the DRAM init fails
<qschulz>
mmind00: swapped while(1) with panic() in the SDRAM driver and it seems to be happy
<qschulz>
got one fail but it recovered nicely
ldevulder has quit [Quit: Leaving]
<mmind00>
qschulz: so, some timing thing?
* qschulz
shrugs
<qschulz>
but I assume
rah has joined #linux-rockchip
<qschulz>
since this is after I toggle the hard reset of the PMIC
<rah>
I have a Firefly ROC-3399-PC Plus board which displays nothing at all over the serial port if I boot without an SD card inserted. Apparently the board has eMMC flash which I presume is empty. (How) can I prepare and flash an image to the eMMC without using proprietary tools noted by the Firefly wiki? https://wiki.t-firefly.com/en/ROC-RK3399-PC-PLUS/loader_mode.html
warpme has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<qschulz>
rah: you can use rkdeveloptool for that (or rockusb from Collabora)
<qschulz>
you need to upload the USB loader first (db for rkdeveloptool, download-boot for rockusb)
<qschulz>
then you can flash with wl 0 (if you want to flash at offset 0) for rkdeveloptool or write-image for rockusb
<qschulz>
Kwiboo: let's see if it fixes anything on my RK3399 (I doubt, but I really should test that on PX30, but it was really difficult to reproduce :/)
<Kwiboo>
hehe, I can imagine that being a difficult issue to reproduce, I mostly just noticed lots of ddr init blobs being updated with a similar change entry in release notes and then that commit when peeking that latest push
<Kwiboo>
yeah for secureboot, signing seem to work and generate similar result as other tools, but no idea if I want to take it any further
<qschulz>
why not?
<Kwiboo>
hehe, working with certificates and private keys was anoying, possible I also took some shortcuts and used deprecated openssl functions, so cleanup is needed and docs on how to use etc, alos I already have lots of other areas I want/should focus my time on :-)
<qschulz>
Kwiboo: some sort of docs would be very nice, and then someone can take this over if desired :)
<qschulz>
could post as an RFC and saying you don't plan on continuing for now but putting out there if anyone wants to have a shot at it
<qschulz>
(but thanks for the link, at least it's out there :) )
<Kwiboo>
having signing of FIT does not seem that useful without also having a signed TPL+SPL, else current sha256 checksum provide similar good enough validation in my mind, but I may be missing something
<qschulz>
Kwiboo: I agree, your root of trust is as weak as any element in it
<qschulz>
so being to replace the bootloader...
<qschulz>
being able*
psydroid has quit [Read error: Connection reset by peer]