Skip to content

Latest commit

 

History

History
429 lines (317 loc) · 28.1 KB

2023-01-01.en.md

File metadata and controls

429 lines (317 loc) · 28.1 KB

This Month in PLCT: Issue 41 (January 1, 2023)

Preface

The PLCT Lab had harrowing January. Within weeks since the easing of lock-down, PLCT members from all around China contacted COVID-19. Topics of daily conversations were occupied by reports of positive tests and fevers. Luckily, all PLCT and TARSIER members prevailed through this challenging time, as we entered the new normal.

But let's not forget what a fruitful December we've had last year. On December 9th, we held PLCT OpenDay 2022, our 4th open-day event. All recordings of events and presentations has been uploaded to Bilibili for your viewing pleasure. On December 28th and 29th, at the annual openEuler Summit, members of PLCT and TARSIER, who took active roles in building the commercial-targeted EulixOS 2.0-RV, also helped organizing the RISC-V sub-forum.

In related news, Liu Xin (刘鑫) from the TARSIER team also received the 2022 openEuler developer of the year (openEuler 年度之星) award for his long-term contributions. Congratulations to Liu Xin!

Finally, in consideration of the COVID-19 pandemic's impact on our team members, this monthly report was delayed to January 22th. In lieu of a New Year's greeting, let's take this moment to celebrate the Lunar New Year. We wish you happiness in the new year!

Featured Items

  • PLCT OpenDay 2022 has concluded successfully. You may find the event recordings here.
  • The Institute of Software announced "EulixOS 2.0-RV," built open openEuler community edition for RISC-V, at the Operating Systems Industry Summit (操作系统产业峰会).
  • The RISC-V sub-forum was held successfully at the openEuler Summit.
  • Qiu Ji, Lu Yahan, et. al.'s SpiderMonkey JIT RISC-V porting patchset was integrated into the Firefox browser shipped with openEuler RISC-V.

V8 for RISC-V

Bugfixes

  1. 4128600: [riscv][regalloc] Port the rest part of "Resolve tail-call gap moves" | https://chromium-review.googlesource.com/c/v8/v8/+/4128600

Porting Upstream Changes

  1. 4119766: [riscv][centry] Remove the unused SaveFPRegsMode parameter | https://chromium-review.googlesource.com/c/v8/v8/+/4119766
  2. 4114558: [riscv] Fix qfma test fail | https://chromium-review.googlesource.com/c/v8/v8/+/4114558
  3. 4074457: Reland "[riscv] Add tracepoint instructions to help simulator debug" | https://chromium-review.googlesource.com/c/v8/v8/+/4074457

OpenJDK for RV32GC (Shi Ningning [史宁宁])

Patch Submissions

  1. Fix the RFLAGS in riscv32.ad openjdk-riscv/jdk11u#577
  2. Fix the RegisterImpl::number_of_registers in riscv32.ad openjdk-riscv/jdk11u#578
  3. Fix the i2c and c2i adapter according arm 32bit openjdk-riscv/jdk11u#579
  4. Fix the x10/x11 in save/restore_native_result openjdk-riscv/jdk11u#582

Other Work

  1. Issue reported: 64-bit data processing with lfmv_w_x/fmv_x_w in risv32.ad, openjdk-riscv/jdk11u#580
  2. Presentation (Chinese):《OpenJDK for RV32G的解释器与C2》 https://github.com/shining1984/talks

OpenJDK Upstreaming (Mostly RV64-related)

  1. Pull requests to jdk-mainline:
  1. jdk-mainline pull requests reviewed:
  1. RISC-V port for Foreign-API:
  • Work-in-progress pull requests rebased against jdk-master: openjdk/jdk#11004 (8293841: RISC-V: Implementation of Foreign Function & Memory API (Preview)).
  • Passed all jtreg foreign tests with fastdebug build on HiFive Unmatched.
  • Internal code review in progress, will be ready for public code review at the end of December.
  1. RISC-V port for Generational-ZGC:

OpenJDK Upstreaming (Zhang Dingli [张定立])

OpenJDK Upstreaming (Cao Gui [曹贵])

OpenJDK8 Backporting (Zhang Xiang [章翔])

  1. Debugging work for javac.
  1. Debugging work for C1 and C2.

Clang/LLVM for RISC-V

gollvm

Please stay tuned.

mold

Please stay tuned.

GNU Toolchain for RISC-V

AOSP for RISC-V

Please stay tuned.

Arch Linux for RISC-V

Gentoo for RISC-V

Stats: 8044/19560, 41.12% (https://whale.plctlab.org/riscv/support-statistics/)

Nixpkgs for RISC-V

Firefox (SpiderMonkey) on RV64GCV

Submitted a patch to the upstream to add riscv64 backend.r=jandem https://phabricator.services.mozilla.com/D161986.

Upstream did not review this change due to the holidays.

Enable DynamoRIO running on RV64GC

Preliminary support for RV64GC is now implemented in DynamoRIO, which will now build on RV64GC (basic decoding is now supported).

Current five-stage road map for DyanmoRIO's RV64GC support:

  1. Introduce RISC-V platform-specific functions, frameworks, definitions, etc., allowing DynamoRIO to build on RISC-V. (Done)
  2. Setup RISC-V CI for automated compilation and testing. (In Progress)
  3. Refine RISC-V platform-specific functions and definitions, make DynamoRIO's built-in example tools functional. (In Progress)
  4. Refine RISC-V unit- and feature-tests, setup CI for automated testing and instruments for long-term maintenance.
  5. Continue RISC-V feature enablement for more complex programs, prepare for long-term maintenance.

See https://gist.github.com/bekcpear/7c9e710ee5b674888fcf5e5d8445dc16 for a more detailed to-do list.

OpenCV for RV64GCV

OpenCV 4.7.0 was released with a...

New universal intrinsics backend for scalable vector instructions. The first scalable implementation for RISC-V RVV 1.0.

In 2023, we will focus on refactoring and migrating existing unified vector instruction codes. This will materialise in performance improvements for compute-intensive algorithms on RVV-enabled devices. Meanwhile, we will collaborate with the XiangShan processor team to better test and optimise the OpenCV RVV backend.

Other RISC-V related patches:

Experimental/simd in LIBCXX

LuaJIT RV64G porting

LuaJIT in the interpreter mode now appears to be functional, passing 301/304 tests of LuaJIT/LuaJIT-test-cleanup@9c27a59. This is on par with other architecture without FFI and JIT support.

gem5

Spike

QEMU

Other Support for RISC-V International

SAIL/ACT

  • Updated ACT support for the CMO extension.

OpenArkCompiler Community

Shi Ninging (史宁宁) continues to work on compiling the OpenArkCompiler Weekly, which just published its 136th issue.

You may find new weekly issues of the OpenArkCompiler Weekly on Sundays on...

MLIR

Please stay tuned.

Upstream RVV Dialect Proposal

Please stay tuned.

Buddy Compiler

Please stay tuned.

Chisel / FIRRTL (Team CAAT)

Please stay tuned.

coreboot for riscv

Please stay tuned.

openocd

Please stay tuned.

opensbi

  • Added Vim swap files to .gitignore, reference
  • Updated debug trigger, added type2 support, endianness support (csr definitions implemented with struct bit-fields caused endianness issues, bit operations were used to workaround this issue), reference
  • Synchronize PMP settings with virtual memory system, adding synchronization instructions to sbi_hart_pmp_configure, reference
  • Rewrite fdt_find_match with fdt_find_node in fw_platform_lookup_special to improve code readability, reference
  • Fixed fdt_parse_region to avoid bit shift overflow, reference
  • Fixed logical errors in error handling in __fdt_parse_region, reference
  • Detects whether the region in fdt is valid through sbi_is_region_valid, the original code only detects region->order, reference
  • Use env to invoke Bash in shebang, as Bash in FreeBSD is installed at /usr/local/bin/bash, reference
  • Added clint support for T-Head c9xx, also specified c9xx mtime features using a quirk, reference
  • Added Zisslpcfi support to opensbi, reference
  • Updated core selection method during cold boot, replacing pre-processed behaviours to specifying using fdt, reference
  • Split PMP permissions into M and SU modes (PMP lock is effective for M mode, but it also allows for access by lower privilege modes), reference
  • Updated PMU property names in documentation, renamed event-to-mhpmevent as riscv,event-to-mhpmevent,reference
  • Updated documentation to remove the MCOUNTINHIBIT requirement for PMU extension implementations, reference
  • Dropped -N switch from linker flags. This flag creates singular load segments, resulting in segments with RWX permissions and an error in ld 2.39, reference
  • Allow custom HTIF base address for RV32, reference
  • sbi_hsm: Rename priv argument to arg1, reference

u-boot

Please stay tuned.

Aya Theorem Prover

Please stay tuned.

RISC-V Platform Evaluation

Please stay tuned.

RVLab

  • Reported an issue where LAVA jobs could not complete execution using the hifive-unleashed-a00.jinja2 device type template: kernelci/lava-docker#162
    • Upstream identified a bug in the hifive-unleashed-a00.jinja2 device type template, where upon device reboot, the serial port disappears.
  • Learned to use Python module labgrid and attempted (unsuccessfully) to control serial communication using this module.
  • Tested the Cloud-V CI interface and reported an issue to apply for an account: 10x-Engineers/riscv-ci-partners#27
  • Learned to use KUnit and compiled notes on the process(Chinese), https://zhuanlan.zhihu.com/p/594717218
  • Wrote an Ubuntu 22.10 image for a LicheeRV board, built and ran Unixbench, and compiled notes on the process (Chinese), https://zhuanlan.zhihu.com/p/595281400

eBPF

New members joined the eBPF team, but most caught COVID.

BCC upstream

  • (Merged )libbpf-tools: fix uprobe helper possible overflow, reference
  • [Draft] Add bcc frontend action to convert BCC style source to libbpf style source, reference

eunomia-bpf

  • Discussed project roadmap at OpenEuler, OpenAnolis, and various other places, 0.4.0-draft-roadmap
  • Imported eunomia-bpf as a user mode development library for Coolbpf (Aliyun's eBPF development framework), reference
  • Attempted to reimplement a PoC tool for converting bcc-type kernel mode code to libbpf kernel mode code. This will allow "write once, run everywhere" and AOT features when using bcc-type kernel mode code in eunomia-bpf, eunomia-bpf/bcc
  • Rewrote some ecli command line tools in Rust, Add ecli-rs
  • Wrote the first development tutorial for libbpf-based eBPF tools and attempted to generate an eBPF program using ChatGPT, reference
  • Added a few code analysing tools in CI (deepsource and codefactor) to help improve code quality and iron out minor issues discovered in the process.
  • Added codecov to CI, improving unit test coverage from ~20% to 77%, codecov

Useful Links