LoongArch initial support
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v7 Latest20 patches 3 repliesIn review
- v620 patches 12 repliesSuperseded
- v520 patches 15 repliesSuperseded
Earlier versions · 3
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v4 | 19 patches | 0 replies | Superseded | |
| v3 | 19 patches | 10 replies | Superseded | |
| v2 | 16 patches | 47 replies | Superseded |
Patches in v7 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/20 | lib: fdtdec: Handle multiple memory nodesinclude/ lib/ | +74 | 0 replies | |
| 2/20 | linux/io.h: Use map_physmem to implement ioremapinclude/ | +2 | 0 replies | |
| 3/20 | image: Take entry point as an output of booti_setuparch/ arch/ arch/ +4 more | +21 | 0 replies | |
| 4/20 | elf: Define LoongArch bitsinclude/ | +8 | 0 replies | |
| 5/20 | image: Define IH_ARCH_LOONGARCHboot/ include/ | +2 | 0 replies | |
| 6/20 | LoongArch: skeleton and headersMakefile arch/ arch/ +37 more | +3341 | 0 replies | |
| 7/20 | LoongArch: lib: General routinesarch/ arch/ arch/ +5 more | +407 | 0 replies | |
| 8/20 | LoongArch: CPU assembly routinesarch/ arch/ arch/ +1 more | +244 | 0 replies | |
| 9/20 | LoongArch: Exception handlingarch/ arch/ arch/ +2 more | +400 | 0 replies | |
| 10/20 | LoongArch: Boot Image bitsarch/ arch/ arch/ +2 more | +210 | 0 replies | |
| 11/20 | LoongArch: Generic platform typearch/ arch/ arch/ +2 more | +60 | 0 replies | |
| 12/20 | board_f: Add LoongArch path of mon_len calculationcommon/ | +1 | 1 reply | |
| 13/20 | cpu: Add loongarch_cpu driverdrivers/ drivers/ drivers/ | +152 | 0 replies | |
| 14/20 | timer: Add loongarch_timer driverdrivers/ drivers/ drivers/ | +141 | 0 replies | |
| 15/20 | board: emulation: Add qemu-loongarcharch/ board/ board/ +7 more | +251 | 0 replies | |
| 16/20 | efi: LoongArch: Define LoongArch bits everywhereinclude/ include/ include/ +4 more | +27 | 1 reply | |
| 17/20 | efi: LoongArch: Implement everythingarch/ arch/ arch/ +5 more | +408 | 1 reply | |
| 18/20 | doc: arch: Add documentation for LoongArchdoc/ doc/ | +32 | 0 replies | |
| 19/20 | MAINTAINERS: Add entry for LoongArchMAINTAINERS | +11 | 0 replies | |
| 20/20 | CI: Wire up qemu-loongarch64.azure-pipelines.yml .gitlab-ci.yml | +13 | 0 replies |
Reviews trailers per patch
All 20 patches have a Reviewed-by or Acked-by.
| Patch | Simon Glass | Heinrich Schuchardt | Tom Rini | Ilias Apalodimas |
|---|---|---|---|---|
| 1/20 | R-b | |||
| 2/20 | R-b | |||
| 3/20 | R-b | R-b | ||
| 4/20 | R-b | R-b | ||
| 5/20 | R-b | R-b | ||
| 6/20 | R-b | |||
| 7/20 | R-b | |||
| 8/20 | R-b | |||
| 9/20 | R-b | |||
| 10/20 | R-b | |||
| 11/20 | R-b | |||
| 12/20 | R-b | A-b | ||
| 13/20 | R-b | |||
| 14/20 | R-b | |||
| 15/20 | R-b | |||
| 16/20 | R-b | A-b | ||
| 17/20 | R-b | A-b | ||
| 18/20 | R-b | |||
| 19/20 | R-b | |||
| 20/20 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH v7 00/20] LoongArch initial support
Hi all,
So far this series has implemented general support for initializing CPU, exceptions, kernel booting, CPU and timer drivers, QEMU LoongArch virt machine support and UEFI standard compliant EFI booting support.
LoongArch had defined 3 ISA variants, LA64, LA32 and LA32R (Reduced, intended for MCUs and education purpose). This is a little-endian only architecture. Only LA64 is implemented in this series since the hardware is more widely available, and I'll work on 32bit support later.
This series had passed checkpatch with exceptions on some false alarms and headers imported elsewhere. I've tested virtio devices, direct kernel booting, efistub kernel booting, grub, and hello/selftests EFI app.
LoongArch CI depends on some already-merged dockerfile[1] and buildman[2] changes to run. With the docker image replaced with one built by myself, this series passes the Azure CI[3].
Toolchain can be found at [4] or using upstream one, to build
make qemu-loongarch64_defconfig
make
To run in QEMU:
qemu-system-loongarch64 -nographic -machine virt -bios u-boot.bin
TODOs on the architecture & board:
- loongson,ls7a-rtc driver
- The only device on QEMU board haven't been supported yet
- LoongArch sandbox host support
- TLB enablement
- This is required for real CPU to utilize caches
- Possibly EFI-APP support for real machine
Thanks for your time and review!
Link to v5: https://lore.kernel.org/u-boot/[email protected]/
Link to v4: https://lore.kernel.org/u-boot/[email protected]/
Link to v3: https://lore.kernel.org/u-boot/[email protected]/
Link to v2: https://lore.kernel.org/u-boot/[email protected]/
Link to v1: https://lore.kernel.org/u-boot/[email protected]/
[1]: https://lore.kernel.org/u-boot/[email protected]/
[2]: https://lore.kernel.org/u-boot/[email protected]/
[3]: https://github.com/u-boot/u-boot/pull/1073
[4]: https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/14.2.0/x86_64-gcc-14.2.0-nolibc-loongarch64-linux.tar.gz
Jiaxun Yang (16):
lib: fdtdec: Handle multiple memory nodes linux/io.h: Use map_physmem to implement ioremap
image: Take entry point as an output of booti_setup
elf: Define LoongArch bits
image: Define IH_ARCH_LOONGARCH
LoongArch: skeleton and headers
LoongArch: lib: General routines
LoongArch: CPU assembly routines
LoongArch: Exception handling
LoongArch: Boot Image bits
LoongArch: Generic platform type
cpu: Add loongarch_cpu driver
timer: Add loongarch_timer driver
board: emulation: Add qemu-loongarch
efi: LoongArch: Define LoongArch bits everywhere
efi: LoongArch: Implement everything
Yao Zi (4):
board_f: Add LoongArch path of mon_len calculation
doc: arch: Add documentation for LoongArch
MAINTAINERS: Add entry for LoongArch
CI: Wire up qemu-loongarch64
.azure-pipelines.yml | 11 +- .gitlab-ci.yml | 6 + MAINTAINERS | 11 + Makefile | 2 + arch/Kconfig | 17 + arch/arm/lib/image.c | 3 +- arch/loongarch/Kconfig | 64 + arch/loongarch/Makefile | 21 + arch/loongarch/config.mk | 27 + arch/loongarch/cpu/Makefile | 9 + arch/loongarch/cpu/cpu.c | 17 + arch/loongarch/cpu/generic/Kconfig | 13 + arch/loongarch/cpu/generic/Makefile | 7 + arch/loongarch/cpu/generic/cpu.c | 23 + arch/loongarch/cpu/generic/dram.c | 16 + arch/loongarch/cpu/genex.S | 21 + arch/loongarch/cpu/smp_secondary.S | 55 + arch/loongarch/cpu/start.S | 168 ++ arch/loongarch/cpu/u-boot.lds | 85 + arch/loongarch/dts/Makefile | 6 + arch/loongarch/include/asm/acpi_table.h | 8 + arch/loongarch/include/asm/addrspace.h | 86 + .../include/asm/arch-generic/entry-init.h | 15 + arch/loongarch/include/asm/asm.h | 186 +++ arch/loongarch/include/asm/atomic.h | 12 + arch/loongarch/include/asm/barrier.h | 138 ++ arch/loongarch/include/asm/bitops.h | 156 ++ arch/loongarch/include/asm/byteorder.h | 22 + arch/loongarch/include/asm/cache.h | 35 + arch/loongarch/include/asm/config.h | 11 + arch/loongarch/include/asm/cpu.h | 123 ++ arch/loongarch/include/asm/dma-mapping.h | 27 + arch/loongarch/include/asm/global_data.h | 50 + arch/loongarch/include/asm/gpio.h | 11 + arch/loongarch/include/asm/io.h | 399 +++++ arch/loongarch/include/asm/linkage.h | 11 + arch/loongarch/include/asm/loongarch.h | 1467 +++++++++++++++++ arch/loongarch/include/asm/posix_types.h | 87 + arch/loongarch/include/asm/processor.h | 11 + arch/loongarch/include/asm/ptrace.h | 33 + arch/loongarch/include/asm/regdef.h | 42 + arch/loongarch/include/asm/sections.h | 8 + arch/loongarch/include/asm/setjmp.h | 20 + arch/loongarch/include/asm/spl.h | 11 + arch/loongarch/include/asm/stackframe.h | 175 ++ arch/loongarch/include/asm/string.h | 11 + arch/loongarch/include/asm/system.h | 72 + arch/loongarch/include/asm/types.h | 37 + arch/loongarch/include/asm/u-boot-loongarch.h | 23 + arch/loongarch/include/asm/u-boot.h | 30 + arch/loongarch/include/asm/unaligned.h | 11 + arch/loongarch/lib/Makefile | 22 + arch/loongarch/lib/asm-offsets.c | 66 + arch/loongarch/lib/boot.c | 14 + arch/loongarch/lib/bootm.c | 129 ++ arch/loongarch/lib/cache.c | 235 +++ arch/loongarch/lib/crt0_loongarch_efi.S | 182 ++ arch/loongarch/lib/elf_loongarch_efi.lds | 76 + arch/loongarch/lib/image.c | 77 + arch/loongarch/lib/interrupts.c | 184 +++ arch/loongarch/lib/reloc_loongarch_efi.c | 101 ++ arch/loongarch/lib/reset.c | 14 + arch/loongarch/lib/setjmp.S | 52 + arch/riscv/lib/image.c | 4 +- arch/sandbox/lib/bootm.c | 2 +- board/emulation/qemu-loongarch/Kconfig | 68 + board/emulation/qemu-loongarch/MAINTAINERS | 9 + board/emulation/qemu-loongarch/Makefile | 6 + .../emulation/qemu-loongarch/qemu-loongarch.c | 67 + .../qemu-loongarch/qemu-loongarch.env | 5 + boot/Kconfig | 1 + boot/bootm.c | 5 +- boot/image.c | 1 + cmd/Kconfig | 2 +- cmd/booti.c | 5 +- common/board_f.c | 2 +- common/spl/spl.c | 9 +- configs/qemu-loongarch64_defconfig | 35 + doc/arch/index.rst | 1 + doc/arch/loongarch.rst | 31 + doc/board/emulation/index.rst | 1 + doc/board/emulation/qemu-loongarch.rst | 39 + drivers/cpu/Kconfig | 6 + drivers/cpu/Makefile | 1 + drivers/cpu/loongarch_cpu.c | 145 ++ drivers/timer/Kconfig | 8 + drivers/timer/Makefile | 1 + drivers/timer/loongarch_timer.c | 132 ++ include/asm-generic/global_data.h | 2 +- include/asm-generic/pe.h | 2 + include/config_distro_bootcmd.h | 5 + include/configs/qemu-loongarch.h | 17 + include/elf.h | 9 +- include/host_arch.h | 2 + include/image.h | 8 +- include/linux/io.h | 3 +- include/pe.h | 2 + lib/efi_loader/Kconfig | 2 +- lib/efi_loader/efi_helper.c | 7 + lib/efi_loader/efi_image_loader.c | 40 + lib/efi_loader/efi_runtime.c | 4 + .../efi_selftest_miniapp_exception.c | 3 + lib/fdtdec.c | 127 +- 103 files changed, 5803 insertions(+), 78 deletions(-) create mode 100644 arch/loongarch/Kconfig create mode 100644 arch/loongarch/Makefile create mode 100644 arch/loongarch/config.mk create mode 100644 arch/loongarch/cpu/Makefile create mode 100644 arch/loongarch/cpu/cpu.c create mode 100644 arch/loongarch/cpu/generic/Kconfig create mode 100644 arch/loongarch/cpu/generic/Makefile create mode 100644 arch/loongarch/cpu/generic/cpu.c create mode 100644 arch/loongarch/cpu/generic/dram.c create mode 100644 arch/loongarch/cpu/genex.S create mode 100644 arch/loongarch/cpu/smp_secondary.S create mode 100644 arch/loongarch/cpu/start.S create mode 100644 arch/loongarch/cpu/u-boot.lds create mode 100644 arch/loongarch/dts/Makefile create mode 100644 arch/loongarch/include/asm/acpi_table.h create mode 100644 arch/loongarch/include/asm/addrspace.h create mode 100644 arch/loongarch/include/asm/arch-generic/entry-init.h create mode 100644 arch/loongarch/include/asm/asm.h create mode 100644 arch/loongarch/include/asm/atomic.h create mode 100644 arch/loongarch/include/asm/barrier.h create mode 100644 arch/loongarch/include/asm/bitops.h create mode 100644 arch/loongarch/include/asm/byteorder.h create mode 100644 arch/loongarch/include/asm/cache.h create mode 100644 arch/loongarch/include/asm/config.h create mode 100644 arch/loongarch/include/asm/cpu.h create mode 100644 arch/loongarch/include/asm/dma-mapping.h create mode 100644 arch/loongarch/include/asm/global_data.h create mode 100644 arch/loongarch/include/asm/gpio.h create mode 100644 arch/loongarch/include/asm/io.h create mode 100644 arch/loongarch/include/asm/linkage.h create mode 100644 arch/loongarch/include/asm/loongarch.h create mode 100644 arch/loongarch/include/asm/posix_types.h create mode 100644 arch/loongarch/include/asm/processor.h create mode 100644 arch/loongarch/include/asm/ptrace.h create mode 100644 arch/loongarch/include/asm/regdef.h create mode 100644 arch/loongarch/include/asm/sections.h create mode 100644 arch/loongarch/include/asm/setjmp.h create mode 100644 arch/loongarch/include/asm/spl.h create mode 100644 arch/loongarch/include/asm/stackframe.h create mode 100644 arch/loongarch/include/asm/string.h create mode 100644 arch/loongarch/include/asm/system.h create mode 100644 arch/loongarch/include/asm/types.h create mode 100644 arch/loongarch/include/asm/u-boot-loongarch.h create mode 100644 arch/loongarch/include/asm/u-boot.h create mode 100644 arch/loongarch/include/asm/unaligned.h create mode 100644 arch/loongarch/lib/Makefile create mode 100644 arch/loongarch/lib/asm-offsets.c create mode 100644 arch/loongarch/lib/boot.c create mode 100644 arch/loongarch/lib/bootm.c create mode 100644 arch/loongarch/lib/cache.c create mode 100644 arch/loongarch/lib/crt0_loongarch_efi.S create mode 100644 arch/loongarch/lib/elf_loongarch_efi.lds create mode 100644 arch/loongarch/lib/image.c create mode 100644 arch/loongarch/lib/interrupts.c create mode 100644 arch/loongarch/lib/reloc_loongarch_efi.c create mode 100644 arch/loongarch/lib/reset.c create mode 100644 arch/loongarch/lib/setjmp.S create mode 100644 board/emulation/qemu-loongarch/Kconfig create mode 100644 board/emulation/qemu-loongarch/MAINTAINERS create mode 100644 board/emulation/qemu-loongarch/Makefile create mode 100644 board/emulation/qemu-loongarch/qemu-loongarch.c create mode 100644 board/emulation/qemu-loongarch/qemu-loongarch.env create mode 100644 configs/qemu-loongarch64_defconfig create mode 100644 doc/arch/loongarch.rst create mode 100644 doc/board/emulation/qemu-loongarch.rst create mode 100644 drivers/cpu/loongarch_cpu.c create mode 100644 drivers/timer/loongarch_timer.c create mode 100644 include/configs/qemu-loongarch.h
Signature · 1 line
2.56.0