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 - Publicly Logged on https://irclog.whitequark.org/linux-amlogic
porfiriopaiz has joined #linux-amlogic
random_yanek has joined #linux-amlogic
porfiriopaiz has quit [Quit: leaving]
Ivanovic has quit [Quit: Disconnecting from stoned server.]
Ivanovic has joined #linux-amlogic
indy has quit [Quit: ZNC - http://znc.sourceforge.net]
indy has joined #linux-amlogic
chewitt has quit [Quit: Zzz..]
Barada has joined #linux-amlogic
chewitt has joined #linux-amlogic
_whitelogger has joined #linux-amlogic
The_CooIest has quit [Ping timeout: 252 seconds]
The_Coolest has joined #linux-amlogic
The_CooIest has joined #linux-amlogic
afaerber has quit [Quit: Leaving]
afaerber has joined #linux-amlogic
AntonioND has joined #linux-amlogic
afaerber has quit [Quit: Leaving]
ldevulder_ has joined #linux-amlogic
ldevulder has quit [Ping timeout: 252 seconds]
_whitelogger has joined #linux-amlogic
Darkmatter66 has joined #linux-amlogic
Darkmatter66 has quit [Quit: ZNC 1.7.1 - https://znc.in]
Darkmatter66 has joined #linux-amlogic
Darkmatter66 has left #linux-amlogic [#linux-amlogic]
Darkmatter66 has joined #linux-amlogic
Darkmatter66 has quit [Quit: ZNC 1.7.1 - https://znc.in]
Darkmatter66 has joined #linux-amlogic
chewitt has quit [Quit: Zzz..]
ldevulder_ is now known as ldevulder
The_Coolest has quit [Ping timeout: 252 seconds]
The_CooIest has quit [Ping timeout: 268 seconds]
chewitt has joined #linux-amlogic
Darkmatter66 has quit [Ping timeout: 244 seconds]
return0e has quit [Read error: Connection reset by peer]
Ivanovic has quit [Read error: Connection reset by peer]
return0e has joined #linux-amlogic
Ivanovic has joined #linux-amlogic
ldevulder_ has joined #linux-amlogic
ldevulder has quit [Ping timeout: 272 seconds]
ndufresne has joined #linux-amlogic
<ldevulder_> AntonioND, hi, I quickly try your bl31.bin with s905x (khadas vim board) but it doesn't work: http://paste.opensuse.org/65130312
<ldevulder_> s905 and s905x are not so close :)
<ldevulder_> package creation is not the same if we compared with ordoid-c2
Barada has quit [Quit: Barada]
<AntonioND> well, at least the panic handler works, ldevulder_ :P
<AntonioND> and the console
<AntonioND> well
<AntonioND> maybe, I don't know if that is BL1 or BL31
<AntonioND> it could be BL1
<AntonioND> are you using the branch in my repo or the PR?
<ldevulder_> AntonioND, the PR
ldevulder_ is now known as ldevulder
<AntonioND> ok, then that is a panic in bl1
<AntonioND> in the PR i've added the gic registers to the crash report handler
<AntonioND> so I guess that it just crashes. it's interesting because the first thing bl31 does is to register a new exception vector
<narmstrong> ldevulder: did you convert the bl31 to the .img format ? You can find how it done it’s the amlogic uboot source
<AntonioND> almost the first thing
<ldevulder> narmstrong, no I didnt convert it, I though it was the same
<ldevulder> AntonioND, narmstrong, so the error is here: between the chair and the keyboard!
<ldevulder> I will try again :)
<AntonioND> heh :P
<narmstrong> I think you can provide a bin, with a different arg
<narmstrong> I can search if you fail to !
<narmstrong> Yeah sees I was wrong, the .img is selected by FIP_IMG_SUPPORT
zacdev|2 has joined #linux-amlogic
<ldevulder> I will check later, I have to leave now, but I keep you in touch
<AntonioND> there is no rush, right now we are discussing internally what to do with cases such as this port that don't support cpu off in cpu0
<AntonioND> it's not great that you can crash the system by doing "echo 0 > /sys/..../cpu0/online"
<AntonioND> the firmware returns that cpu off is denied, but linux doesn't know what to do with that
zacdev|2 has quit [Quit: zacdev]
zacdev has joined #linux-amlogic
vagrantc has joined #linux-amlogic
AntonioND has quit [Quit: :wq]
afaerber has joined #linux-amlogic
zacdev has quit [Ping timeout: 252 seconds]
AntonioND has joined #linux-amlogic
afaerber has quit [Quit: Leaving]
Darkmatter66 has joined #linux-amlogic
<xdarklight> chewitt: https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git/commit/?h=next&id=c216765d3a1defda5e7e2dabd878f99f0cd2ebf2 - it seems that the patch which disables dwc2's power_down was accepted for rockchip devices. but there's nothing for our Amlogic devices yet
afaerber has joined #linux-amlogic
Darkmatter66 has quit [Quit: ZNC 1.7.1 - https://znc.in]
Darkmatter66 has joined #linux-amlogic
Darkmatter66 has quit [Quit: ZNC 1.7.1 - https://znc.in]
Darkmatter66 has joined #linux-amlogic
<AntonioND> i'm thinking about GET_REBOOT_REASON (0x82000022) and another system call (0x82000042) that affect the "reboot reason" register. does it actually make sense to keep them in there? does linux even care? I know I need the system calls that give you the shared memory and that read the efuse for uboot, but is there anything else that linux needs to work? I'd rather keep this minimal, I don't like having many
<AntonioND> firmware services
Darkmatter66 has quit [Client Quit]
<AntonioND> khilman^
Darkmatter66 has joined #linux-amlogic
Darkmatter66 has quit [Quit: ZNC 1.7.1 - https://znc.in]
Darkmatter66 has joined #linux-amlogic
Darkmatter66 has quit [Quit: ZNC 1.7.1 - https://znc.in]
Darkmatter66 has joined #linux-amlogic
The_Coolest has joined #linux-amlogic
The_Coolest has quit [Client Quit]
The_Coolest has joined #linux-amlogic
Darkmatter66 has quit [Quit: ZNC 1.7.1 - https://znc.in]
Darkmatter66 has joined #linux-amlogic
Darkmatter66 has quit [Client Quit]
trem has joined #linux-amlogic
Darkmatter66 has joined #linux-amlogic
moham_96 has joined #linux-amlogic
Darkmatter66 has quit [Client Quit]
moham_96 is now known as Darkmatter66
Darkmatter66_ has joined #linux-amlogic
trem has quit [Quit: Leaving]
<ldevulder> AntonioND, narmstrong, I simply test with keeping the bl31.bin name instead of bl31.img, as the Amlogic u-boot code do this (they provid both version, I don't know why). No boot issue with the bl31.bin from Amlogic (of course), but bl31.bin generated byt ATF is still not working
<ldevulder> but no more panic, just a freeze
<AntonioND> hmmm
<AntonioND> can you give me a link to that bl31.bin?
<ldevulder> the generated one from ATF source?
<AntonioND> no, the original one
<AntonioND> i'm going to run objdump on it
<AntonioND> just a quick test
<AntonioND> NOTICE: BL31: %s decompress %s
<AntonioND> interesting
<AntonioND> i suspect that this is simply crashing but the console address is different
<ldevulder> FYI, I used this compiler to generate the ATF bl31.bin: gcc-linaro-7.2.1-2017.11-x86_64_aarch64-elf/bin/aarch64-elf-gcc, no issue during compilation, but bl31.bin is small (36993 bytes, but as it is a first basic implementation maybe it's logical)
<AntonioND> you could give it a try: GXBB_UART0_AO_BASE set that define to the one that corresponds to that board
<AntonioND> my bl31 is really small, yes
<AntonioND> it's 50% of the original
<AntonioND> because I don't care about any of the amlogic sip services
<AntonioND> only about power management
Darkmatter66 has quit [Remote host closed the connection]
<ldevulder> AntonioND, uart address is the same for s905x: configs/khadas-vim_defconfig:CONFIG_DEBUG_UART_BASE=0xc81004c0
<AntonioND> hmmm
<AntonioND> so not even the crash console works
<AntonioND> that's weird
Darkmatter66_ has quit [Quit: ZNC 1.7.1 - https://znc.in]
<poulecaca> I also just add the first 512bytes of what is what I think only a header of the amlogic bl31.img to your bl31.bin. And same freeze here.
<poulecaca> no print
<ldevulder> generating options for u-boot image with bl* blob are not the same for s905 and s905x, maybe it's something here
<AntonioND> what kind of information is there in the header?
<poulecaca> it's mainly null bytes. But I havn't managed to guess the meaning of the non-null ones
<AntonioND> have you done the test to modify a random string in the original bl31.bin and running with that one? a string that you can see during boot, obviously
<AntonioND> i assume that this doesn't have any kind of secure boot, right?
<AntonioND> no, wait, don't bother
<AntonioND> if it didn't wokr bl2 would probably hang
<AntonioND> so yeah, that is fine
<poulecaca> yes I modified a string in bl31.bin boot it and that went ok
<poulecaca> so no secure boot at the bl3* level at least. bl2 may be signed though.
<ldevulder> AntonioND, value of the first 512 bytes: http://paste.opensuse.org/65447782
<AntonioND> 25250
<AntonioND> the memory map starts at that hex address
<AntonioND> 0x25250
<ldevulder> yes bl2 looks signed
<AntonioND> that's the mmap array with all the memory regions
<AntonioND> well, most of them
<AntonioND> there is something at 0x05200000 that isn't there in gxbb
<AntonioND> otherwise... they are quite similar
<AntonioND> i don't know what the problem is, it's hard to tell. however, the crash console should work really really early during boot of bl31
<AntonioND> 10 instructions after the entrypoint early
<AntonioND> i'm wrong
<AntonioND> 6
<AntonioND> the 6th instruction sets the vbar
<AntonioND> from that point, the crash console should work
<AntonioND> there is the possibility that my console driver is broken
<AntonioND> could you try to turn console_meson_init into an empty function?
<AntonioND> put a "mov w0,#1 \n ret" just at the start
jakogut has joined #linux-amlogic
<ldevulder> AntonioND, still freeze, like before the last thing I have on the console is from bl2: "Load bl33 from SD, src: 0x0002c200, des: 0x01000000, size: 0x0007c400"
<AntonioND> hmm so even the address is the same
<AntonioND> oh no
<AntonioND> in gxbb it's 0x10100000
<AntonioND> but that size is way bigger than bl31
<AntonioND> 500 kb
chewitt has quit [Ping timeout: 252 seconds]
<AntonioND> maybe that's what the header has
<ldevulder> AntonioND, here all the addresses:
<ldevulder> Load bl30 from SD, src: 0x00010200, des: 0x01100000, size: 0x0000d600
<ldevulder> Load bl33 from SD, src: 0x0002c200, des: 0x01000000, size: 0x0007c400
<ldevulder> Load bl31 from SD, src: 0x00020200, des: 0x05100000, size: 0x00009400
<AntonioND> the size
<AntonioND> are they using fip_create or fiptool?
<AntonioND> or something custom?
<ldevulder> AntonioND, but I tried with bl31.bin from Amlogic without issue, not bl31.img, bl31.img is bl31.bin with the header
<ldevulder> I use the tool from Amlogic: aml_encrypt_gxl
<ldevulder> it's not fip_create anymore on s905x
<AntonioND> maybe the img header is important
<AntonioND> they need to store the size somewhere
<AntonioND> so yeah, no idea
<AntonioND> but again, it may be that the platorm is too different...
<ldevulder> looks like
<ldevulder> anyway, it was not too difficult to test
<ldevulder> s905x and s912 are more close than s905 and s905x :)
<AntonioND> yeah, it wasn't a huge waste of effort
<AntonioND> and this bl31 was built pretty recently
<AntonioND> 25230 Built : 15:20:30, Feb 7 2018
<AntonioND> (compared to gxbb anyway)
<ldevulder> yes, it the last know
<ldevulder> and it's the same for gxl and gxm
<ldevulder> but not usable for gxbb
<AntonioND> at some point I should really take a look at the dts'es
<AntonioND> they don't have any useful information about the secure world, though
<AntonioND> because... why would they?
<AntonioND> linux doesn't care
<ldevulder> available in u-boot :) but don't know for secure world
<AntonioND> yeah, that's the problem
<AntonioND> tbh i'm glad that they left a lot of undocumented registers in uboot
<AntonioND> at least I can give names to my magic operations
<AntonioND> i don't understand them, but the registers have names
<ldevulder> but I think that Baylibre is working on the secure monitor in u-boot, don't know if it's related
<AntonioND> secure monitor... as in psci and that kind of things?
<ldevulder> I think yes
<AntonioND> well
<AntonioND> good luck :P
<AntonioND> that's all I can say xD
<AntonioND> uboot doesn't support multicore, right?
<ldevulder> don't think so
<ldevulder> (and not sure it is useful in u-boot)
<AntonioND> i don't really think it is...
<AntonioND> also, psci is... tricky
<AntonioND> i've seen people in my team discuss for hours about that, and they have all the insider info about the cpus and specs and everything
<AntonioND> so i'm not sure if it is wise to try to replicate it
<AntonioND> i would certainly appreciate a gpl firmware, though
<ldevulder> :)
<AntonioND> in any case, what I'm trying to do now is to port our internal test suite to the gxbb
<AntonioND> it will be made public hopefully this week
<AntonioND> it will be useful for psci
<ldevulder> AntonioND, I tried to change the address for bl31 in your ATF code for gxl, and it's a bit better I think (at least the xlat_tables_core.c file mentioned is in ATF): http://paste.opensuse.org/67116225
<AntonioND> oh, nice!
<ldevulder> don't know if it's very useful but it's progressing! :D
<AntonioND> not enough tables
<AntonioND> MAX_XLAT_TABLES
<AntonioND> increase that
<AntonioND> in meson/gxbb/include/platform_def.h
<AntonioND> plat/meson/...
<ldevulder> I also revert the change in meson_console.S
<ldevulder> still freeze but I have this before:
<ldevulder> NOTICE: BL31: v2.0(debug):v2.0-43-g55948053-dirty
<ldevulder> INFO: ARM GICv2 driver initialized
<ldevulder> NOTICE: BL31: Built : 01:00:40, Oct 10 2018
<ldevulder> definitely better I would say!
<AntonioND> that's pretty good tbh :P
<AntonioND> for basically no effort :P
<ldevulder> yes :)
<AntonioND> wait
<AntonioND> is that board still giv2?
<AntonioND> gicv2
<AntonioND> maybe you have to change the driver
<ldevulder> I don't know, it's a khadas vim
<ldevulder> vim1
<ldevulder> (I have a vim2 also, will check after if vim1 is working :-p)
<AntonioND> ok :P
<ldevulder> it seems that the board is GICv2
<AntonioND> yeah, looks like it
<AntonioND> hmmm
<AntonioND> scpi_thermal_unknown
<AntonioND> or something
<AntonioND> comment that out
<AntonioND> i think that scpi won't work right away
<ldevulder> also maybe other values need to be changed for s905x
<AntonioND> because the mailboxes are in a different address
<AntonioND> and it's waiting forever for the response of the scp
<AntonioND> gxbb_thermal_unknown
<AntonioND> comment that out
<AntonioND> i literally have no idea of what that thing is doing, but it will lock the system unless scp replies
<AntonioND> of course, if this is the reason, SMP won't work
<AntonioND> unless the addresses are updated
<AntonioND> and considering that their scpi implementation in gxbb doesn't follow the standard, maybe even the command ids have changed
<AntonioND> so the best you can get with this is UP linux
<AntonioND> which isn't really that interesting
<ldevulder> still freezing at the same point
<ldevulder> I will try to check in a few days with the s905x docs if other values have to be changed
<ldevulder> I need to go sleeping now :)
<AntonioND> ok
<AntonioND> yeah, good plan :P
<AntonioND> i should also go to sleep...
<AntonioND> talk to you later!
<ldevulder> thx for your work btw! it's good to see ARM working on that's thing!
<ldevulder> s/that's thing/that things/
<AntonioND> well, i'm doing it as a personal project, arm isn't really doing it :P
<AntonioND> (either that or I have misunderstood your message)
<lvrp16> in arm64/boot/dts/amlogic/meson-gx.dtsi, there's a cma, does the kernel config version override this or do both get allocated?
<lvrp16> or does this take priority over the kernel config?
<ldevulder> AntonioND, ok, as your are working for ARM (maybe I'm wrong?) I was not sure, but a lot of things are improving by personal project
<AntonioND> i am working in the trusted firmware team
<AntonioND> that's why it's easier for me to get this kind of stuff done :P
<AntonioND> i already know the code
<AntonioND> reading the disassembled code is just another day of stepping over instructions with the debugger
<AntonioND> but yeah, we already have too many things to do at work to worry about obscure platforms...
<AntonioND> i actually got the idea from a guy that works in the kernel team
<AntonioND> anyway, going to bed, bye
AntonioND has quit [Quit: Quit]