sorear changed the topic of #riscv to: RISC-V instruction set architecture | https://riscv.org | Logs: https://libera.irclog.whitequark.org/riscv
jmdaemon has joined #riscv
rurtty has quit [Quit: Leaving]
montjoie has quit [Ping timeout: 260 seconds]
montjoie has joined #riscv
sauce has quit [Remote host closed the connection]
sauce has joined #riscv
talos has quit [Quit: The Lounge - https://thelounge.chat]
epony has quit [Ping timeout: 268 seconds]
jacklsw has joined #riscv
elastic_dog has quit [Killed (zirconium.libera.chat (Nickname regained by services))]
elastic_dog has joined #riscv
rneese has quit []
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
___nick___ has joined #riscv
___nick___ has quit [Client Quit]
jmdaemon has quit [Ping timeout: 252 seconds]
___nick___ has joined #riscv
jmdaemon has joined #riscv
KombuchaKip has joined #riscv
vagrantc has quit [Quit: leaving]
jmdaemon has quit [Ping timeout: 252 seconds]
Trifton has joined #riscv
Trifton has quit [Remote host closed the connection]
Trifton has joined #riscv
Leopold has joined #riscv
vagrantc has joined #riscv
jmdaemon has joined #riscv
m5zs7k has quit [Ping timeout: 268 seconds]
m5zs7k has joined #riscv
m5zs7k has quit [Ping timeout: 252 seconds]
m5zs7k has joined #riscv
vagrantc has quit [Quit: leaving]
BootLayer has joined #riscv
Leopold has quit [Ping timeout: 255 seconds]
rurtty has joined #riscv
bauruine has joined #riscv
Leopold has joined #riscv
<geist> question i'm trying to figure out and can't seem to find a solid answer to: is there a way/how can a supervisor mode kernel determine the privileged spec the cpu implements?
<geist> possible it has to just know from marchid, mimpl, and of course the ISA extensions the cpu supports is specified in the device tree/acpi/etc
<geist> but even machine mode isn't really told what version of the privileged spec is implemented
<geist> hmm, opensbi seems to 'know'. lemme see how it finds out
<palmer> ya, pretty much: there's a bunch of out-of-band mechanisms that all end up as "ask the firmware", but there's nothing in the ISA spec that allows you to determine this
<geist> and in this case the firmware doesn't even pass it down. i dont see it passed in the DTC from opensbi on qemu, for example
<palmer> for Linux we generally probe for specific features, not the whole version
<geist> so a question is if a kernel is intended to detect that it's dealing with something that is running on a v1.10 vs a v1.12 (ie, a xuantie C910 vs a sifive core) it's a bit difficult, aside from knowing
<geist> so stuff like the *configptr register could just try to read and observe it failing i guess
<palmer> yep
<geist> lovely.
<palmer> it gets trickier because M-mode can pretty much always trap, and there's no requirements those are handled below Linux
<geist> yeah
<palmer> in general RISC-V allows any state transition, so you really just need to pick a set of implementations and target those
<geist> and i guess rely on march/mimpl for stuff where you just Have To Know
<geist> ie all the bazillino extensions xuantie has
<palmer> except that you can't actually look at march/mimpl/mvendor from S-mode (and even M-mode, as some vendors just set it to 0). So you're still just asking the firmware to tell you what's up, just in a different way
<geist> yeah
<geist> still trying to figure out how opensbi seems to know, but i suspect i'm going to eventually arrive at 'its hard coded'
<palmer> I guess it depends on exactly what knowledge you're poking at, but it's mostly just stuck in the platform bits
<geist> mostly just would like to know if certain features are present before trying to touch them, doubleplus so if sbi is just going to emulate it for me
<geist> which i'd honestly rather it not, so i can do a better implementation
<geist> but yeah, i suspect it's not as big of a problem as i think, since the features are generally what drive this stuff
<jrtc27> versioning it was a mistake
<jrtc27> should just be extensions
<geist> like, for example, senvcfg seems to only show up in v1.12
vimer has quit [Quit: leaving]
<geist> OTOH so far all the bits in it seems to be part of specific extensions, which i guess you can test for first
<geist> and stuff like Svnapot/etc are all extensions too. so that's testable
<palmer> in general there's both: some behavior is controlled by versions, some by extensions (and sometimes that changes)
<palmer> in practice you just need to enumerate the implemenations you're running on, the specs don't get you compatibility
<geist> yah, i suspect it's the usual tree of logic to deal with what you know
<palmer> yep
<geist> given that opensbi seems to know what version it is it *would* be nice if it'd just pass it down somehow
<geist> but probably Good Reason to not make that load bearing
<geist> or at least a reason
<palmer> the problem is that you can't always trust the information from firmware, as sometimes correctly implementing some bit requires cooperation with firmware and that falls apart when there's a bug
<palmer> so you sort of just need some ad-hoc mechanism
<geist> yah it's the inevitable outcome of not wanting to have piles of fixed registers that just describe everything, a-la x86 and armv8
<geist> seems that collectively riscv hasn't quite decided which way it wants to go here
<palmer> even Arm and Intel devolve into a pile of quirks, but that's not an excuse for not even bothering to try ;)
<geist> yah 100%
<palmer> ;)
<geist> anyway, fun times.
<geist> thanks, even a bad answer is still an answer
<palmer> sorry I don't have a good answer ;)
<palmer> we've managed to hide most of the issues from userspace so far, but once you get below that stuff is pretty broken
<geist> yep. OTOH i guess it's no where near the nonsense that is x86. but still got 35 more years to get to that level
<palmer> it's just different
<geist> and though i havent checked, i *assume* the general model is that gcc and clang and oter toolchains will allow access to all of the privileged mode registers, since there's no `-mpspec=N` args or whatnot
<geist> and thus allow the kernel code to deal with its own compatibility
<geist> i dont see it mentioned in the C api doc
<palmer> it's more complicated than that, but the assemblers allow CSR accesses via a numeric index and we just use that in Linux
<palmer> we tried actually following the ISA specs for a bit, but just gave up as it's not worth the headache
<geist> yah i expect that's the case, but for cases where the assemblers know about a particular CSR it shouldn't gate it based on the pspec it thinks its compling for, since it doesn't know
<geist> yah, i remember grousing here a few years ago about how you can't emit floating instructions if you're not compiling with a corresponding -march for it, and i think i ended up just resorting to using a bunch of .word sequences to save the FPU context in kernel mode
<geist> oh no i moved it to .S and set the `.attribute arch` which was acceptable
<palmer> ya, there's better ways to do the FP stuff. That's not really an ISA spec problem, though, as that code is really trying to violate the spec
<geist> makes sense though: new arch, try to be strict about things to keep it under control
<palmer> yep. At least for those we'd seen the Arm/MIPS mess and knew what to do
<palmer> there's some other stuff like fence.i and timers where we screwed up
<geist> yah i'm already dreading having to deal with xuantie + sifive cores at the same time, since they are going in different directions
<palmer> it's going to get way worse
<geist> indeed. as it's pointed out at the start of the privileged spec: it's separate from unpriv for a reason, you can build a completely different implementation. curious when the first major implementation that does go in a different direction shows up
jim-wilson[m] has quit [Quit: You have been kicked for being idle]
bauruine has quit [Ping timeout: 252 seconds]
jacklsw has quit [Ping timeout: 260 seconds]
bauruine has joined #riscv
TMM_ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
TMM_ has joined #riscv
wingsorc has quit [Ping timeout: 252 seconds]
davidlt has joined #riscv
elastic_dog has quit [Read error: Connection reset by peer]
elastic_dog has joined #riscv
<ddevault> I'm going to start organizing a ritual burning of the ACPI spec on the lawn outside of RISC-V events
<ddevault> anyone who shows up to speak positively about ACPI will be added to the pyre
<bjdooks> bit harsh, you need to give them time to repent
BootLayer has quit [Quit: Leaving]
indy has joined #riscv
Leopold has quit [Ping timeout: 248 seconds]
ldevulder has quit [Remote host closed the connection]
prabhakarlad has quit [Quit: Client closed]
sakman has joined #riscv
prabhakarlad has joined #riscv
rneese has joined #riscv
<rneese> anyone know where I can get the current sifi unmatched kernel config
<rneese> sifive
<rneese> and the other board
<ddevault> doesn't need much special iirc for unmatched
<ddevault> the upstream alpine config works, grab that one perhaps
<bjdooks> I'm using upstream from 5.19 with it with standard riscv64 defcofnig
<rneese> ok
<bjdooks> the only stuff recently is bugfixes for the pcie, or you can have a nice argument about how to do pwm leds
<rneese> well like the vf1 they have the working power light but never got the green led for status working
<drmpeg> I have a config where the unmatched LEDs work. But it's a ginormous Ubuntu config.
<rneese> thats fine
<drmpeg> ok, let me upload it.
<rneese> we are doing ubuntu/debian
<rneese> so it will help
<rneese> thanks
<drmpeg> This is modified from the file in the 22.10 distro.
enoq has joined #riscv
<drmpeg> And you have to do an olddefconfig on it.
<rneese> ok
<drmpeg> Works for Linux 6.1.x too.
<rneese> ok
<drmpeg> Actually, it only works for for 6.1 and after. There's a change with the SiFive cache config variable.
<drmpeg> CONFIG_SIFIVE_L2 became CONFIG_SIFIVE_CCACHE
<rneese> ok
BootLayer has joined #riscv
<rneese> is there a uboot config we need ?
<rneese> is that the unmatche ot unleashed ?
<rneese> as the only dts they have is unleashed
<drmpeg> I'm using an old u-boot that I have burned into SPI flash.
<rneese> ok
<drmpeg> It has mods for the LEDs.
<drmpeg> I might still have it.
<drmpeg> I do. Do you want just the binaries, or the whole thing?
wingsorc has joined #riscv
<rneese> is there a uEnv file also for booting extlinux/efi ?
<rneese> post what you have so we can work with it
<rneese> trying to add it to our builder
<rneese> we are doing what we can to support current and eol boards for now
<drmpeg> Here's my current with a bunch of kernels. https://www.w6rz.net/extlinux.conf
<drmpeg> Ubuntu puts the device tree in a different directory.
<rneese> ok
<drmpeg> I have a patch for that.
<rneese> ok
<rneese> well we are doing debian
<rneese> so I can match it for debian
jmdaemon has quit [Ping timeout: 252 seconds]
elastic_dog has quit [Ping timeout: 252 seconds]
<rneese> what dont they use the /boot/dts dir
<drmpeg> This is for the bindeb-pkg target. https://www.w6rz.net/build.patch
<rneese> dtb sorry
elastic_dog has joined #riscv
<drmpeg> Yeah, they don't use it for some reason.
<rneese> ok
ldevulder has joined #riscv
<rneese> do you have the uEnv.txt for the board or does it not use one
<drmpeg> Doesn't use one.
<rneese> ok
<rneese> we are waiting on a board thats being loaned to us
<rneese> for dev to make sure it works
<rneese> so your using opensbi/u-boot on spi
<rneese> what are your ext src lines
<drmpeg> Yes.
<rneese> SRC_EXTLINUX="yes"
<rneese> SRC_CMDLINE="console=ttyS0,115200n8 console=tty0 earlycon=sbi rootflags=data=writeback"
<rneese> look ok to you
<drmpeg> Let me check.
juliadev has joined #riscv
<rneese> stepping away back in 5
<rneese> back
<rneese> append root=UUID=7759b6db-f695-4b9e-885a-ec08d1311011 console=ttyS0,115200n8 console=tty0 earlycon=sbi rootflags=data=writeback rw no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 splash plymouth.ignore-serial-consoles
<rneese> thats the append we use
<rneese> just hoping it works with your
<drmpeg> It's not that complex. It's just:
<drmpeg> append root=/dev/nvme0n1p1 ro earlycon
<rneese> ok
<rneese> so your not putting out to a serial console
<drmpeg> It does have a console.
EchelonX has joined #riscv
<rneese> ok
<drmpeg> I think your best bet would be to load Ubuntu when you get your board.
<drmpeg> Then you can explore the gory details.
<rneese> ok
<rneese> thanks
<rneese> check back when I get back from pt
Kedleston_ has joined #riscv
Kedleston has quit [Ping timeout: 256 seconds]
Kedleston_ is now known as Kedleston
prabhakarlad has quit [Quit: Client closed]
juliadev9 has joined #riscv
juliadev has quit [Ping timeout: 260 seconds]
juliadev9 is now known as juliadev
smaeul has joined #riscv
<bjdooks> anyone here planning on Embedded World?
bauruine has quit [Remote host closed the connection]
Trifton has quit [Ping timeout: 252 seconds]
aerkiaga has joined #riscv
<drewfustini> Is this the right link for patchwork?
<palmer> drewfustini: I think so
<palmer> oh, no it's not
<drewfustini> Oh nm, found the right one
<drewfustini> Thanks
billchenchina has joined #riscv
<bjdooks> oh great, opensbi doesn't seem to want to build for PLATFORM=generic
<bjdooks> (.data+0x30): undefined reference to `_fw_rw_start'
<jrtc27> that's meant to come from firmware/fw_base.ldS
<bjdooks> jrtc27: building the elf file it doesn't look like it is using the linker scripts
<bjdooks> ah, it uses build/platform/generic/firmware/fw_dynamic.elf.ld
<jrtc27> deps-y+=$(firmware-elfs-path-y:.bin=.dep)
<jrtc27> probably needeD?
<rneese> building a test img
<rneese> just to see it build
<rneese> next issue is I need a printenv of a system not booted with a drive
<rneese> I need the default env settings to see if we have to patch the env
<rneese> because we use the 1st partition
<bjdooks> yeah, and maybe cleaning up post
<rneese> single partition
<bjdooks> jrtc27: do you want to fix that?
<jrtc27> I don't know if it works
<jrtc27> also uh s/.bin/.elf/ ..
<jrtc27> I guess I could easily test it...
* bjdooks has meetings for the rest of today so isn't in a position to do muc
<jrtc27> hm firmware-objs-path-y is already there...
<bjdooks> touch firmware/fw_base.ldS
<bjdooks> ben@rainbowdash:~/si001/opensbi-qemu$ make PLATFORM=generic
<bjdooks> make: Nothing to be done for 'all'.
<rneese> make clean
<bjdooks> something's not quite working there
<rneese> and retry
TMM_ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
TMM_ has joined #riscv
<jrtc27> right, I see
<jrtc27> you have fw_foo.S -> fw_foo.o and fw_foo.elf
<drmpeg> I don't think make clean works.
<drmpeg> Try deleting the build directory.
<drmpeg> or re-clone.
<drmpeg> It builds fine here.
jmdaemon has joined #riscv
<bjdooks> yeah, make clean doesn't clean it either
<rneese> if one of you has a unmatched that can boot and get a printenv and post it later let me know
<rneese> thanks ahead of time
<drewfustini> Whose coming to fosdem?
<drewfustini> I get in on Thursday afternoon. I think RISC-V isn't until Sunday so it would be fun if anyone wants to meetup sometime on Friday or Saturday.
<bjdooks> drewfustini: i'll be there friday afternoon
<bjdooks> I just printed my plane tickets
<another|> printing! I knew I forgot something
<drewfustini> Cool. I'll ping you
<rneese> ?
<rneese> what am I missing
<rneese> Hey Drew
<drewfustini> Fosdem is in Brussels this weekend and there is RISC-V devroom with presentations
<bjdooks> (other tracks are available)
<bjoto> Oh, I'll be there as well (->Fri ~20.00, <-Sun ~20.00)
<drewfustini> Great!
<rneese> will it be avaible online ? I want to hear and see the riscv part
<drewfustini> I think it will all be streamed live
<drewfustini> I will drop a link when I see it
<rneese> ok
<drewfustini> It's not convenient for the Americas to get there physically but the neat thing is the conference is free of cost for attendees. It's hosted at a university
<rneese> ahh ok
<bjdooks> that reminds me to check if EOSS is open yet
<rneese> yeah <. poor american dev
<drewfustini> The downside is that it would get pretty crowded but it is nice that there is no financial barrier
<rneese> I just wish my vf2 would get here and the unmatched
<drewfustini> CFP is open for EOSS
<drewfustini> (Embedded Open Source Summit in Prague in June)
prabhakarlad has joined #riscv
BootLayer has quit [Quit: Leaving]
jmdaemon has quit [Ping timeout: 260 seconds]
billchenchina has quit [Quit: Leaving]
billchenchina has joined #riscv
motherfsck has joined #riscv
Stat_headcrabed has joined #riscv
Stat_headcrabed has quit [Client Quit]
Forty-Bot has quit [Ping timeout: 268 seconds]
jones-drew has joined #riscv
jones-drew is now known as drewj
pedja has joined #riscv
<drewj> Looks like libera.chat's irc webui is pretty good, so I've opened another tab (next to the slack tab I already have). Hopefully if/when you ping, I'll see it!
<rneese> slack
<rneese> is riscv on slax=ck
<rneese> or just other channels
<rneese> I do wish you all would join the discord if your on slack
<rneese> we have a riscv channel
vagrantc has joined #riscv
jmdaemon has joined #riscv
<jedix> does matrix speak slack yet?
<jedix> I think it does discord
<jedix> but I just use irc
BootLayer has joined #riscv
<jedix> I'm more of a lerker than an active contributor anyways. I just make nommu worse from time to time
Marco has joined #riscv
<muurkha> heh
<bjdooks> jrtc27: thanks
<Marco> Hi, while checking the kernel Kconfig I stumbled above the KBUILD_CFLAG/AFLAG handling. Is there a reason for not having the "fd" extension within the cflags?
<Marco> By Kconfig I mean the Makefile ^^
<conchuod> drewj: I've been doing my head in looking for this dependancy detection code. Maybe it isn't in b4 after all, and is somewhere else, but I'll find it
<conchuod> Marco: from the commit that added that line:"Note that the CFLAGS should not contain "fd" before we have mechnisms like kernel_fpu_begin/end in other architectures."
<Marco> conchuod: That was to easy, just followed the diff.. Thanks a lot.
prabhakarlad has quit [Quit: Client closed]
Forty-Bot has joined #riscv
Marco has quit [Quit: Client closed]
<drewj> conchuod: I just skimmed patchew (https://github.com/patchew-project/patchew), but it doesn't appear to handle deps either
<conchuod> I must have been delirious, I can even picture the comments around the feature in my head..
jmdaemon has quit [Ping timeout: 248 seconds]
junaid_ has joined #riscv
<conchuod> drewj: I think I was staring *right* at the code without realising it.
<rneese> ok well our builder just built for unmatched. so we have a start but I need the printenv so I can see if it will boot right
<conchuod> I was thinking of something simple like the "relaxed" thing there that pulls a message-id, and shouldn't be too hard to cram in a `b4 shazam` type call
<conchuod> Alternatively, make it be depends on: <patchwork series link> and I can just do call "git pw series apply" on that
<drewj> conchuod: yeah, starting with patchwork links would probably be easiest and then it should be possible to add a message-id -> patchwork series helper too in order to give more flexibility
<bjdooks> could patchwork auto aplly a series to a branch and push it somewhere?
<conchuod> Not as things are, but I figure you can hack it to do something like that
<conchuod> Not really sure what the benefit of that is though
<drewj> conchuod: need to make sure that patchwork links that point to older versions are still valid though. If a new version supersedes and old version, then CI may still fail to apply the patches
<conchuod> Which of course b4 & a message-id would handle more neatly than
<conchuod> patchwork *message* links, lore links and message-ids would all be valid then
drewj has quit [Quit: Client closed]
<conchuod> drewj: I have an idea of how this would be done, but will probably be the other side of the bank holiday weekend that I actually anything about it
EchelonX has quit [Quit: Leaving]
<conchuod> actually do anything*
vgtw has joined #riscv
enoq has quit [Quit: enoq]
<rneese> ok ummatched people
<rneese> do most of you put the uboot in spi or on the sd card
<rneese> going by this there is 2 ways to use this board
<jrtc27> why does it matter?
<jrtc27> it behaves the same
<rneese> but the issue is knowing if to use uboot on the sd card or if you all use spi/ubppot in the spi
Andre_H has joined #riscv
<jrtc27> spi is better for most people, means you don't even need an sd card
<rneese> yeah
<jrtc27> why do you care?
<jrtc27> you don't need to know where uboot is
<rneese> if we have to put the uboot on the sd card we do
<rneese> is the uboot is in the spi we dont worry about it
<jrtc27> not if you produce usb images
<jrtc27> sd cards suck
<rneese> the other issue is we use a single ext4 partiton we dont use dos /boot ext4/btrfs /root
<rneese> we have 1 partiton like mmc0:1
<rneese> and it has the boot and root on it
<rneese> so we also have to figure the fix on un matched for it
<rneese> just like we did with starfive
davidlt has quit [Ping timeout: 268 seconds]
<rneese> ok well will figure thi sout when the loaner. gets here sometime next week
prabhakarlad has joined #riscv
Noisytoot has quit [Remote host closed the connection]
Noisytoot has joined #riscv
Trifton has joined #riscv
juliadev has quit [Quit: Ping timeout (120 seconds)]
jmdaemon has joined #riscv
* urs notes: compiling LLVM in a humble 4-core qemu riscv vm takes quite a while. (No, I will not crosscompile, for no good reason.)
juliadev has joined #riscv
<muurkha> urs: bravo!
vgtw has quit [Ping timeout: 268 seconds]
vgtw has joined #riscv
junaid_ has quit [Ping timeout: 264 seconds]
<sevan> urs: I need to setup a VM to spare this D1 based Lichee RV board.
junaid_ has joined #riscv
BootLayer has quit [Quit: Leaving]
wingsorc has quit [Ping timeout: 252 seconds]
___nick___ has quit [Ping timeout: 252 seconds]
vgtw has quit [Quit: ZNC - https://znc.in]
aredridel has quit [Read error: Connection reset by peer]
aredridel has joined #riscv
junaid_ has quit [Remote host closed the connection]
<conchuod> palmer: did I misunderstand, or did you say in the call today that one of the rivos people is gonna take up your hwcap series?
___nick___ has joined #riscv
vgtw has joined #riscv
vgtw has quit [Client Quit]
Trifton has quit [Ping timeout: 260 seconds]
vagrantc has quit [Ping timeout: 248 seconds]
vagrantc has joined #riscv
indy has quit [Ping timeout: 246 seconds]
wingsorc has joined #riscv
pabs3 has quit [Quit: Don't rest until all the world is paved in moss and greenery.]
indy has joined #riscv
pabs3 has joined #riscv
Andre_H has quit [Ping timeout: 248 seconds]
aerkiaga has quit [Remote host closed the connection]
vineetg762 has joined #riscv
vineetg762 has quit [Client Quit]
vineetg762 has joined #riscv
craigo_ has quit [Ping timeout: 252 seconds]
pedja has quit [Quit: Leaving]
vineetg762 has left #riscv [#riscv]
vineetg762 has joined #riscv
vineetg762 has left #riscv [#riscv]
freakazoid332 has joined #riscv
frkzoid has quit [Ping timeout: 255 seconds]