Slashdot Mirror


Linux Now Has its First Open Source RISC-V Processor (designnews.com)

"SiFive has declared that 2018 will be the year of RISC V Linux processors," writes Design News. An anonymous reader quotes their report: When it released its first open-source system on a chip, the Freeform Everywhere 310, last year, Silicon Valley startup SiFive was aiming to push the RISC-V architecture to transform the hardware industry in the way that Linux transformed the software industry. Now the company has delivered further on that promise with the release of the U54-MC Coreplex, the first RISC-V-based chip that supports Linux, Unix, and FreeBSD... This latest development has RISC-V enthusiasts particularly excited because now it opens up a whole new world of use cases for the architecture and paves the way for RISC-V processors to compete with ARM cores and similar offerings in the enterprise and consumer space...

"The U54 Coreplexes are great for companies looking to build SoC's around RISC-V," Andrew Waterman co-founder and chief engineer at SiFive, as well as the one of the co-creators of RISC-V, told Design News. "The forthcoming silicon is going to enable much better software development for RISC-V." Waterman said that, while SiFive had developed low-level software such as compilers for RISC-V the company really hopes that the open-source community will be taking a much broader role going forward and really pushing the technology forward. "No matter how big of a role we would want to have we can't make a dent," Waterman said. "But what we can do is make sure the army of engineers out there are empowered."

19 of 161 comments (clear)

  1. Well Done ! by johnjones · · Score: 2

    Quite an achievement !

    It always amazes me that governments dont invest in this level, for example the french military will avoid certain american tech but seem happy to pay an unauditable Intel corporation

    at least the European Space Agency made their own Sparc processor but I've seen little other investments made with public money that might actually benefit the public and be verifiable by outsiders...
                         

  2. Re:For those of us that don't know by TheRealMindChild · · Score: 4, Insightful

    What's the big advantage with RISC over ARM or x86

    Licensing costs

    --

    "When life gives you lemons, don't make lemonade. Make life take the lemons back!" -- Cave Johnson
  3. The bottom line by Neo-Rio-101 · · Score: 4, Interesting

    I think the big take-away that will drive the adoption of an open source CPU, is the fact that governments and corporations can be sure that there's no secret spying implemented within it.
    This presumes that you can trust whoever ends up making these CPUs based on the design.

    --
    READY.
    PRINT ""+-0
    1. Re:The bottom line by TheRaven64 · · Score: 2

      No they can't and the DARPA SSITH program (yes, DARPA sometimes names projects with Star Wars references) is explicitly intended to try to address this problem. At present, unless you not only run your own fab, but also build your own equipment and don't license things from the likes of Cadence, you have no guarantees that the thing that you get back doesn't have secret vulnerabilities introduced. Trying to verify that the chip you get back corresponds to the RTL that you sent to the fab is a very hard problem.

      --
      I am TheRaven on Soylent News
    2. Re:The bottom line by Wrath0fb0b · · Score: 2

      This and much worse.

      The chip that you get from the fab needs to be correspond to the RTL that you sent.

      The actual chip ROM that they program has to correspond to the ROM that you want.

      The firmware programmed* onto any of the peripherals has to correspond to the firmware you want.

      The compiler has to be known not to dynamically insert backdoors when compiling. And no, you cannot verify this by inspecting the compiler source [PDF].

      * No, I'll recompile the open-source firmware and reprogram it. Besides the fact that you will be recompiling on an untrusted system, how do you know that are you actually reprogramming it? Because the chip reported success? Maybe their firmware allows itself to be reprogrammed but patches the incoming firmware in a few key places as it comes in?

    3. Re:The bottom line by Wrath0fb0b · · Score: 2

      Maybe after months of trying to create exactly reproducible builds (hint: it took Debian three frickin years), fighting with the fact that compilers randomize their optimizations (for good and unrelated reasons) and all that noise. That's what's required to get the same version of gcc to produce identical binaries of your regular compiler.

      Then you'll figure out that you didn't really appreciate the full scope of the problem because the compiler is just one small place in the system. In fact, the original ACM paper points out that it demonstrates the concept with respect to a C compiler but the same exactly problem resides in the loader and in the microcode of the CPU itself. Each step into the depths reveals a new place where your program is just data* swimming by some other program that can patch it along the way.

      * In fact, that's what the entire edifice of computing is built on -- that what is code on one layer of the system is actually just input or output to another. It's so familiar we don't even realize it. When we type 'apt-get whatever' or "execv" or "dlopen" our program is just another blob that someone else's program chews through.

  4. Trusted Foundries??? by ad454 · · Score: 2, Interesting

    I am a huge supporter of open hardware projects, especially the ESA and Oracle supported opensparc architectures.

    https://en.m.wikipedia.org/wik...

    However without a trusted silicon foundry to make chips without hardware back doors, all of the vetting of the hardware design "source" RTL won't be enough to establish trust. Even running netlists in FPGAs won't be enough if you can't trust the FPGA manufacturer or the foundry that built it.

    In the end, we as consumers are stuck without any truly secure hardware options, free of backdoors.

    My advice, assume all processors have backdoors and select those designed and made in places that cannot be compelled by the country in which you live for backdoor access.

  5. Re:For those of us that don't know by ShanghaiBill · · Score: 5, Informative

    What's the big advantage with RISC over ARM or x86?

    ARM is a RISC chip. Originally, ARM stood for Acorn RISC Machine.

    The news here is not that it is RISC, but that it is open source.

    So as long as you have your own fab, or a few million $ to rent one, you can make your own chips ... but the real advantage is that you can look at the design files and see for yourself that there are no backdoors.

  6. Re:For those of us that don't know by Anonymous Coward · · Score: 2, Insightful

    Less instruction sets makes assemblers and compilers easier to implement, also is easier to anyone check if there is a bug or abusable feature (There are people and businesses that do not require or want ARM TrustZone, AMD PSP or Intel ATM).
    Licensing also matters a lot, is easier to develop further without fear of litigation and research groups can find and publish better reviews and recommendations without fear of being sued.

  7. Has it backdoors? by UBfusion · · Score: 2

    I'm not optimistic this cpu would be allowed to be mass-produced, since it appears it won't have any of backdoors the Intel and AMD ones have.

  8. Re:Nope by UnknownSoldier · · Score: 2

    2 Billion devices running Android, not to mention all the other cheap computing devices (IoT), isn't enough???

  9. Re:RPi form factor? by bugs2squash · · Score: 2

    like this one ?

    --
    Nullius in verba
  10. Re:For those of us that don't know by fisted · · Score: 3, Insightful

    But you can't verify that the design you're looking at is what the plant actually implemented on the chip.

  11. Re: For those of us that don't know by tlhIngan · · Score: 2

    Bingo. All the companies involved in making SoCs will be looking to cut out the ARM licensing fee. ARM typically takes $1-10 million up front plus 1-2% per chip, so you can see how their customers would be eager to keep that for themselves.

    So what kind of performance are we talking about? Are they equivalent to the latest and greatest (and thus most expensive licensing) ARMs? Or are we only running them at 25MHz on an FPGA? (And what kind of FPGA? Since there's a range from $10 FPGAs to $100,000 FPGAs).

    Also important is cost - do you know why most TVs are smart? It's because the SoCs now are so fast that after the basic TV management software is put in, you're barely using 1% of it. The SoC is so cheap, you can choose between a 100MHz ARM TV SoC, or one that uses a mass produced smartphone chip code and get a quad core 1.5GHz SoC for less money.

    Hell, even in the microcontroller space things can be screwy with the proliferation of microcontroller ARM chips. Nothing like coding up something with real 32-bit integers and stuff.

    So other than niche open-source hardware laptops... is there a market?

  12. Re:For those of us that don't know by TheRaven64 · · Score: 5, Informative

    Less instruction sets makes assemblers and compilers easier to implement

    I'll give you assemblers (though assemblers are so trivial that there's little benefit from this), but not compilers. A big motivation for the original RISC revolution was that compilers were only using a tiny fraction of the microcoded instructions added to CISC chips and you could make the hardware a lot faster by throwing away all of the decoder logic required to support them. Compilers can always restrict themselves to a Turing-complete subset of any ISA.

    RISC-V is very simple, but that's not always a good thing. For example, most modern architectures have a way of checking the carry flag for integer addition, which is important for things like constant-time crypto (or anything that uses big integer arithmetic) and also for automatic boxing for dynamic languages. RISC-V doesn't, which makes these operations a lot harder to implement. On x86 or ARM, you have direct access to the carry bit as a condition code.

    Similarly, RISC-V lacks a conditional move / select instruction. Krste and I have had some very long arguments about this. Two years ago, I had a student add a conditional move to RISC-V and demonstrate that, for an in-order pipeline, you get around a 20% speedup from an area overhead of under 1%. You can get the same speedup by (roughly) quadrupling the amount of branch predictor state. Krste's objection to conditional move comes from the Alpha, where the conditional move was the only instruction requiring three read ports on the register file. On in-order systems, this is very cheap. On superscalar out-of-order implementations, you effectively get it for free from your register rename engine (executing a conditional move is a register rename operation). On in-order superscalar designs without register renaming, it's a bit painful, but that's a weird space (no ARM chips are in this window anymore, for example). Krste's counter argument is that you can do micro-op fusion on the high-end parts to spot the conditional-branch-move sequence, but that complicates decoder logic (ARM avoids micro-op fusion because of the power cost).

    Most of the other instructions in modern ISAs are there for a reason. For example, ARMv7 and ARMv8 have a rich set of bitfield insert and extract instructions. These are rarely used, but they are used in a few critical paths that have a big impact on overall performance. The scaled addressing modes on RISC-V initially look like a good way of saving opcode space, but unfortunately they preclude a common optimisation in dynamic languages, where you use the low bit to differentiate pointers from integers. If you set the low bit in valid pointers, then you can fold the -1 into your conventional loads. For example, if you want to load the field at offset 8 in an object, you do a load with an immediate offset 7. In RISC-V, a 32-bit load must have an immediate that's a multiple of 4, so this is not possible and you end up requiring an extra arithmetic instruction (and, often, an extra register) for each object / method pair.

    At a higher level, the lack of instruction cache coherency between cores makes JITs very inefficient on multicore RISC-V. Every time you generate code, you must do a system call, the OS must send an IPI to every core, and then run the i-cache invalidate instruction. All other modern instruction sets require this to be piggybacked on the normal cache coherency logic (where it's a few orders of magnitude cheaper). SPARC was the last holdout, but Java running far faster on x86 than SPARC put pressure on them to change.

    Licensing also matters a lot

    This is true, but not in the way that you think. Companies don't pay an ARM license because they like giving ARM money, they pay an ARM license because it buys them entry into the ARM ecosystem. Apple spends a lot of money developing ARM compilers, but they spend a lot less money developing ARM compilers than the rest of the ARM

    --
    I am TheRaven on Soylent News
  13. Re: For those of us that don't know by james_gnz · · Score: 2

    other than niche open-source hardware laptops... is there a market?

    I'd guess it'll probably become ubiquitous in devices that are either very small or very large, but won't make much of a dent in the PC market (where x86 is already entrenched) or the tablet/phone market (where ARM is already entrenched). Kind of like how we've got the Linux kernel on supercomputers and servers, tablets, phones, watches, routers, etc., but not so much on PCs, where MS Windows was already entrenched.

    I think I remember a video from one of the people involved in RISC-V saying that it was originally just intended for use in courses about CPU design. They kept revising it whenever a PhD student figured out a better way of doing something. Then they started getting calls from people in India asking "Why do you keep changing the spec?" It was being used as an embedded processor in special purpose chips. Nvidia is planning to use it as an embedded processor in their GPUs, apparently (replacing their in-house processor "Falcon"). So RISC-V's already making inroads here.

    Google's apparently interested in it for their servers too. At that scale, the savings from higher efficiency could offset research and development costs. I think RISC-V will probably take over server farms and supercomputers eventually.

    For PCs, I think you're right, it'll probably be a niche market.

  14. Re:For those of us that don't know by fisted · · Score: 3, Informative

    Way back in the mists of time

    I guess that's the thing.

    AFAIK these days dies have too small of a feature size for meaningful optical inspection (feature size way smaller than the wavelength of light), and dozens of layers from which, even if you could, you'd only see the topmost one, and simply way too many features to begin with.

  15. Re:Should have added this on your SN post :) by TheRaven64 · · Score: 3, Interesting

    How do the J2/3/4 open source SuperH designs compare?

    I've not looked at SuperH in detail, so I can't really compare.

    I seem to remember there were other pitfalls to their architecture, but getting a processor that is Management Engine (Aka Clipper+Palladium+TPM) free is a huge boon to the future of computer security

    I disagree. A TPM, secure enclave, or equivalent, is increasingly vital for computer security. It is absolutely essential that you have some write-only storage for encryption keys into a coprocessor that will perform signing / signature verification / encryption / decryption, but which does not allow the keys to be exfiltrated. Anything less than this and a single OS-level compromise means that you need to reset every password and revoke every key that you've used on that machine.

    Having said all this: Is it perhaps time for a different CPU project, or a fork of RISC-V with these missing features added, at the risk of binary incompatibility, but to the benefit of performance and perhaps security?

    There are lots of extensions to RISC-V, but the problem there is fragmentation. You need the A extension if you want to run a real OS. You probably need the C extension, because compilers are starting to default to using it. The M extension is useful, so people will probably start using it soon. Hardware floating point is expensive on low-end parts, so you're going to end up with some having F, some having D, and some having neither (this was a pain for OS support for ARM until recently - now ARM basically mandates floating point on anything that is likely to run an OS), and a few will support Q. L is unlikely to be used outside of COBOL and Java, so isn't too much of an issue (one is niche, the other is typically JIT'd so it doesn't matter too much if only some targets support it). And that's before there's any widely deployed silicon. Expect vendors to add their own special RISC-V instructions, making their own versions of toolchains and operating systems incompatible.

    RISC-V isn't the first project to try this. OpenRISC has been around for a lot longer, but RISC-V managed to get a lot more momentum. I don't think that a competing project would find it easy to get any of this. It remains to be seen whether this momentum can translate to a viable ecosystem.

    --
    I am TheRaven on Soylent News
  16. Re:For those of us that don't know by TheRaven64 · · Score: 4, Informative

    Exactly how do you expect conditional moves to be executed at the renaming stage?

    The conventional way is to enqueue the operation just as you do any other operation that has not-yet-ready dependencies. When the condition is known, the rename logic collapses the two candidate rename registers into a single one and forwards this to the pipeline. Variations of this technique are used in most mainstream superscalar cores. The rename engine is already one of the most complex bits of logic in your CPU, supporting conditional moves adds very little extra complexity and gives a huge boost to code density.

    This is a disadvantage if one expect that all processors are the same and expect the code optimized for one ISA (and likely microarchitecture) should run well on other ISAs. Really bad.

    If you come along with a new ISA and say 'oh, so you've spent the last 30 years working out how to optimise this category of languages? That's nice, but those techniques won't work with our ISA' then you'd better have a compelling alternative.

    That isn't the only way to solve that problem, in fact that sounds like a very bad design.

    It is on RISC-V. For the J extension, we'll probably mandate coherent i-caches, because that's the only sane way of solving this problem. Lazy updates or indirection don't help this, unless you want to add a conditional i-cache flush on every branch, and even that would break on-stack replacement (deoptimisation), where is not always a branch in the old code, but there is in the new code, and it is essential for correctness that you run the new code and not the old.

    MIPS was killed?

    Yes. It's still hanging on a bit at the low end, mostly in routers, where some vendors have ancient licenses and don't care that power and performance both suck in comparison to newer cores. It's dead at the high end - Cavium was the last vendor doing decent new designs and they've moved entirely to ARMv8. ImagTec tried to get people interested in MIPSr6, but the only thing that MIPS had going for it was the ability to run legacy MIPS code, and MIPSr6 wasn't backwards compatible.

    Custom instruction support is a requirement for a subset of the market and it doesn't cause any problem

    Really? ARM seems to be doing very well without it. And ARM partners seem to do very well being able to put their own specialised cores in SoCs, but have a common ARM ISA driving them. ARM was just bought by Softbank for $32bn, meanwhile, all of the surviving bits of MIPS were just sold off by a dying ImagTec for $65m. Which strategy do you think worked better?

    Can't run the code from a microcontroller interfacing a custom LIDAR on the desktop computer? Who the fuck cares? Really?

    How much does it cost you to validate the toolchain for that custom LIDAR? If it's the same toolchain that every other vendor's chip uses, not much. If it's a custom one that handles your special magic instructions, that cost goes up. And now your vendor can't upstream the changes to the compiler, because they break other implementations (as happened with almost all of the MIPS vendor GCC forks), so how much is it going to cost you if you have to back-port the library that you want to use in your LIDAR system from C++20 or C21 to the dialect supported by your vendor's compiler? All of these are the reasons that people abandoned MIPS.

    --
    I am TheRaven on Soylent News