narmstrong changed the topic of #linux-amlogic to: Amlogic mainline kernel development discussion - our wiki http://linux-meson.com/ - ml linux-amlogic@lists.infradead.org - official channel moved from Freenode - publicly logged on https://libera.irclog.whitequark.org/linux-amlogic
steev has quit [*.net *.split]
dliviu has quit [*.net *.split]
steev has joined #linux-amlogic
dliviu has joined #linux-amlogic
jacobk has quit [Ping timeout: 260 seconds]
camus has joined #linux-amlogic
BlueMatt has quit [Ping timeout: 258 seconds]
vagrantc has quit [Quit: leaving]
BlueMatt has joined #linux-amlogic
jacobk has joined #linux-amlogic
jacobk has quit [Ping timeout: 260 seconds]
buzzmarshall has quit [Quit: Konversation terminated!]
jacobk has joined #linux-amlogic
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 246 seconds]
f_ has joined #linux-amlogic
luka177 has joined #linux-amlogic
luka177 has quit [Read error: Connection reset by peer]
luka177 has joined #linux-amlogic
<f_> Let's see what I forgot to init.
<f_> That's it. I'm parsing all header files found in their old sources
luka177 has quit [Read error: Connection reset by peer]
luka177 has joined #linux-amlogic
<f_> narmstrong: If I understood correctly, Amlogic burning tool loads a BL2, right?
<f_> BL1 waits for something to be sent via USB, the tool sends a BL2, which then detects if it was sent from USB and then enables a special BL2 "USB mode".
<f_> What does it print in the UART logs?
<f_> It most likely prints:
<f_> BL2 Built : date
<f_> gxb <commit>
<f_> BL2 USB
<f_> but what about the rest?
<f_> Actually I could try myself.
<f_> Looks confusingly named..running xxd on it seems to reveal there's only BL2
<f_> https://linux-meson.com/u-boot.html BTW is "2024" a typo?
<f_> Either way getting mainline TF-A BL2 on gxbb will require more reverse-engineering.
Daaanct12 has quit [Remote host closed the connection]
Danct12 has joined #linux-amlogic
luka177 has quit [Ping timeout: 260 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 246 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 260 seconds]
luka177 has joined #linux-amlogic
<narmstrong> f_: yes it sends the bl2 then waits for bl2 to boot then the tool send the rest in memory after ddr has been initialized
<f_> Sure.
<narmstrong> Oops indeed the 2024 is a typo
<f_> (I renamed it to bl2_usb_handler locally)
<f_> Honestly I should try getting pyamlboot to run on my KII Pro
<f_> narmstrong: Glad to know my patches will land in v2023.10 though! =)
<narmstrong> The new protocol implemented on G12 is must cleaner, it basically « requests » the fip elements
<f_> It requests the fip
<f_> So you basically make one and send it via USB
<narmstrong> And no need to send a special bl2, you send the bl2 in the boot package
<f_> All that is implemented in BL1 I guess
<f_> I should really make a dump of gxbb BL1 to then look at it in ghidra..just curious ;)
<narmstrong> Yep, the first part is
<f_> You then send an fip and it runs BL2 which does the rest
<narmstrong> The first part ingests the bl2 and the fip table
<f_> Isn't BL2 in the fip?
<f_> About BL1: is it covered by Amlogic's proprietary license or is it no licensed?
<f_> *not
narmstrong has quit [Server closed connection]
narmstrong has joined #linux-amlogic
<f_> wb
<f_> Did you receive my messages?
<f_> Let's go from reversing BL2 to reversing BL1 & BL2!!
camus has quit [Ping timeout: 240 seconds]
<f_> So BL1 does have a watchdog!
<f_> I see references to a watchdog in their old sources
<f_> git branch: master, thelinuxmacbook:amlogic-bl2 » git grep watchdog_disable
<f_> <...>
<f_> plat/gxb/watchdog.c:void watchdog_disable(void)
<f_> Wow.
<f_> Makes me remember about Intel's watchdog of 30 minutes if the CPU can't load the proprietary Intel ME firmware..
<f_> But except here, it's less than 2 minutes.
<f_> I think we do have a way of disabling it. I'll have to try.
<f_> Crazy though
<f_> Yay!
<f_> I disabled the watchdog!
<f_> So there was indeed a watchdog
<f_> Nice try Amlogic :P
<f_> Now it doesn't reset anymore
<f_> I can keep watching logs going crazy forever now :P
<f_> Awesome.
<f_> Really thought Amlogic SoCs didn't have a watchdog unlike intel CPUs..well
<f_> There's nothing better than a single line to say bye bye to watchdogs!
<f_> mmio_write_32(0xc11098d0, mmio_read_32(0xc11098d0) & 0xfdfbffff);
<f_> ^ this disables the watchdog
<f_> I'll put this somewhere and push
f_[xmpp] has joined #linux-amlogic
luka177 has quit [Read error: Connection reset by peer]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 250 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 260 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 246 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 264 seconds]
luka177 has joined #linux-amlogic
<f_> https://git.vitali64.duckdns.org/misc/trustedfirmware-a.git/commit/?h=wip/gxbb&id=a0c265e485bb413bd9e3f45e923a9cfa473d26b2
<f_> This disables the BL1 watchdog entirely.
<f_> I think the BL1 watchdog was intended for waiting for USB
<f_> no idea
jacobk has quit [Ping timeout: 252 seconds]
luka177 has quit [Ping timeout: 240 seconds]
luka177 has joined #linux-amlogic
jacobk has joined #linux-amlogic
luka177 has quit [Ping timeout: 260 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Read error: Connection reset by peer]
luka177 has joined #linux-amlogic
f_ has quit [Quit: zzz]
luka177 has quit [Read error: Connection reset by peer]
luka177 has joined #linux-amlogic
vagrantc has joined #linux-amlogic
luka177 has quit [Ping timeout: 250 seconds]