Tartarus changed the topic of #u-boot to: SOURCE MOVED TO https://source.denx.de/u-boot/u-boot.git / U-Boot v2023.07.02, v2023.10-rc3 are OUT / Merge Window is CLOSED, next branch is OPEN / Release v2023.10 is scheduled for 02 October 2023 / Channel archives at https://libera.irclog.whitequark.org/u-boot
redbrain has joined #u-boot
Wouter0100670440 has quit [Quit: The Lounge - https://thelounge.chat]
Wouter0100670440 has joined #u-boot
ikarso has quit [Quit: Connection closed for inactivity]
wkennington has quit [Quit: Client closed]
jclsn has quit [Ping timeout: 260 seconds]
thopiekar_ has quit [Ping timeout: 250 seconds]
thopiekar has joined #u-boot
mmu_man has quit [Ping timeout: 246 seconds]
pgreco has joined #u-boot
pgreco_ has quit [Ping timeout: 256 seconds]
vagrantc has quit [Ping timeout: 248 seconds]
flyback has quit [Ping timeout: 252 seconds]
jclsn has joined #u-boot
flyback has joined #u-boot
ja_02 has joined #u-boot
flyback has quit [Remote host closed the connection]
flyback has joined #u-boot
Leopold has quit [Ping timeout: 256 seconds]
stefanro has joined #u-boot
sukrutb has quit [Ping timeout: 245 seconds]
sng has joined #u-boot
sng has quit [Remote host closed the connection]
sng has joined #u-boot
teejay_ has quit [Ping timeout: 245 seconds]
milkylainen has quit [Ping timeout: 248 seconds]
milkylainen has joined #u-boot
Clamor has joined #u-boot
milkylainen has quit [Ping timeout: 245 seconds]
monstr has joined #u-boot
monstr has quit [Ping timeout: 250 seconds]
milkylainen has joined #u-boot
pgreco has quit [Ping timeout: 250 seconds]
sng has quit [Read error: Connection reset by peer]
pgreco has joined #u-boot
ikarso has joined #u-boot
sng has joined #u-boot
sng has quit [Remote host closed the connection]
sng has joined #u-boot
sng has quit [Read error: Connection reset by peer]
soxrok2212 has quit [Ping timeout: 245 seconds]
monstr has joined #u-boot
monstr has quit [Remote host closed the connection]
goliath has joined #u-boot
monstr has joined #u-boot
valdemaras has joined #u-boot
monstr has quit [Ping timeout: 258 seconds]
MWelchUK88 has joined #u-boot
Wouter0100670440 has quit [Ping timeout: 256 seconds]
MWelchUK8 has quit [Ping timeout: 256 seconds]
MWelchUK88 is now known as MWelchUK8
soxrok2212 has joined #u-boot
sukrutb has joined #u-boot
soxrok2212 has quit [Ping timeout: 260 seconds]
mckoan|away is now known as mckoan
soxrok2212 has joined #u-boot
frieder has joined #u-boot
Clamor has quit [Quit: Quit]
valdemaras has quit [Quit: valdemaras]
monstr has joined #u-boot
monstr has quit [Ping timeout: 248 seconds]
mmu_man has joined #u-boot
ezulian has joined #u-boot
indy has quit [Ping timeout: 246 seconds]
valdemaras has joined #u-boot
soxrok2212 has quit [Quit: Who ate my gummy worms?]
soxrok2212 has joined #u-boot
mmu_man has quit [Ping timeout: 245 seconds]
mmu_man has joined #u-boot
prabhakarlad has joined #u-boot
wyre_ has joined #u-boot
wyre has quit [Read error: Connection reset by peer]
sng has joined #u-boot
mmu_man has quit [Ping timeout: 246 seconds]
sng has quit [Remote host closed the connection]
sng has joined #u-boot
mripard has joined #u-boot
LordKalma has quit [Quit: Server has probably crashed]
Wouter0100670440 has joined #u-boot
LordKalma has joined #u-boot
LordKalma has quit [Client Quit]
wyre_ has quit [Quit: ZNC 1.8.2 - https://znc.in]
wyre has joined #u-boot
LordKalma has joined #u-boot
mmu_man has joined #u-boot
LordKalma has quit [Client Quit]
LordKalma has joined #u-boot
Clamor has joined #u-boot
camus has quit [Ping timeout: 246 seconds]
Stat_headcrabed has joined #u-boot
camus has joined #u-boot
Clamor has quit [Ping timeout: 250 seconds]
LordKalma has quit [Quit: Server has probably crashed]
LordKalma has joined #u-boot
indy_ has joined #u-boot
LordKalma0 has joined #u-boot
LordKalma has quit [Ping timeout: 244 seconds]
LordKalma0 is now known as LordKalma
valdemaras has quit [Quit: valdemaras]
valdemaras has joined #u-boot
Clamor has joined #u-boot
Clamor has quit [Client Quit]
Stat_headcrabed has quit [Quit: Stat_headcrabed]
sng_ has joined #u-boot
sng has quit [Read error: Connection reset by peer]
sng_ has quit [Remote host closed the connection]
sng has joined #u-boot
sng has quit [Remote host closed the connection]
sng has joined #u-boot
Clamor has joined #u-boot
Wouter0100670440 has quit [Quit: The Lounge - https://thelounge.chat]
Wouter0100670440 has joined #u-boot
opalfruit has joined #u-boot
<opalfruit> Hi, with u-boot and bl31, i can see ATF when used as bl31, sets the spsr before jumping back to u-boot, is the spsr set originally though in u-boot? If this is the case, can i force the value of spsr in u-boot somewhere
Stat_headcrabed has joined #u-boot
goliath has quit [Quit: SIGSEGV]
valdemaras has quit [Quit: valdemaras]
Stat_headcrabed has quit [Quit: Stat_headcrabed]
Stat_headcrabed has joined #u-boot
valdemaras has joined #u-boot
<marex> opalfruit: what are you trying to achieve ? on which SoC ?
<opalfruit> allwinner h6
<opalfruit> trying to set a particular value from u-boot
<marex> does git grep -i spsr in U-Boot sources provide any hints how to do that ?
<opalfruit> yeah i tried changing the values that i could fine, but that didn't seem to change ATFs value
<opalfruit> for values where spsr =...
<marex> use msr spsr...
<marex> opalfruit: what is the end result you want to achieve ?
<opalfruit> msr would only only be usable once u-boot is loaded? wouldnt it
<opalfruit> assuming you mean the u-boot command
<marex> arch/arm/include/asm/macro.h: msr spsr_el3, \tmp
<opalfruit> ohh
<marex> arch/arm/lib/vectors.S: msr spsr, r13 @ switch modes, make sure moves will execute
<opalfruit> thanks
<opalfruit> i'm trying to force a paricular value as currently the ATF isn't jumping back
<opalfruit> correctly to u-boot
<marex> you still did not answer either of my questions however ... so it is hard to provide any more meaningful hint
<marex> ha
<opalfruit> that's the reason heh
<marex> doesnt atf do some switch to EL2 and then jump to entry point ?
<marex> why would spsr play a role in that ?
<marex> note that spsr is per-EL , so make sure you set the correct one
<marex> SPL is EL3, TFA is EL3->EL2, U-Boot is usually EL2
<opalfruit> i'm somewhat confused, i just know if i force the spsr to a particular value in the ATF, it jumps back to u-boot correctly, and hangs otherwise. I'm now trying to do this from u-boot rather than by modifying ATF
<marex> you may not be able to do that if youre not in the right EL anymore
<opalfruit> ah, i tried altering the value in arch/arm/include/asm/macro.h, that didn't change things alas, going to try in vector.S now
<xypron> Tartarus: I found some bugs related to comparisons between integers of different signedness in U-Boot. Should we strive to build with -Wsign-compare?
<marex> xypron: there is still a few of those, yeah
<marex> xypron: ideally, I'd say we should build with Werror cleanly
<xypron> Tartarus: -Wsign-compare is not included in -Wall but in -Wextra.
<marex> xypron: ah ... I still think the more errors we remove and autoavoid, the better
vagrantc has joined #u-boot
ikarso has quit [Quit: Connection closed for inactivity]
valdemaras has quit [Quit: valdemaras]
goliath has joined #u-boot
Clamor has quit [Ping timeout: 246 seconds]
Clamor has joined #u-boot
Stat_headcrabed has quit [Quit: Stat_headcrabed]
dgilmore has quit [Excess Flood]
dgilmore has joined #u-boot
mckoan is now known as mckoan|away
ikarso has joined #u-boot
mmu_man has quit [Ping timeout: 246 seconds]
prabhakarlad has quit [Quit: Client closed]
<marex> mkorpershoek: I am truly surprised how the usb udc stuff did not explode too much, thanks for testing
<mkorpershoek> you're welcome! I did some very basic testing (just reflashing one raw partition) and multiple => fastboot ; Ctrl-C to make sure re-connection works
<marex> mkorpershoek: I so very much want to get rid of that udc uclass crap with 4 UDCs
<marex> that really has no place in DM
<mkorpershoek> yeah it's a really nice clean-up
<marex> the UDC is really lagging behind, sigh
<marex> could use some co-maintainer for that too
<marex> sjg1: noted, can I obtain one such sample device ?
<marex> sjg1: does it happen on specific controller, or is this generic to any xhci hcd ?
<sjg1> I will try that, also usb_pgood_delay. How do I make it always have VBUS on?
<marex> sjg1: force the regulator to be always-on
<marex> see regulator-always-on
<marex> assuming you do use vbus regulator
<marex> ad__: hey, have you had any time to finish the m68k manual reloc review ?
Guest4494 has joined #u-boot
<sjg1> marex: I don't think I have control of the regulator
<marex> on various embedded systems that is controllable
<marex> what system is this ?
<marex> did you try another different hardware with xhci hcd, does the problem persist ?
prabhakarlad has joined #u-boot
goliath has quit [Quit: SIGSEGV]
<marex> test/boot/bootflow.c:538, prep_mmc4_bootdev(): console: Expected no more output, got 'Wrong image format for "source" command'
<marex> probably another block device ordering wart
valdemaras has joined #u-boot
frieder has quit [Remote host closed the connection]
mripard has quit [Quit: mripard]
flom84 has joined #u-boot
flom84 has quit [Remote host closed the connection]
flom84 has joined #u-boot
Leopold has joined #u-boot
valdemaras has quit [Read error: Connection reset by peer]
kveremitz has quit [Quit: ZNC - http://znc.in]
kveremitz has joined #u-boot
sng has quit [Ping timeout: 248 seconds]
sng has joined #u-boot
slobodan has joined #u-boot
sng_ has joined #u-boot
sng has quit [Read error: Connection reset by peer]
<Tartarus> xypron: Are you finding these issues with Coverity or something else?
<Tartarus> marex: OK
Clamor has quit [Quit: Quit]
<marex> sjg1: that boot meth blow up above, I don't get it
<marex> sjg1: boot menu command is missing, I enabled that, but uh ... what exactly is that thing doing ?
<marex> should this print anything ? ./u-boot -Tc 'bootflow scan'
ikarso has quit [Quit: Connection closed for inactivity]
<Kwiboo> marex: that Wrong image format for "source" command is possible FIT_SIGNATURE=y without LEGACY_IMAGE_FORMAT=y
<marex> nope
<marex> that looks more like sandbox and sandbox64 requiring different image formats
<marex> like arm and arm64
<marex> ah wait, LEGACY_IMAGE_FORMAT=y is missing
<Kwiboo> yep, it is missing so bootmeth script will not work
<Tartarus> ... then some bootmeth needs to be select'ing something I think
<Kwiboo> more correctly bootmeth script will only work with scripts in FIT format, not with common mkimage -T script format due to LEGACY_IMAGE_FORMAT having default y if !FIT_SIGNATURE
ikarso has joined #u-boot
Clamor has joined #u-boot
Clamor has quit [Client Quit]
slobodan has quit [Read error: Connection reset by peer]
slobodan has joined #u-boot
stefanro has quit [Quit: Leaving.]
<sjg1> Tartarus: Well, be careful, because it provides a back door to get around FIT_SIGNATURE
<Tartarus> And then one thing, or the other, needs to be disabled, yes
<Tartarus> Likely
<sjg1> marex: Re ./u-boot -Tc 'bootflow scan' - add the -l flag if you want something printed
slobodan_ has joined #u-boot
slobodan has quit [Read error: Connection reset by peer]
opalfruit has quit [Quit: Connection closed for inactivity]
slobodan_ has quit [Ping timeout: 252 seconds]
<marex> sjg1: what does it do without the -l ?
slobodan has joined #u-boot
mmu_man has joined #u-boot
sng_ has quit [Remote host closed the connection]
kveremitz has quit [Quit: ZNC - http://znc.in]
<ja_02> is tom in here?
<ja_02> or Masahiro
kveremitz has joined #u-boot
<ja_02> after commit 65cc0e2a65d2c9f107b2f42db6396d9ade6c5ad8 "global: Move remaining CONFIG_SYS_* to CFG_SYS_*" CFG_SYS_UBOOT_START no longer is shown in Makefile causing mkimage to have the wrong entry if it is set to not the default value.
<ja_02> All cortex-M7s jump to the start of
<ja_02> this patch adds jump_to_image_no_args for imxrt to jump to the reset
<ja_02> dissabled on boot, the imxrt has is enabled.
<ja_02> vector table. which has invalid instructions. normaly usagefault is
<ja_02> vector found in the vector table.
<ja_02> should i sumit a patch similar to that for all the M7 devices
<ja_02> or is there a better way to do this?
<marex> ja_02: Yamada-san ? nope
<marex> ja_02: Tom, yeah
<marex> ja_02: send a patch , possibly add Fixes: tag
<marex> ja_02: or just generate an uImage/fitImage with correct entry point ?
<marex> ja_02: the patch seems bogus tho
<ja_02> its only an issue when loading u-boot from SPL
<marex> you likely want to fix the Makefile issue
<ja_02> imxrt is the only platform using CFG_SYS_UBOOT_START
<marex> include/configs/mt7620.h:#define CFG_SYS_UBOOT_START CONFIG_TEXT_BASE
<marex> include/configs/vocore2.h:#define CFG_SYS_UBOOT_START CONFIG_TEXT_BASE
<marex> really ?
<marex> arch/arm/mach-k3/config_secure.mk: -a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
<marex> thats TI btw
<ja_02> ifndef CFG_SYS_UBOOT_START
<ja_02> CFG_SYS_UBOOT_START := $(CONFIG_TEXT_BASE)
<ja_02> endif
<ja_02> in /Makefine
<marex> -ifndef CONFIG_SYS_UBOOT_START
<marex> -CONFIG_SYS_UBOOT_START := $(CONFIG_TEXT_BASE)
<marex> +ifndef CFG_SYS_UBOOT_START
<marex> +CFG_SYS_UBOOT_START := $(CONFIG_TEXT_BASE)
<marex> that was there before too
<ja_02> yes CONFIG_SYS_UBOOT_START is visible in the makefile when set in the header file. when its CFG_SYS_UBOOT_START its not exported in the Makefile
flom84 has quit [Ping timeout: 256 seconds]
<marex> ja_02: why ? :)
<sjg1> marex: Without -l it still scans, but doesn't list anything
<marex> sjg1: oh
<marex> ja_02: that seems to be the problem
<marex> ja_02: oh ... one possible fix could be to convert that symbol to Kconfig symbol , i.e. add 'config SYS_UBOOT_START' to fitting Kconfig, and then turn it back to CONFIG_SYS...
<marex> ja_02: then it would be exposed in Makefile and problem solved, no ?
<ja_02> git reset --hard 65cc0e2a65; make imxrt1050-evk_defconfig;make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j12; cat .u-boot.img.cmd
<ja_02> vs git reset --hard 65cc0e2a65^
slobodan_ has joined #u-boot
slobodan has quit [Read error: Connection reset by peer]
<ja_02> @marex i mean yeah, but as of now we just set the offset of __image_start to reset in CFG_SYS_UBOOT_START which isnt ideal
<marex> ja_02: I probably dont fully understand the problem you're solving
<ja_02> and ontop of that imxrt is the only platform that sets it to an arbitrary value we could do this CONFIG_TEXT_BASE + 0x1fd but then it would need to be evaluated
<marex> if you're loading image from SPL, why not simply set load address of that uImage and entry point to different values and let uboot load/jump to the right address(s)
<Tartarus> ja_02: Ugh. What platform exactly is showing this kind of problem?
<Tartarus> Ah,, I see, hum
<ja_02> thats what CFG_SYS_UBOOT_START does but it is broken. the reason we are using it is because the load address and copy address are the same for the cortex m7 which will jump to the vector table which has invalid instructions. arch/arm/lib/vectors_m.S. on stm32 invalid instruction falts are disabled at boot, same will the arm m7 spec, so no one noticed that. what we did is set CFG_SYS_UBOOT_START to be the address of reset in u-boot
<ja_02> proper
<Tartarus> OK, yeah
<ja_02> also affects all of the cortex M*
<Tartarus> Please just convert CFG_SYS_UBOOT_START to Kconfig
<Tartarus> The imxrt is the only place it's not just TEXT_BASE
<ja_02> but arm spec says that invalid instruction faults (usagefault) are disabled at boot
<ja_02> ok i will convert CFG_SYS_UBOOT_START to Kconfig
<Tartarus> And I _think_ "default TEXT_BASE" should work
<Tartarus> We use that kind of logic elsewhere, for CUSTOM_SYS_INIT_SP_ADDR
<ja_02> i still think that all of the cortex M* jumping to the vector table and running invalid instructions till it reaches reset is wrong
<Tartarus> I don't doubt you have a point, but lets separate the changes at least
<Tartarus> Fix the case first, improve the case second
<ja_02> k
<Tartarus> And note that the TI case is really doing -a CONFIG_TEXT_BASE -e CONFIG_TEXT_BASE, I just did a quick build and boot check on that
<Tartarus> So it's really just those imxrt platforms that were broken
<ja_02> yes
<ja_02> all others set CFG_SYS_UBOOT_START to CONFIG_TEXT_BASE
<ja_02> for fixing cortex-m* is the way i implemented jump_to_image_no_args in this ok? https://github.com/Mr-Bossman/u-boot/commit/7a321da47e64eea28d6fcaf580343331833e5213
Wouter0100670440 has quit [Quit: The Lounge - https://thelounge.chat]
Wouter0100670440 has joined #u-boot
<Tartarus> Seems reasonable, just cc the maintainers
<ja_02> k
<ja_02> to convert it to a Kconfig symbol i just replace CFG_ back to CONFIG_?
Guest4494 has quit [Ping timeout: 246 seconds]
<marex> ja_02: and add Kconfig 'config SYS...' entry
ezulian has quit [Ping timeout: 246 seconds]
slobodan_ has quit [Ping timeout: 246 seconds]
ikarso has quit [Quit: Connection closed for inactivity]
davlefou has quit [Ping timeout: 256 seconds]
<marex> sjg1: so on sandbox64, the fwu_mdata_read test fails because fwu_get_mdata() fwu_read_mdata() is called with g_dev = NULL
<marex> seems like fwu_boottime_checks is a bit weird, for one thing, it is never called, for other I think the sandbox check should be a bit later
<sjg1> marex: Oh don't get be started on all that. I cannot seem to explain to these people how to design for test
<marex> sjg1: who, amd/xilinx ?
davlefou has joined #u-boot
<sjg1> marex: ARM / Linaro
<marex> sjg1: oh don't get me started on that
<marex> but uh ... how could that test even work
<marex> I mean ... wtf
<sjg1> They insist on restarting sandbox to see if it does the right thing...I have spent months trying to explain that they can just kick of the 'thing' immediately in the test
<marex> sjg1: uh ... but the test just triggers undefined behavior
<marex> it just cannot ever work in its current state
<marex> sigh
<marex> it is plain wrong
<sjg1> marex: I'm not sure...perhaps something changed in the interim. It's always going to be brittle...one day they will see the light I hope
<sjg1> marex: I don't know what changed
<marex> lib/fwu_updates/fwu.c uses GLOBALS ?!
* marex faints
<marex> I guess 246ec2a12c4 ("fwu: meta-data: switch to management by common code")
<marex> fwu_get_dev_mdata looks like the right kind of function, so it was removed ... sigh