HN Theater @HNTheaterMonth

The best talks and videos of Hacker News.

Hacker News Comments on
A Plan 9 C Compiler for RV32GC and RV64GC

British Computer Society Open Source Specialists · Youtube · 100 HN points · 1 HN comments
HN Theater has aggregated all Hacker News stories and comments that mention British Computer Society Open Source Specialists's video "A Plan 9 C Compiler for RV32GC and RV64GC".
Youtube Summary
Presented by Richard Miller

The Plan 9 C compiler originated at Bell Labs alongside the Plan 9 and Inferno operating systems. It was part of the initial development toolchain for Go (before that language became self-compiling), and is a useful stand alone tool for building embedded software. A new RISC-V version of the Plan 9 C compiler, assembler and linker, targeting RV32IM cores such as PicoRV32, was announced by the author at ORCONF in 2018. The toolchain has now been expanded with floating point, compressed, and 64-bit instruction capability.

Richard Miller is a consulting engineer working in the borderland between software and hardware, on operating systems, programming language implementation, and digital logic design. His first C programming project was in 1977, adapting Dennis Ritchie’s original 16-bit PDP-11 C compiler to generate code for the 32-bit Interdata 7/32.
HN Theater Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this video.
Nov 29, 2020 · 100 points, 5 comments · submitted by pmarin
swiley
Where will he put the source since the bell labs site (the default 9fs I think) has been gone for so long?
MisterTea
We moved on to 9p.io a loooong time ago.

And 9front has its own hg server and 9p server.

rcarmo
That's been discussed in 9fans, I think: https://9fans.topicbox.com/groups/9fans
ori_b
Also, a port to Risc64 using it is on its way: https://9fans.topicbox.com/groups/9fans/Tbe8c3c69c87794db-M2...

Topicbox is having issues for me, so I'm duplicating the contents below:

=================================

Dear 9fans,

I'm forwarding an update from Richard and Geoff about their work porting Plan 9 to RISC-V. I sent a synopsis on twitter; it is included here with more detail:

----

Synopsis:

• 32 and 64 bit kernels (and commands) are working under tinyemu

• 64 bit kernel is booting on hardware, still being debugged

• 32 bit kernel is untested on hardware because we don't have access to an RV32 core with MMU

• riscv compiler is available on 9p.io/sources/contrib/miller, and has been added to the inferno distribution on bitbucket.

• tinyemu port will go onto 9p.io/sources/contrib/miller this weekend

• source is still in the experimental development stage. it will be released when ready.

Richard recently gave a talk about his experience porting the Plan 9 C compiler to RISC-V: https://www.youtube.com/watch?v=LHJqdXGb0uc

Description:

TinyEMU has been ported to Plan 9, providing a choice of RV32GC or RV64GC in machine mode, and better diagnostics than hardware provides.

We have 9k kernels running in both modes under tinyemu, but so far using only one CPU. They share quite a bit of non-port source. The RV32 kernel uses Sv32 paging. The RV64 kernel so far uses Sv39 paging, but we expect it to work with Sv48 paging (and beyond) with trivial changes. So far the RV64 kernel resides at physical and virtual 0x80000000, which limits user process size, but we believe it will be straightforward to switch to virtual 0xffffffc080000000.

As described below, the RV32 kernel is not usable on the Polarfire Icicle using the stock firmware and bootloaders. The RV64 kernel is close to working on the Icicle, and on the four main cores, we believe. There have been some surprises with the Icicle: as delivered, it starts OpenSBI as RV64 on all harts (CPUs) and hart 0 (the smaller E51 core) controls the others. OpenSBI on hart 1 starts U-boot, from which we PXE boot the RV64 kernel, which runs in supervisor mode. There is no way back to machine mode, thus no way back to RV32, and there seems to be no way to determine which mode the CPU is in.

---

Thanks, -Skip

bch
I sure enjoy seeing less popular but well engineered tools reapplied to “modern” problems. Re: 9c and lib9rt being well-suited for constrained bare-metal development, I wonder is this a place where pcc[0] would also thrive?

[0] https://en.wikipedia.org/wiki/Portable_C_Compiler

HN Theater is an independent project and is not operated by Y Combinator or any of the video hosting platforms linked to on this site.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.