Tartarus changed the topic of #u-boot to: SOURCE MOVED TO https://source.denx.de/u-boot/u-boot.git / U-Boot v2022.01, v2022.04-rc4 are OUT / Merge Window is CLOSED, next is OPEN / Release v2022.04 is scheduled for 4 April 2022 / http://www.denx.de/wiki/U-Boot / Channel archives at https://libera.irclog.whitequark.org/u-boot
camus has joined #u-boot
apritzel_ has quit [Ping timeout: 256 seconds]
jclsn has quit [Ping timeout: 245 seconds]
vagrantc has quit [Quit: leaving]
jclsn has joined #u-boot
jclsn has quit [Ping timeout: 256 seconds]
jclsn has joined #u-boot
jclsn has quit [Ping timeout: 260 seconds]
jclsn has joined #u-boot
jclsn has quit [Ping timeout: 260 seconds]
jclsn has joined #u-boot
jclsn has quit [Ping timeout: 256 seconds]
jclsn has joined #u-boot
vagrantc has joined #u-boot
jclsn has quit [Ping timeout: 240 seconds]
camus has quit [Read error: Connection reset by peer]
camus has joined #u-boot
jclsn has joined #u-boot
thopiekar_ has joined #u-boot
thopiekar has quit [Killed (tantalum.libera.chat (Nickname regained by services))]
thopiekar_ is now known as thopiekar
jclsn has quit [Ping timeout: 272 seconds]
jclsn has joined #u-boot
jclsn has quit [Ping timeout: 256 seconds]
andr01d has joined #u-boot
vagrantc has quit [Quit: leaving]
jclsn has joined #u-boot
jclsn has quit [Ping timeout: 272 seconds]
thopiekar has quit [Ping timeout: 256 seconds]
thopiekar has joined #u-boot
jclsn has joined #u-boot
jclsn has quit [Ping timeout: 260 seconds]
jclsn has joined #u-boot
jclsn has quit [Ping timeout: 260 seconds]
jclsn has joined #u-boot
jclsn has quit [Ping timeout: 240 seconds]
jclsn has joined #u-boot
jclsn has quit [Ping timeout: 272 seconds]
jclsn has joined #u-boot
jclsn has quit [Ping timeout: 272 seconds]
jclsn has joined #u-boot
sbach has quit [Read error: Connection reset by peer]
sbach has joined #u-boot
sughosh has joined #u-boot
sughosh has left #u-boot [#u-boot]
sughosh has joined #u-boot
frieder has joined #u-boot
guillaume_g has joined #u-boot
lucaceresoli_ has joined #u-boot
monstr has joined #u-boot
Peng_Fan has joined #u-boot
milkylainen has joined #u-boot
camus has quit [Ping timeout: 252 seconds]
mckoan|away is now known as mckoan
camus has joined #u-boot
wyre has quit [Quit: ZNC 1.8.2 - https://znc.in]
wyre has joined #u-boot
sughosh has quit [Read error: Connection reset by peer]
sszy has joined #u-boot
zibolo has joined #u-boot
prabhakarlad has joined #u-boot
camus has quit [Remote host closed the connection]
camus has joined #u-boot
camus has quit [Ping timeout: 240 seconds]
camus has joined #u-boot
matthias_bgg has joined #u-boot
lucaceresoli_ has quit [Quit: Leaving]
lucaceresoli has joined #u-boot
alpernebbi has quit [Ping timeout: 240 seconds]
alpernebbi has joined #u-boot
wyre has quit [Quit: ZNC 1.8.2 - https://znc.in]
wyre has joined #u-boot
apritzel has joined #u-boot
JoaoSchim has joined #u-boot
torez has joined #u-boot
sstiller has joined #u-boot
crb has quit [Read error: Connection reset by peer]
lucaceresoli has quit [Quit: Leaving]
lucaceresoli_ has joined #u-boot
lucaceresoli_ has quit [Client Quit]
jclsn has quit [Quit: Ping timeout (120 seconds)]
jclsn has joined #u-boot
lucaceresoli has joined #u-boot
sstiller has quit [Quit: Leaving]
<kallisti5[m]> I have a weird enhancement
<kallisti5[m]> would it be possible to show where loading things bootefi?
<kallisti5[m]> tldr; aligning symbols to where u-boot loads things in qemu is really difficult :-)
<kallisti5[m]> I got it working at one time, by cranking up the verbosity in u-boot and finding a call to
<kallisti5[m]> " EFI: Entry efi_load_image, ..., EFI: efi_add_memory_map_pg: 0xfe6b0000 0x60 1 yes "
<kallisti5[m]> then telling gdb to position the efi binary at 0xfe6b0000
<kallisti5[m]> it would be awesome if u-boot said "positioning EFI image at 0xfe6b0000" or something
<kallisti5[m]> unless y'all know an easier way 😆
jybz has quit [Ping timeout: 256 seconds]
<apritzel> kallisti5[m]: which address do you mean, exactly? The one that you (or some script) needs to give as a parameter to bootefi? Or the address of one of the internal EFI payloads?
adeepv has joined #u-boot
<xypron> kallisti5[m]: efi_load_image() is called in multiple places: cmd/bootefi.c:510, lib/efi_loader/efi_bootmgr.c and possibly by client applications.
<xypron> kallisti5[m]: So the best place for a debug statement would be in efi_load_image().
<xypron> kallisti5[m]: The UEFI implementation does not yet support the logging infrastruture to be able to select debug output for a single function. See the log command.
<xypron> kallisti5[m]: telling gdb anything is outside the scope of U-Boot
<xypron> apritzel: gdb needs the load offset to show the code
jybz has joined #u-boot
<cambrian_invader> xypron: maybe you could document how to determine the address like how doc/README.arm-relocation describes how to load the symbol file for where U-Boot relocates itself
<kallisti5[m]> xypron: exactly :-) My first tries were kernel_addr_r, but that didn't do it
<kallisti5[m]> i've actually run into this issue a few times in the past on various architecture ports. I kinda have a process above to make it work, but it's a lot of work to find the address.
<kallisti5[m]> xypron: what about a verbosity level along the lines of "show efi image loads"
<kallisti5[m]> That would indeed be too much for normal operation, but a clear trace statement would at least help there
* kallisti5[m] starts rummaging around
<kallisti5[m]> xypron: *actually*... efi_run_image?
<kallisti5[m]> is that called only once?
<xypron> kallisti5[m]: There is not way to get the address currently unless a crash occurs. In a crash dump you will find all loaded images and the relative address to the image if the EFI binary crashed.
<xypron> kallisti5[m]: $kernel_addr_r is where you loaded the EFI binary. But U-Boot has to copy the sections according to the section table into fresh memory.
<kallisti5[m]> i mean... that seems pretty simple 😆 100% untested
<xypron> kallisti5[m]: the handle is not the image
prabhakarlad has quit [Quit: Client closed]
<xypron> kallisti5[m]: the addresses are in the EFI_LOADED_IMAGE_PROTOCOL
<apalos> kallisti5[m]: grep for efi_alloc_aligned_pages()
<kallisti5[m]> EFI image @ 00000000bf754f40 now the question is if that is the address i'm looking for
<Tartarus> xypron: Uh, can you build htmldocs locally right now, in a fresh python venv?
<xypron> Tartarus: I can give it a try.
<Tartarus> I'm seeing stuff like https://source.denx.de/u-boot/u-boot/-/jobs/411204 but even on just top of current next and not what I'm doing
<xypron> ./include/dm/ofnode.h:908: warning: Function parameter or member 'node' not described in 'ofnode_read_eth_phy_id'
<xypron> ./include/dm/ofnode.h:908: warning: Function parameter or member 'vendor' not described in 'ofnode_read_eth_phy_id'
<xypron> ./include/dm/ofnode.h:908: warning: Function parameter or member 'device' not described in 'ofnode_read_eth_phy_id'
<xypron> Tartarus: It is still using @param :(
redbrain has quit [Read error: Connection reset by peer]
<xypron> and @return
<xypron> Tartarus: See mail
redbrain has joined #u-boot
prabhakarlad has joined #u-boot
GNUtoo has quit [Ping timeout: 240 seconds]
<xypron> Tartarus: jinja2==3.0.3 is missing
<Tartarus> xypron: OK?
<Tartarus> I'm confused as to why it's blowing up right now
<xypron> xypron: in venv without fixing jinja2 to 3.0.3 I get a Python error
GNUtoo has joined #u-boot
<Tartarus> Or is this just one of those we don't control our dependencies, or needed to have versioned a dependency things?
<xypron> Tartarus: File "/tmp/venvhtml/lib/python3.8/site-packages/sphinx/util/rst.py", line 21, in <module>
<xypron> from jinja2 import Environment, environmentfilter is what I get if jinja 3.1.0 is used.
<Tartarus> xypron: Sigh. What else isn't pinned?
<kallisti5[m]> apalos: ah yeah. efi_reloc never gets exposed anywhere
<xypron> Tartarus: 'pip freeze' gives me https://paste.ubuntu.com/p/MGtdZspXFT/
<xypron> Tartarus: can't we just paste that into requirements.txt?
<kallisti5[m]> 64-bit EFI image loaded at relocated address 00000000be6c6000
<kallisti5[m]> EFI image @ 00000000bf754f40
<kallisti5[m]> definitely different
frieder has quit [Remote host closed the connection]
<Tartarus> xypron: Yes, I think that's about what we do for the pytest one
<Tartarus> And then should periodically unfreeze, update and fix what needs fixing
<Tartarus> So we both don't get stuck with ancient versions, but also don't get random CI failures
<apalos> kallisti5[m]: what's the first prinf for ? The handle? as xypron said that's not the address
<kabel> I started having problems with compiling Linus' master branch recently for arm64, with modpost failing with "no symtab"
<kabel> anyone else experiencing this?
zibolo has quit [Ping timeout: 272 seconds]
<kallisti5[m]> apalos: just comparing. wanted to see how the original EFI image compared to the relocated address
<apalos> ah yes, it's completely different
<kallisti5[m]> NICE! it works!
vagrantc has joined #u-boot
<kallisti5[m]> I think this patch is viable upstream tbh
mthall_ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
guillaume_g has quit [Quit: Konversation terminated!]
mthall has joined #u-boot
adeepv has quit [Quit: %exit%]
adeepv has joined #u-boot
sszy has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<xypron> kallisti5[m]: Do we really always need this output? The UEFI SCT for instance is loading dozens of binaries. Writing test message during the runtime of a menu driven program can be very disturbing.
<kallisti5[m]> Good point. Unsure. Maybe should be only enabled for qemu builds?
<kallisti5[m]> The value there definitely works, so *really* useful
monstr has quit [Remote host closed the connection]
<apritzel> kallisti5[m]: for *you*, during the once-in-a-lifetime bringup of a niche OS to a new architecture? :-D
<apritzel> kallisti5[m]: what about log_debug() instead?
mckoan is now known as mckoan|away
<kallisti5[m]> log_debug is probably fine too 😅
<kallisti5[m]> Haiku isn't niche either *flex*
<kallisti5[m]> Number 4 most poput os behind windows, os x, and Linux 😁
<kallisti5[m]> s/poput/popular/
<kallisti5[m]> .. ok maybe #5. Missed BSD
torez has quit [Quit: torez]
sobkas has joined #u-boot
matthias_bgg has quit [Ping timeout: 260 seconds]
<qyx> marex: it works now, there were multiple issues, I tried also the TF-A approach, but didn't get far.. SPL initializes, uart output works, it can be booted over UART using the STM32 cube programmer
<qyx> also I moved to official ARM toolchain
<qyx> one of the problems was if trustzone is enabled, backup domain cannot be unprotected using "normal writes", LSE couldn't be started, so the SPL hung right at the start
<qyx> so loading u-boot SPL over JTAG will not work until trustzone is disabled with option bytes
<qyx> which, surprise surprise, I wasn't able to achieve using vendor tools
<qyx> and I wasn't adventurous enough to manually poke registers using openocd to program them
sobkas has quit [Read error: Connection reset by peer]
<qyx> so now it works like 0. boot in UART recovery 1. run openocd, 2. run gdb, attach, load symbols, setup breakpoint somewhere near board_init_f, continue the recovery bootrom 3. load SPL over UART using the bootrom (so not using JTAG), 4. run in secure mode using STM32 cube programmer and when it finishes 5. attach serial terminal to the same UART, 6. resume after breakpoint in gdb
sobkas has joined #u-boot
___nick___ has joined #u-boot
<kallisti5[m]> apritzel: ok. I think I have a better solution
<kallisti5[m]> how do you get EFI_PRINT (defined' to debug(xxx)) to show up in u-boot?
behanw has joined #u-boot
<xypron> kabel: EFI_PRINT has debug() inside. So you could put #define DEBUG before #include <common.h>. Or compile with CONFIG_LOG=y, CONFIG_LOG_MAX_LEVEL >= 7 and enable whatever your want to debug with the log command.
<marex> qyx: if you have USB OTG available, you can start U-Boot SPL and U-Boot via DFU btw
<qyx> zes that's the plan when TUSB320 becomes available
<marex> qyx: can't you just connect DN/DP/ID/GND to some USB-A connector in the meantime ?
<marex> you dont need USB-C for DFU
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
___nick___ has joined #u-boot
___nick___ has quit [Client Quit]
<kallisti5[m]> eh. I just did a log_info. Submitted. I think there's a case to EFI_PRINT, i just don't know how that works and it isn't obvious after tracing through the defines
<qyx> I could but meh
___nick___ has joined #u-boot
<marex> qyx: it is surprising to see you need to deal with TZ btw
<marex> iirc it is off by default
<qyx> it is on by default, BL1 starts in secure mode
<qyx> at least that's how i understand it
<qyx> from ST docs
<marex> BL1 is bootrom ?
<qyx> yes
<marex> mrnuke: you still around ?
<marex> qyx: I really should try booting the Avenger96 via JTAG again
<kabel> [p-----------------pppppppppppppppppppp--pooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
<kabel> sorry that was my cat
<qyx> kabel: o/
<marex> kabel: must've been urgent
<marex> *ahem*
<qyx> ako inak! sorry, OT
<qyx> slowly moving forward, LPDDR3 is failing now
prabhakarlad has quit [Quit: Client closed]
behanw_ has joined #u-boot
behanw has quit [Ping timeout: 260 seconds]
behanw_ is now known as behanw
___nick___ has quit [Ping timeout: 272 seconds]
mmu_man has joined #u-boot
prabhakarlad has joined #u-boot
<qyx> hm I though u-boot will set pmic regulator voltages according to the dts file
prabhakarlad has quit [Quit: Client closed]
lucaceresoli has quit [Ping timeout: 240 seconds]
matthias_bgg has joined #u-boot
sobkas has quit [Remote host closed the connection]
matthias_bgg has quit [Ping timeout: 240 seconds]