sorear changed the topic of #riscv to: RISC-V instruction set architecture | https://riscv.org | Logs: https://libera.irclog.whitequark.org/riscv
Ivii has joined #riscv
pecastro has quit [Ping timeout: 250 seconds]
<somlo> jrtc27: somewhat off on a tangent, but still related to opensbi: is F and D emulation supported (as per bottom of https://github.com/riscv-software-src/opensbi/blob/master/docs/platform_requirements.md) or not (as per this comment from Anup: https://github.com/riscv-software-src/opensbi/issues/148#issuecomment-568916676)? It's not an issue for nexys4ddr (where I can fit an fpu in gateware), but that leaves ecp5 behind (there's no room for a gateware
<somlo> FPU on ecp5)
<somlo> my initial informed guess (based on grepping through the sources) is the second one (no emulation), but I might be missing something elementary :)
<somlo> (in which case the platform_requirements.md document should probably be reworded a bit for clarification...
<jrtc27> no emulation, and it never should have existed in bbl
frost has joined #riscv
<jrtc27> if your hardware doesn't have an FPU, don't build a software stack that assumes there is one
<somlo> jrtc27: then platform_requirements.txt is needlessly "teasing" uninformed n00bs about the possibility :)
<jrtc27> no, it's just saying that you build the firmware as rv64ima(c) and if there's an FPU then it'll work
<somlo> and if my hardware doesn't have an FPU, it'd still be nice to run someone *else's* software stack that assumes stuff, so I mildly disagree with your hard-line stance :D
<jrtc27> who else is emulating an FPU in privileged firmware?
<jrtc27> you can't take code that uses SSE and run it on an early 386
<jrtc27> at that point just use qemu, it'll be faster anyway...
<somlo> my (admittedly pretty far out there on the fringe) use case doesn't prioritize raw speed -- rather, ability to self-host the entire stack
<somlo> but being fringe and "out there", I can always carry around some out-of-tree patches for fpu emulation (at some point in the future, if/when I get the my head wrapped around the rest of opensbi)
<somlo> so, IMHO, it was quite nice of the BBL folks to allow FD emulation, whether or not that's now considered to be "in poor taste" :D
Ivii has quit [Remote host closed the connection]
hexteex has quit [Remote host closed the connection]
jacklsw has joined #riscv
freakazoid343 has joined #riscv
<dh`> from an OS perspective I'd say that FPU emulation is nice in some cases but usually userlevel softfloat is going to be faster
<dh`> (as well as less likely to stuff up the machine by having bugs in machine-mode code)
freakazoid12345 has quit [Ping timeout: 240 seconds]
<dh`> so basically it boils down to: it would be great to have an off-the-shelf softfloat library; and it's up to the OS to handle its configuration management such that it can have hardfloat and softfloat installs that don't get mixed up with each other
<dh`> this is something OSes are bad at (because it's expensive to have lots of userland builds and they proliferate rapidly)
<dh`> but it's the Right Way (TM)
<sorear> alternatively the mips(?) approach where the kernel hotpatches fp instructions in user binaries *hides*
indy has quit [Quit: ZNC 1.8.2 - https://znc.in]
indy has joined #riscv
indy has quit [Client Quit]
indy has joined #riscv
indy has quit [Ping timeout: 244 seconds]
indy has joined #riscv
indy has quit [Ping timeout: 240 seconds]
indy has joined #riscv
<dh`> heh
<dh`> you could imagine doing that in a more principled way with dynamic linker relocations
<dh`> but nobody wants to incur text relocations
<sorear> unfortunately now you need a list of them in your relocation table
<dh`> that's what relocation tables are for
<dh`> anyway the _correct_ answer for this is probably the U extension if it ever comes back
<dh`> catch no-such-fpu traps and send them to the softfloat library
<dh`> but I guess doing that well would require distinguishing fpu traps in a way the spec doesn't
_koolazer is now known as koolazer
mahmutov has quit [Ping timeout: 240 seconds]
riff-IRC has quit [Quit: PROTO-IRC v0.73a (C) 1988 NetSoft - Built on 11-13-1988 on AT&T System V]
riff-IRC has joined #riscv
PyroPeter has quit [Ping timeout: 260 seconds]
frost has quit [*.net *.split]
foton has quit [*.net *.split]
abelvesa has quit [*.net *.split]
TMM_ has quit [*.net *.split]
scruffyfurn has quit [*.net *.split]
mithro has quit [*.net *.split]
wolfshappen has quit [*.net *.split]
jellydonut has quit [*.net *.split]
foton has joined #riscv
wolfshappen has joined #riscv
mithro has joined #riscv
TMM_ has joined #riscv
abelvesa has joined #riscv
scruffyfurn has joined #riscv
frost has joined #riscv
jellydonut has joined #riscv
PyroPeter has joined #riscv
wolfshappen has quit [Max SendQ exceeded]
wolfshappen has joined #riscv
BOKALDO has joined #riscv
jimwilson_ has quit [Remote host closed the connection]
drmpeg has quit [Ping timeout: 264 seconds]
riff-IRC has quit [Remote host closed the connection]
riff-IRC has joined #riscv
frost has quit [Ping timeout: 244 seconds]
drmpeg has joined #riscv
jimwilson has joined #riscv
TMM_ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
TMM_ has joined #riscv
voltron has joined #riscv
voltron has quit [Remote host closed the connection]
winterflaw has joined #riscv
mthall has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
mthall has joined #riscv
freakazoid12345 has joined #riscv
freakazoid343 has quit [Ping timeout: 240 seconds]
pecastro has joined #riscv
hexteex has joined #riscv
jacklsw has quit [Quit: Back to the real world]
BOKALDO has quit [Quit: Leaving]
mthall has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
mthall has joined #riscv
hexteex has quit [Ping timeout: 276 seconds]
hexteex has joined #riscv
BOKALDO has joined #riscv
peepsalot has joined #riscv
freakazoid12345 has quit [Read error: Connection reset by peer]
freakazoid12345 has joined #riscv
hexteex has quit [Remote host closed the connection]
freakazoid343 has joined #riscv
hexteex has joined #riscv
freakazoid12345 has quit [Ping timeout: 240 seconds]
freakazoid343 has quit [Read error: Connection reset by peer]
freakazoid343 has joined #riscv
nun has quit [Ping timeout: 256 seconds]
BOKALDO has quit [Quit: Leaving]
jellydonut has quit [Quit: jellydonut]
jellydonut has joined #riscv
awordnot has quit [Ping timeout: 245 seconds]
drmpeg has quit [Ping timeout: 268 seconds]
RNeese has joined #riscv
BOKALDO has joined #riscv
drmpeg has joined #riscv
aredridel has quit [Quit: Ping timeout (120 seconds)]
aredridel has joined #riscv
aredridel has quit [Quit: Ping timeout (120 seconds)]
aredridel has joined #riscv
awordnot has joined #riscv
jacklsw has joined #riscv
winterflaw has quit [Ping timeout: 276 seconds]
TMM_ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
TMM_ has joined #riscv
hexteex has quit [Remote host closed the connection]
X-Scale has quit [Ping timeout: 240 seconds]
hexteex has joined #riscv
X-Scale` has joined #riscv
X-Scale` is now known as X-Scale
Andre_H has joined #riscv
jellydonut has quit [Quit: jellydonut]
jellydonut has joined #riscv
jack_lsw has joined #riscv
jacklsw has quit [Ping timeout: 264 seconds]
jack_lsw has quit [Quit: Back to the real life]
jacklsw has joined #riscv
freakazoid12345 has joined #riscv
freakazoid343 has quit [Ping timeout: 250 seconds]
___nick___ has joined #riscv
___nick___ has quit [Client Quit]
___nick___ has joined #riscv
Noisytoot has quit [Ping timeout: 256 seconds]
winterflaw has joined #riscv
jacklsw has quit [Quit: Back to the real life]
Noisytoot has joined #riscv
nvmd has quit [Quit: Later, nerds.]
X-Scale has quit [Ping timeout: 256 seconds]
X-Scale` has joined #riscv
X-Scale` is now known as X-Scale
<RNeese> so guys are you working with certain boards ?
<RNeese> also he have riscv on discord for those who want to come help out
<RNeese> I am working on a new build tool and a config tool for riscv
<RNeese> but will need some help as I go
nvmd has joined #riscv
nvmd has quit [Client Quit]
nvmd has joined #riscv
freakazoid12345 has quit [Read error: Connection reset by peer]
freakazoid12345 has joined #riscv
EchelonX has joined #riscv
mahmutov has joined #riscv
lkronnus has quit [Quit: Konversation terminated!]
lkronnus has joined #riscv
BOKALDO has quit [Quit: Leaving]
riff_IRC has joined #riscv
grubman9001 has joined #riscv
ln5_ has joined #riscv
zapb_ has joined #riscv
sorear_ has joined #riscv
mcfrd has joined #riscv
__nick__ has joined #riscv
edf0_ has joined #riscv
wigyori_ has joined #riscv
reda_ has joined #riscv
avoidr_ has joined #riscv
pecastro_ has joined #riscv
marcj- has joined #riscv
___nick___ has quit [*.net *.split]
pecastro has quit [*.net *.split]
riff-IRC has quit [*.net *.split]
mcfrdy has quit [*.net *.split]
edf0 has quit [*.net *.split]
kgz has quit [*.net *.split]
reda has quit [*.net *.split]
wigyori has quit [*.net *.split]
sorear has quit [*.net *.split]
grubman9000 has quit [*.net *.split]
marcj has quit [*.net *.split]
avoidr has quit [*.net *.split]
koolazer has quit [*.net *.split]
zapb__ has quit [*.net *.split]
cs_0x6373 has quit [*.net *.split]
ln5 has quit [*.net *.split]
djdelorie has quit [*.net *.split]
mcfrd is now known as mcfrdy
sorear_ is now known as sorear
__nick__ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
cs_0x6373 has joined #riscv
___nick___ has joined #riscv
___nick___ has joined #riscv
koolazer has joined #riscv
djdelorie has joined #riscv
kgz has joined #riscv
shicz2 has quit [Ping timeout: 240 seconds]
shicz2 has joined #riscv
mahmutov_ has joined #riscv
mahmutov has quit [Ping timeout: 246 seconds]
cousteau has joined #riscv
___nick___ has quit [Ping timeout: 268 seconds]
avoidr_ is now known as avoidr
hexteex has quit [Ping timeout: 276 seconds]
lkronnus has quit [Read error: Connection reset by peer]
Andre_H has quit [Ping timeout: 264 seconds]
cousteau has quit [Quit: ♫ I can't forget the day I shot that network down ♫]
winterflaw has quit [Ping timeout: 276 seconds]
Andre_H has joined #riscv
Andre_H has quit [Client Quit]
<somlo> jrtc27: so I took your advice and wrote a liteuart driver for opensbi: https://github.com/litex-hub/opensbi/commit/70f4d95c4b6a3e0772b69177d764dad0dc5ca340
<somlo> then I built a single payload containing both kernel and fdt (just like I am doing with bbl): `make CROSS_COMPILE=riscv64-unknown-linux-gnu- PLATFORM=generic FW_PAYLOAD_PATH=~/linux/arch/riscv/boot/Image FW_FDT_PATH=~/litex_dts/nexys4ddr_fpu.dts`
<somlo> the resulting `fw_payload.bin` (renamed as `boot.bin`) loads via tftp to the nexys4ddr (bitstream built with a single fpu-capable 64-bit rocket chip), and ... cricets
<somlo> luckily, I have an LED "device" and I can write values to it that then show up in the LED configuration, so I can have low-bit-width "debugging printf's" :D
<somlo> It hangs somewhere *after* `_start` in fw_base.S, and definitely before trying to locate the liteuart in `lib/utils/serial/fdt_serial.c`.
<somlo> So my platform probably is a bit less "generic" than I would have preferred...
<dh`> welcome to kernel debugging :-)
<somlo> At least I have a way to print out 16 bit debug codes to determine whether it made it to a certain spot in the source code or not -- at least it's not boring :)
<dh`> yeah that's the basic process...
<jrtc27> rocket has a debug module implementation, I suggest you use it
<somlo> dh`: this is way before the kernel would even come into play -- I get to output blinkenlight binary codes to determine how far through the sources I've made it, so it's more like the late 60s or something ;P
<somlo> jrtc27: yeah, it'
<somlo> it's probably time I took that detour, figuring out how to use the rocket debug module
<jrtc27> hook it up to jtag, point openocd at it and attach gdb
<somlo> always felt like figuring that out is its own project worth of work, so I've been putting it off :)
RNeese has left #riscv [#riscv]
RNeese has joined #riscv
<somlo> jrtc27: then there's the whole of LiteX wrapped all around Rocket, so I need to figure out how that comes into play (or not, whatever)
<jrtc27> WithJtagDTM(System)
<somlo> I mean, I need to somehow connect rocket's debug signals to something that eventually travels over usb to openocd running on my host.
<jrtc27> don't know why both exist, maybe just a public/private interface thing
<jrtc27> FPGAs normally have IP that deal with JTAG for you
<jrtc27> you just create a block connected to the wires and it handles all that for you
<somlo> jrtc27: that's the part I'm (very) unfamiliar with, plus how it may or may not interfere/interact with the rest of LiteX -- the "it's a whole 'nother project" part, at least for me ;)
<somlo> but yeah, I'm getting to where that's on my critical path...
<RNeese> what riscv boards are you guys playing with ?
<RNeese> or are you using vm
<jrtc27> alternatively, simulate it?
<somlo> something something about "granting me the serenity to learn the things I can't avoid, stay blissfully ignorant about everything else, and the wisdom to know the difference" :D :D
<jrtc27> if it's early opensbi boot, shoving it all through verilator is presumably not too atrociously slow
<somlo> jrtc27: that (verilator) might definitely be the path of least resistance
<somlo> I think there's a way to "side-load" stuff into the simulated RAM, so I don't have to wait the couple of hours it would take to simulate a 15MB file transfer over "tftp" :D
<somlo> so I'll try that first. But it definitely bothers me that I'm scared of the jtag debugging thing, so I might set aside a few hours/days/weeks to force myself and go through it once...
<jrtc27> there's also the lazy option of hooking up external pmod/gpio/whatever pins you have on this board directly to rocket's jtag
<somlo> huh, it would definitely have the advantage of reducing one's cognitive load -- have a separate cable, know where the wires are going, avoid fighting the rest of the SoC and its own ideas about trying to help you do jtag debugging, etc.
lkronnus has joined #riscv