sorear changed the topic of #riscv to: RISC-V instruction set architecture | https://riscv.org | Logs: https://libera.irclog.whitequark.org/riscv | Matrix: #riscv:catircservices.org
rsjw has quit [Quit: leaving]
rsjw has joined #riscv
fuwei has quit [Quit: Konversation terminated!]
mlw has quit [Ping timeout: 264 seconds]
Armand has quit [Remote host closed the connection]
Armand has joined #riscv
fuwei has joined #riscv
fuwei has quit [Quit: Konversation terminated!]
BootLayer has joined #riscv
fuwei has joined #riscv
hightower4 has joined #riscv
hightower3 has quit [Ping timeout: 264 seconds]
jacklsw has joined #riscv
octav1a has quit [Ping timeout: 256 seconds]
octav1a has joined #riscv
octav1a has quit [Ping timeout: 260 seconds]
octav1a has joined #riscv
octav1a has quit [Read error: Connection reset by peer]
octav1a has joined #riscv
octav1a has quit [Read error: Connection reset by peer]
octav1a has joined #riscv
octav1a has quit [Client Quit]
octav1a has joined #riscv
rsjw has quit [Ping timeout: 264 seconds]
rsjw has joined #riscv
mlw has joined #riscv
BootLayer has quit [Quit: Leaving]
fuwei has quit [Quit: Konversation terminated!]
fuwei has joined #riscv
bjdooks has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
bjdooks has joined #riscv
sympt has quit [Ping timeout: 252 seconds]
fuwei has quit [Quit: Konversation terminated!]
jacklsw has quit [Quit: Back to the real world]
jacklsw has joined #riscv
KombuchaKip has joined #riscv
jjido has joined #riscv
zv has quit [Ping timeout: 272 seconds]
zv has joined #riscv
ldevulder has joined #riscv
prabhakar has quit [Quit: Konversation terminated!]
prabhakar has joined #riscv
mlw has quit [Ping timeout: 264 seconds]
jjido has quit [Quit: My laptop has gone to sleep. ZZZzzz…]
rsjw has quit [Remote host closed the connection]
rsjw has joined #riscv
sadome has joined #riscv
sadome has joined #riscv
sadome has quit [Excess Flood]
fuel_ has joined #riscv
fuel has quit [Killed (NickServ (GHOST command used by fuel_))]
fuel_ is now known as fuel
TMM has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
TMM has joined #riscv
Andre_Z has joined #riscv
fuel_ has joined #riscv
fuel has quit [Ping timeout: 264 seconds]
fuel_ is now known as fuel
hightower4 has quit [Ping timeout: 268 seconds]
naoki has quit [Quit: naoki]
jacklsw has quit [Ping timeout: 256 seconds]
prabhakalad has joined #riscv
mlw has joined #riscv
prabhakar has quit [Ping timeout: 264 seconds]
Andre_Z has quit [Quit: Leaving.]
naoki has joined #riscv
mlw has quit [Ping timeout: 268 seconds]
mlw has joined #riscv
Stat_headcrabed has joined #riscv
hightower2 has joined #riscv
hightower2 has quit [Ping timeout: 264 seconds]
Stat_headcrabed has quit [Quit: Stat_headcrabed]
EchelonX has joined #riscv
Stat_headcrabed has joined #riscv
Stat_headcrabed has quit [Remote host closed the connection]
mlw has quit [Ping timeout: 240 seconds]
mlw has joined #riscv
chrip0 has joined #riscv
chripo has quit [Read error: Connection reset by peer]
chrip0 is now known as chripo
chripo is now known as Guest7963
dev2 has quit [Quit: WeeChat 4.3.1]
psydroid has quit [Ping timeout: 272 seconds]
psydroid has joined #riscv
dev2 has joined #riscv
peepsalot has quit [Remote host closed the connection]
peepsalot has joined #riscv
<palmer> or more like this
psydroid2 has joined #riscv
TMM has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
TMM has joined #riscv
naoki has quit [Quit: naoki]
vagrantc has joined #riscv
<Esmil> conchuod: how do you like this way of using device trees :) https://termbin.com/fjru
<conchuod> What are they actually loading with that?
<conchuod> bt?
<Esmil> just the 8852bs module it seems
BootLayer has joined #riscv
<conchuod> Esmil: just the bt - unless there's a "module_usrload" property in the devicetree. I didn't notice that part of it.
<conchuod> 🤐
Stat_headcrabed has joined #riscv
<conchuod> Esmil: my vf2 still doesn't have a functional eth0
eightthree has quit [Remote host closed the connection]
eightthree has joined #riscv
<conchuod> iirc there's something silly going on, like I have to boot u-boot with one ethernet port and linux with the other.
eightthree has quit [Remote host closed the connection]
eightthree has joined #riscv
<conchuod> I can't remember anything about why this is the case, maybe something related to having one of the first batch of boards with mismatched speeds?
eightthree has quit [Remote host closed the connection]
fuel has quit [Ping timeout: 255 seconds]
eightthree has joined #riscv
fuel has joined #riscv
ldevulder has quit [Quit: Leaving]
<Stat_headcrabed> conchuod: What uboot/sbi/kernel version are you using?
<Stat_headcrabed> I think it should be fixed on newer version?
<conchuod> Probably most ancient stuff tbf. I ran the WIP U-Boot patches for it in U-Boot, but went back to the vendor's cos I needed ethernet. I'm on U-Boot 2021.10 (Jan 19 2023 - 04:09:41 +0800), Build: jenkins-github_visionfive2-6.
<conchuod> But my kernel is as recent as it could possibly be & that's where I have ethernet problems.
<conchuod> My SPL is U-Boot SPL 2021.10 (Feb 27 2023 - 21:59:07 +0800) and I have no clue about OpenSBI.
<Stat_headcrabed> For mainline kernel, to make reboot working correctly, you need a new version of mainline opensbi
<conchuod> I don't really care for reboot, what I want is ethernet!
<Stat_headcrabed> Also ethernet dtb patching is implemented differently(due to different dtb name in vendor and mainline)
<Stat_headcrabed> so to make mainline eth working you really need a mainline uboot
<Stat_headcrabed> 🤦‍♂️
<conchuod> Oh what fun.
<conchuod> I don't have any ethernet patching at all though.
<conchuod> It just uses the dts in linux directly.
<conchuod> I might just add a dts for my board.
<Stat_headcrabed> Wait
<Stat_headcrabed> Seems only vendor uboot would patch dtb now
<Stat_headcrabed> No, mainline also patches dtb
<Stat_headcrabed> So maybe you really needs to update your uboot
<conchuod> I dunno, I already have those properties in my dts.
<Stat_headcrabed> hmmmm
<conchuod> My u-boot doesn't pass it's dtb to linux, I tftp in a new one.
<conchuod> So spl patching a dtb isn't gonna have any impact on me. I actually don't want a patched dtb if I can help it, it doesn't make checking what I'm applying easier.
<Stat_headcrabed> For passing dtb to kernel, mainline uboot passed kernel dtb now
<conchuod> I don't get you, sorry.
<Stat_headcrabed> Forget about me
<Stat_headcrabed> Maybe that's a eth driver bug?
<conchuod> https://www.kickstarter.com/projects/starfive/visionfive-2 I have a "super early bird"
<conchuod> One of the ethernet ports is weaker than the other.
<conchuod> I wonder if that has an impact.
<Stat_headcrabed> The 100M port has a different phy, does the kernel have its driver?
<conchuod> I have no idea, all I know is that this never worked.
<conchuod> Also
<conchuod> phy@1, reg = <0>
<conchuod> I'm not even sure if the original vendor image worked for ethernet on this board.
<conchuod> I need to figure it out some day soonTM.
<Stat_headcrabed> What about trying mainline uboot first? (Though seems it won't help on this problem)
<Stat_headcrabed> Also which port is not working in linux on your board
<Stat_headcrabed> 100M or 1000M?
<conchuod> Neither of them actually seems to come up.
<conchuod> What I remember happening back 1 year or so ago is that the one used by default in U-Boot was not the one Linux used.
<conchuod> I'll go put a modern U-Boot on this and see how far I get.
<Stat_headcrabed> Btw you can reference to this for compiling mainline uboot: https://github.com/u-boot/u-boot/blob/master/doc/board/starfive/visionfive2.rst
<Stat_headcrabed> After switching to upstream uboot, you need a "env default -a; env save" to clear vendor uboot env
<conchuod> I should have my scripts from when I first got the board, I'll re-run that and see how far I get ;)
<conchuod> Should have whatver spl_tool stuff I need :)
<Stat_headcrabed> spl_tool is not needed
<Stat_headcrabed> mainline uboot would generate that normal.out by itself now
<conchuod> That's handy, but I guess it should still work.
<conchuod> I really should have kept a note of the jumpers stuff needed to program this.
<Stat_headcrabed> Check this
<Stat_headcrabed> also seems resetting uboot env needs "env default -f -a" rather than "env default -a"
JSharp has quit [Ping timeout: 256 seconds]
JSharp has joined #riscv
Stat_headcrabed has quit [Quit: Stat_headcrabed]
Stat_headcrabed has joined #riscv
Stat_headcrabed1 has joined #riscv
<Stat_headcrabed1> Also seems I'm wrong about dtb patching in uboot. It is only for uboot rather than kernel.
Stat_headcrabed1 has quit [Client Quit]
<conchuod> Ye, I did notice that. But a non-rusty u-boot isnt the end of the world, so I dont mind.
<conchuod> I'll just rebuild the world on this thing, although I hate rebuilding buildroot after a few years.
LetoThe2nd has quit [Read error: Connection reset by peer]
LetoThe2nd has joined #riscv
jonmasters has quit [Ping timeout: 256 seconds]
<conchuod> That's self inflicted and usually caused by having a mess of different toolchains, some of which have no libc.
jonmasters has joined #riscv
mlw has quit [Ping timeout: 268 seconds]
<courmisch> not sure if rusty as in old or rusty as is Rustic
<conchuod> I actually meant to type "crusty" hah
BootLayer has quit [Quit: Leaving]
lvella has joined #riscv
LucasVella[m] has joined #riscv
<LucasVella[m]> Can someone help me understand why -fPIE code is so different from non-PIE? In particular, why does the compiler generate code to load local symbols from the GOT, since they are local, and subject to the same offset (PC-relative should "just work", right?)
<courmisch> LucasVella[m]: depends if interpostion is allowed or not
<courmisch> interposition*
<courmisch> presumably if you make the symbol static or hidden, there will be no GOT indirection
<jrtc27> the compiler does not load local symbols from the GOT for -fPIE
<courmisch> yeah sounds like they should be local but are not
<jrtc27> local (as in static) and local (as in non-static but defined in the same translation unit) are both accessed via PC-relative offsets
<jrtc27> what *isn't* is declared-but-not-defined, ie extern T foo
<courmisch> isn't that compiled to PC-relative after linker relaxation?
<courmisch> well "compiled" is wrong wording
<jrtc27> it can be these days, yes
<jrtc27> I forget which linkers implement it
<jrtc27> LucasVella[m]: if you want to ask these kinds of questions, godbolt.org is your friend for providing concrete examples
psydroid2 has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
<LucasVella[m]> let me pastebin the C code and what clang generated...
lagash has quit [Remote host closed the connection]
lagash has joined #riscv
ardb has quit [Read error: Connection reset by peer]
ardb has joined #riscv
Armand has quit [Killed (NickServ (GHOST command used by Armand28))]
armand__ has joined #riscv
lvella has quit [Quit: Leaving]
<LucasVella[m]> Sorry, I must be crazy. The only difference I can see now is that -fPIE is using auipc instead of lui to load the address of the global stuff, what makes total sense.
Andre_Z has joined #riscv
coldfeet has joined #riscv
mlw has joined #riscv
zjason` has joined #riscv
zjason has quit [Ping timeout: 256 seconds]
naoki has joined #riscv
Stat_headcrabed has quit [Quit: Connection closed for inactivity]
vagrantc has quit [Quit: leaving]
EchelonX has quit [Quit: Leaving]
motherfsck has quit [Quit: quit]
<LucasVella[m]> Oh, now I understand where my problem comes from! It is from inline assembly inside rust: "la sp, __stack_start", where "__stack_start" is defined by the linker script. With "relocation-model=pie", this is expanded into auipc + lw into "_DYNAMIC", but when static, it expands to auipc + addi. Maybe there is some to tell rust that the symbol __stack_start is internal.
<jrtc27> or for the TL;DR, use lla if you know the symbol isn't external
<conchuod> Stat_headcrabed I updated to 2024.07-rc4 and now I get a binman_init failed:-2
<LucasVella[m]> thanks
coldfeet has quit [Quit: Lost terminal]
Andre_Z has quit [Ping timeout: 264 seconds]
<sorear> I'd rather fix whatever linker you're using so that it can handle GOT relocations
<sorear> if there's any chance whatsoever that the inline assembly will be used in a dynamic linking environment, lla is annoyingly brittle
mlw has quit [Ping timeout: 264 seconds]
frkzoid has quit [Read error: Connection reset by peer]
frkazoid333 has joined #riscv
<naoki> uh... sort defconfig (savedefconfig) please...
<conchuod> naoki: For what project?
<LucasVella[m]> sorear @libera_sorear:catircservices.org: dynamic relocations are the least of my problems, we can barely handle auipc and jalr
flatmush has quit [Ping timeout: 268 seconds]
<sorear> GOT relocations are static, not dynamci
<sorear> they may be converted into dynamic data-segment (R_RISCV_64) relocations if the linker is generating a dynamic output file
<conchuod> Stat_headcrabed I think my kernel problem was thinking that https://lore.kernel.org/r/20240605071701.13737-1-hal.feng@starfivetech.com had already been applied. It is now.
<sorear> if this is a new static linker ... prioritization is fine but I'm cautious about any workaround that might get upstreamed into rustc
<naoki> conchuod: linux
<conchuod> naoki: I will add it to my todo list.
<conchuod> It's unfortunately not as simple as running savedefconfig, you need to check all the removals.
<naoki> oh. I thought removed = unavailable or same as default, so it's safe operation
<conchuod> naoki: Yeah, you're not wrong, it is a NOP. It's just that if something was enabled by over time has been disabled, we really need to check if the right thing to do is actually to add in a pre-requisite instead of removing.
flatmush has joined #riscv
<conchuod> s/enabled by over/enabled but over/
<naoki> I'm trying savedefconfig-ed defconfig on Mars now. at least it boots with ubuntu-minimal userland and can build linux kernel ;)
<conchuod> naoki: Ye, if it booted before it'll boot after since it is should have no impact on the outcome.
<conchuod> Running savedefconfig is an opportunity to see if some option we wanted has been disabled "silently".
<naoki> yeah I understand it
Leopold has joined #riscv
flatmush has quit [Ping timeout: 255 seconds]
flatmush has joined #riscv
markh has quit [Ping timeout: 246 seconds]
markh has joined #riscv
DesRoin has quit [Ping timeout: 264 seconds]
DesRoin has joined #riscv
<naoki> oh, only 77 minutes to build linux kernel (and deb package) on Mars ;)
<naoki> ^with 1.5GHz patch
KombuchaKip has quit [Quit: Leaving.]
KombuchaKip has joined #riscv
Leopold has quit [Remote host closed the connection]