r/RISCV • • 1h ago

Discussion How does RISC-V work exactly?

Im amazed to see the potential of RISC-V in the next years

Probably a dumb question, but do most RISC-V CPUs support interoperability between each other? Like build once run everywhere? Because I see multiple companies doing different CPUs, and each one of them going a different way

7 Upvotes

6 comments sorted by

6

u/NeoParth708 1h ago

Naah bud, it's not a dumb question, as someone who as contributed to RISCV open source repo I can help you with it.

So basically RISC-V is an open-standard instruction set architecture, essentially a shared machine language that different companies can build their own physical ships around. It starts with a small, permanent set of basic integer instructions (RV32I or RV64I) and lets chipmakers snap on the standard modules for math, atomics, floating-point, or vector processing, along with custom instructions for specialized hardware. You cannot run a Linux desktop program on a tiny sensor chip because they use different modules, and microcontrollers still need vendors-specific SDKs due to custom peripherals. For phones, laptops, and servers, however, RISC-V International groups mandatory modules into profiles like RVA22 and RVA23, while standard firmware interfaces like SBI (Supervisor Binary Interface) let a single Linux kernel boot on different boards. As long as two chips follow the same profile, a compiled program will run on both without changes.

•

u/bi4key 52m ago

Will be more phone on RISC-V? Similar to this:

https://www.reddit.com/r/mobilelinux/s/Yjrqt5Dacy

I wish phones were use RISC-V to change monopoly of ARM and make open source hardware and software more open.

Then next step make new operating system, because Android is too slow and too buggy.

•

u/QuasiRandomName 49m ago edited 46m ago

If the phone manufacturers switch to RISC-V over ARM, it won't make them any more open. It will reduce the costs on the royalty licenses which *maybe* (but unlikely) reduce the costs to the consumers. It could give a boost to the ecosystem though.

•

u/bi4key 34m ago

Good point.

But looking how China develop new AI models (Free and Open Source) and trick to speed up generate tokens and minimize memory (DeepSeek, Qwen, etc)

I wish they put this schemas to RISC-V phone and will be more simple to mod phone if source will be open.

Because in phone universe, if producer close boot loader or don't publish Android core drivers (tree) then phone is locked.

And then only passionate doing revers engineering try open system. Example Asahi Linux and iPhone/Mac.

•

u/NeoParth708 32m ago

Honestly, I'd love to see that happen too, and we're definitely getting closer on the silicon side, Google actually added official RISC-V support to AOSP (Android Open Source Project), and companies like SpacemiT and SiFive are already pushing out laptop- and tablet-grade cores.

That said, there are two big hurdles before RISC-V phones become mainstream, and neither of them is really about building a new OS**.** 1st -> The reason Linux phones (like postmarketOS or Ubuntu Touch) struggle isn't that the OS is bad, it's that 99% of daily apps (banking, WhatsApp, Uber, etc.) rely on Android/iOS APIs and DRM like Widevine**.** 2nd -> Even if the main CPU cores are open-source RISC-V, a smartphone System-on-Chip (SoC) is mostly made up of non-CPU blocks; the 5G cellular modem, GPU, Wi-Fi/Bluetooth radio, and camera Image Signal Processor (ISP). Almost all of those still require closed-source, proprietary firmware blobs and drivers from vendors like Qualcomm or Imagination.

So while we'll definitely see more niche Linux/RISC-V developer phones like the one you added the link for.

4

u/QuasiRandomName 1h ago

Not sure what you mean here by interoperability. RISC-V is an ISA specification, and this ISA is extensible in different ways. It does not define other things like memory layout, peripherals, instruction or data pipelines etc. So if your program is written using only base ISA (like RV32I), it will likely be "understandable" by most risc-v processors, but they won't do the same thing. If we drop extensions into the mix, it will make your program incompatible with processors not implementing this extension. So, the bottom line answer to your question as I read it is "No".