sorear changed the topic of #riscv to: RISC-V instruction set architecture | https://riscv.org | Logs: https://libera.irclog.whitequark.org/riscv
<somlo> jrtc27: litex-specific configurations of Rocket: https://github.com/chipsalliance/rocket-chip/compare/master...gsomlo:gls-litex
<jrtc27> you likely don't want it in .bss given you're bare metal and nothing's preinitialised that
<jrtc27> smp_ap_ready at least needs to be .data
<jrtc27> others could be .bss
<somlo> jrtc27: DTS file for quad-core: https://hastebin.com/lutozomiwo.xml
<somlo> jrtc27: finally, boot output from linux: https://hastebin.com/parupaxezo.yaml
<jrtc27> (to explain, the APs will hit smp_ap_loop and immediately read smp_ap_ready before the BSP gets round to zeroing out bss)
<somlo> this, while theoretically a race, ensures that everyone spins on that while the boot core does its thing, before finally writing a 1 there to let everyone know it's safe to jump into bbl
<somlo> so that's probably *not* the part that's stopping it from working...
<jrtc27> yeah that's wrong but hard to lose that race
<jrtc27> putting the variable in .data is the correct way to do that
<jrtc27> to me it looks like you might just not have built your kernel as SMP
<somlo> jrtc27: now *that* would be stupid on my part, and entirely possible :D
<somlo> let me check and make sure
<jrtc27> "Invalid cpuid for hartid" means riscv_hartid_to_cpuid returned < 0 but, unless you've managed to get negative cpuids from somewhere, that will give an error in the implementation of riscv_hartid_to_cpuid when it fails to find a hart
<jrtc27> *except* for UP kernels where there's a different simpler stub
<somlo> not sure if smp is on or off by default
<somlo> probably off... which would explain why it isn't working... D'oh!
<somlo> thanks for the sanity check, gotta go compile a smp kernel :)
<jrtc27> arch/riscv/Kconfig doesn't have a default for it, so I assume it defaults to n
<jrtc27> though NR_CPUS does default to 8 and depends on SMP
<somlo> from the actual .config: "# CONFIG_SMP is not set"
<somlo> ok, that settles it, I'm an idiot :D
<jrtc27> I mean the linux config system isn't the most helpful, way too many options that don't have sensible defaults
arlen_ has quit [Ping timeout: 252 seconds]
<jrtc27> and a "this is a UP kernel but it looks like you have more than one core" warning during boot wouldn't go amiss
arlen has joined #riscv
<somlo> thanks again jrtc27!
jacklsw has joined #riscv
gioyik has quit [Ping timeout: 276 seconds]
rvalles has joined #riscv
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
___nick___ has joined #riscv
gioyik has joined #riscv
gioyik has quit [Ping timeout: 276 seconds]
vagrantc has quit [Quit: leaving]
[itchyjunk] has joined #riscv
compscipunk has quit [Quit: WeeChat 3.3]
gioyik has joined #riscv
PyroPeter has quit [Ping timeout: 260 seconds]
PyroPeter has joined #riscv
freakazoid12345 has joined #riscv
freakazoid343 has quit [Ping timeout: 264 seconds]
[itchyjunk] has quit [Remote host closed the connection]
gioyik has quit [Ping timeout: 276 seconds]
solrize has joined #riscv
<solrize>
<solrize> Arm AArch64 Adds Memcpy() Instructions (arm.com)
peepsalot has quit [Ping timeout: 246 seconds]
peepsalot has joined #riscv
riff-IRC has quit [Remote host closed the connection]
arlen_ has joined #riscv
arlen has quit [Ping timeout: 252 seconds]
riff-IRC has joined #riscv
gioyik has joined #riscv
gioyik has quit [Ping timeout: 276 seconds]
<geist> haha cute
TMM_ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
TMM_ has joined #riscv
bgamari_ has joined #riscv
bgamari has quit [Ping timeout: 260 seconds]
winterflaw has joined #riscv
<solrize> i like the FISC formulation
<sorear> it's not a terrible formulation but the entire thread ignores that that's what risc-v has been doing the entire time through the extensions system
<sorear> once again, the biggest mistake was calling it "risc" because people think they know what that means based on oversimplified explanations of 1980s market trends
<sorear> (arguably it is what ALL "risc"s have been doing since the beginning)
<solrize> bah x86 extensions are a huge mess even when they're only coming from one vendor. come up with 3 or so profiles and be done with it
BOKALDO has joined #riscv
<sorear> it'd be nice but I think there's a natural equilibrium here, you have an N billion dollar market and people spend N/k billion on inventing incompatible micro-optimizations for small k :(
<drmpeg> Heh, when I moved from 8080 to 8086, I thought that REP MOVSB (and MOVSW) was the best instruction ever invented.
<drmpeg> That was when I lived in Bedrock and drove a foot powered car with two stone wheels.
<sorear> would it have been that difficult for them to make it 2 bus cycles per byte copied?
<sorear> /weird extremely retrospective wondering
BOKALDO has quit [Quit: Leaving]
gioyik has joined #riscv
valentin has joined #riscv
hendursa1 has joined #riscv
gioyik has quit [Ping timeout: 276 seconds]
hendursaga has quit [Ping timeout: 276 seconds]
geertu has quit [Read error: Connection reset by peer]
geertu has joined #riscv
pehaef has joined #riscv
jack_lsw has joined #riscv
jacklsw has quit [Ping timeout: 264 seconds]
jack_lsw has quit [Read error: Connection reset by peer]
smartin has joined #riscv
geertu has quit [Quit: reboot]
pehaef has quit [Quit: leaving]
geertu has joined #riscv
ntwk has quit [Quit: ntwk]
ntwk has joined #riscv
winterflaw has quit [Ping timeout: 276 seconds]
winterflaw has joined #riscv
ntwk has quit [Quit: ntwk]
ntwk has joined #riscv
BOKALDO has joined #riscv
arlen_ has quit [Ping timeout: 252 seconds]
[itchyjunk] has joined #riscv
arlen has joined #riscv
ntwk has quit [Quit: ntwk]
ntwk has joined #riscv
zumbi has quit [Ping timeout: 260 seconds]
ntwk has quit [Quit: ntwk]
jwillikers has joined #riscv
jacklsw has joined #riscv
jacklsw has quit [Client Quit]
gioyik has joined #riscv
nvmd has quit [Ping timeout: 252 seconds]
nvmd has joined #riscv
jacklsw has joined #riscv
ntwk has joined #riscv
tux3 has quit [Remote host closed the connection]
tux3 has joined #riscv
tux3 has joined #riscv
tux3 has quit [Changing host]
marcj has quit [Ping timeout: 252 seconds]
zapb_ has quit [Ping timeout: 252 seconds]
cronos has quit [Ping timeout: 252 seconds]
cronos has joined #riscv
balrog_ has joined #riscv
dh` has quit [Ping timeout: 252 seconds]
kbingham has quit [Ping timeout: 252 seconds]
balrog has quit [Ping timeout: 252 seconds]
xentrac has quit [Ping timeout: 252 seconds]
zapb_ has joined #riscv
kbingham has joined #riscv
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #riscv
marcj has joined #riscv
gioyik has quit [Ping timeout: 276 seconds]
gioyik has joined #riscv
xentrac has joined #riscv
freakazoid343 has joined #riscv
freakazoid12345 has quit [Ping timeout: 268 seconds]
<rvalles> drmpeg: Imagine using a 68000 :P
<jemarch> I learned assembler with a 68000
<rvalles> I've only learned 8086's painfulness recently (optromloader).
<rvalles> it's pure suffering relative to m68k which is joy.
jwillikers has quit [Quit: jwillikers]
<rvalles> jemarch: :)
jwillikers has joined #riscv
gioyik has quit [Ping timeout: 276 seconds]
<rvalles> so few registers, some are 8/8 or 16, some are only 16. Then among these many groups of instructions are restricted to some register or another.
<rvalles> And then there's of course the madness which is segments.
<rvalles> that relative to the nice 32bit isa m68k had, with so many GPRs and address registers :)
<jemarch> the 68000 had very nice peripheral chips
<jemarch> the interrup controller
<drmpeg> Somehow I missed 68000. After 8086/186, I moved to i960.
<drmpeg> I also worked with a fully custom RISC chip at C-Cube Microsystems.
<drmpeg> It was a bizarre architecture with some 36-bit registers. The weirdest part was that the instruction cache had to me manually loaded.
<drmpeg> be manually loaded.
[itchyjunk] has quit [Read error: Connection reset by peer]
jamtorus has joined #riscv
<drmpeg> The C compiler (some early version of gcc) had a trap of some sort. When you fell of the beginning or end of the I-cache, it would load the next page.
<drmpeg> It was an MPEG-2 encoder chip. It took a dozen chips in parallel to do 720x480.
jellydonut has quit [Ping timeout: 252 seconds]
gioyik has joined #riscv
jamtorus is now known as jellydonut
gioyik has quit [Ping timeout: 276 seconds]
* gordonDrogon has avoided x86 and plans to continue to do so for ever...
<gordonDrogon> closest was 8085 ...
<gordonDrogon> never experienced 68K either but mostly because I never had a reason to back in it's day...
<gordonDrogon> i960? Interesting. I did a lot with the i860 and its dual instruction mode.
<drmpeg> Les Kohn (the designer of the i860) ended up at C-Cube. He transformed that 12 chip monster down to one chip.
<drmpeg> Using SPARC.
<geertu> gordonDrogon: i860 an i960 are totally different
* gordonDrogon nods. I know. so many different cpus from the same maker.
<drmpeg> I never got a chance to work with him. I consulted there from 1993 to 1995 and finally became an employee in 1999 (perfectly bracketing his time there).
<gordonDrogon> I liked sparc though - we used the i860 more or less as a stop-gap before developing a sparc system.
gioyik has joined #riscv
<pierce> How come this isn't more of a widespread issue?
<drmpeg> Ubuntu patches gcc to always include libatomic.
<drmpeg> Or Debian I guess.
gioyik has quit [Ping timeout: 276 seconds]
<jimwilson_> RISC-V is the only major gcc target that doesn't open code sub-word atomics, so is the only major target that requires -latomic, and I think most OSes have a workaround now to link with libatomic always
<rvalles> jemarch | the 68000 had very nice peripheral chips --> never played with the motorola peripherals, only the Amiga.
<rvalles> (incidentally, check out AmigaXfer if you own an Amiga)
TMM_ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
TMM_ has joined #riscv
<drmpeg> Actually, they're patching CMake to always include -latomic
<drmpeg> If you build CMake from source on Unmatched, you will have the libatomic problem.
gioyik has joined #riscv
gioyik has quit [Ping timeout: 276 seconds]
gioyik has joined #riscv
samekh has joined #riscv
jack_lsw has joined #riscv
jacklsw has quit [Ping timeout: 246 seconds]
samekh has left #riscv [#riscv]
jack_lsw has quit [Quit: Back to the real life]
jacklsw has joined #riscv
mahmutov has joined #riscv
jack_lsw has joined #riscv
jacklsw has quit [Ping timeout: 252 seconds]
jwillikers has quit [Quit: jwillikers]
jwillikers has joined #riscv
<jrtc27> only watching the LPC livestream on youtube but: correction - that *is* implemented, but only for LLVM
<jrtc27> as __attribute__((__target__())) maps directly to target features
<jrtc27> so you can already write __attribute__((__target__("v"))) with LLVM today (provided you use the integrated assembler, which side-steps the .option arch issue, and provided you have some way to actually determine whether to use that function or not)
cwebber has joined #riscv
jack_lsw has quit [Read error: Connection reset by peer]
smartin has quit [Quit: smartin]
<palmer1> sorry, I forgot LLVM had this -- and I guess there's too many chats going on
<jrtc27> I should perhaps have registered
<jrtc27> but oh well
gioyik has quit [Ping timeout: 276 seconds]
gioyik has joined #riscv
peeps[zen] has joined #riscv
yyp has joined #riscv
peepsalot has quit [Ping timeout: 264 seconds]
gioyik has quit [Ping timeout: 276 seconds]
gioyik has joined #riscv
winterflaw has quit [Ping timeout: 276 seconds]
<drewfustini_> For those interested in the RISC-V Microconference that happened to today at Linux Plumbers, here are my notes
<drewfustini_> Recording of live stream:
<drewfustini_> The sessions:
winterflaw has joined #riscv
gioyik has quit [Ping timeout: 276 seconds]
<yyp> Hi! Are there any good resources on virtual memory management on RISC-V from OS' perspective? The privileged specification was a bit unhelpful to me
<jrtc27> do you understand how paging and virtual memory work in general?
<jrtc27> ignoring the exact implementation details for a specific ISA like x86, AArch64 or RISC-V
X-Scale has quit [Ping timeout: 246 seconds]
<yyp> Somewhat
X-Scale` has joined #riscv
gioyik has joined #riscv
X-Scale` is now known as X-Scale
<yyp> I'm intereseted more in exact implementation details, like how do I get the root page or find a new one
jamtorus has joined #riscv
jellydonut has quit [Read error: Connection reset by peer]
<jrtc27> define "root page", "get" and "find a new one"
zjason` has joined #riscv
<jrtc27> because those all sound to me like things you tell the hardware about, not things the hardware tells you about
<jrtc27> all of which are also generally independent of the ISA
jamtorus is now known as jellydonut
zjason has quit [Ping timeout: 265 seconds]
<jrtc27> (you have a page allocator somewhere in your kernel that you allocate page table pages from, and you need space in your process info struct to store a pointer to the root of that process's page table so you can switch to it on context switch *anyway* so you just always look at that rather than getting the page number out of the hardware and reconstructing a pointer)
<jrtc27> so it feels to me like you still should be looking at higher-level details than "how it's done on RISC-V"
<jrtc27> as your question suggests you don't have a good grasp of that
<jrtc27> (and generally once one does have a good grasp of that, reading the privileged spec and mapping it onto the exact ISA features RISC-V provides is pretty straightforward)
gioyik has quit [Ping timeout: 276 seconds]
gioyik has joined #riscv
gioyik has quit [Ping timeout: 276 seconds]
jwillikers has quit [Quit: jwillikers]
jwillikers has joined #riscv
BOKALDO has quit [Quit: Leaving]
jwillikers has quit [Quit: jwillikers]
gioyik has joined #riscv
jwillikers has joined #riscv
Guest90 has joined #riscv
Guest90 has quit [Client Quit]
<yyp> Got it
yyp has left #riscv [#riscv]
jwillikers has quit [Quit: jwillikers]
jwillikers has joined #riscv
peeps[zen] is now known as peepsalot
gioyik has quit [Ping timeout: 276 seconds]
valentin has quit [Remote host closed the connection]
gioyik has joined #riscv
rlittl01 has joined #riscv
sauce has quit [Quit: sauce]
sauce has joined #riscv
freakazoid343 has quit [Read error: Connection reset by peer]
freakazoid343 has joined #riscv
winterflaw has quit [Ping timeout: 276 seconds]
xentrac has quit [Changing host]
xentrac has joined #riscv
[itchyjunk] has joined #riscv
balrog_ is now known as balrog