1 of 11

ISA Introduction (csky)

what's the meaning of a new arch for linux

Guo Ren

<guoren@kernel.org>

T-HEAD�XuanTie CPU Series

2 of 11

C-SKY Upstream�

3 of 11

A little regret (missing comment)

4 of 11

Our jobs:

CPU

ISA

Linux Directory

610 (no sale)

MCORE 32 (Modified)

linux/arch/csky/abiv1

807/810/860

C-SKY 32

linux/arch/csky/abiv2

910

RISC-V 64

linux/arch/riscv

  • Now we need take care of 3 ISAs with 5 cores
  • Kernel, glibc, uclibc-ng, buildroot, elfutils, strace, greenlet, perf, systemtap ...
  • https://gitlab.com/c-sky/buildroot/pipelines

5 of 11

Kernel Version

  • Linux-next
  • Linux-4.19
  • Linux-4.9

Quick Start:

https://github.com/c-sky/buildroot

6 of 11

Boot

code:

Our Principle:

  • Easy to use
  • Easy to understand

7 of 11

Use KSEG for 32bit CPU

  • KSEG is an ancient technology from mips.�https://johnloomis.org/microchip/pic32/memory/memory.html
  • We also have KSEG0, KSEG1, but they are used mapping 0-1GB cached memory (No IO map) to reduce unnecessary TLB miss
  • We also provide base regs to support any start physical address (512MB align)
  • Why we use KSEG ?
    • It’s cheaper than middle level page mapping for hardware
    • It’s more efficient than MMU for hardware
    • Hugetlbfs and THP are useless in 32b system with small memory (personal opinion)

8 of 11

Current State:

  • Highmem
  • SMP
    • cpu hotplug
    • 1024 sources root interrupt controller
    • support both percpu-irq and comm-irq in one driver
  • Ftrace, Dynamic Ftrace
  • Strace
  • Perf (Hardware PMU supported with perf record)

9 of 11

Recent Plan:

  • SystemTap (kprobe/uprobe)
  • VDSO Optimization
  • BPF JIT
  • Trace with “perf record -e thead_pt/*”
  • IOMMU

10 of 11

$6 Linux Development Board with C-SKY ISA

11 of 11

Thank you

Actually, I don’t know what’s the meaning of a new arch for linux :P

�But we’ll continue improving the arch - day by day, patch by patch

Just continue working & keep changing

T-HEAD