Skip to content
Commit 1dde9775 authored by Alexandre Ghiti's avatar Alexandre Ghiti Committed by Tom Rini
Browse files

riscv: Fix build against binutils 2.38



The following description is copied from the equivalent patch for the
Linux Kernel proposed by Aurelien Jarno:

>From version 2.38, binutils default to ISA spec version 20191213. This
means that the csr read/write (csrr*/csrw*) instructions and fence.i
instruction has separated from the `I` extension, become two standalone
extensions: Zicsr and Zifencei. As the kernel uses those instruction,
this causes the following build failure:

arch/riscv/cpu/mtrap.S: Assembler messages:
arch/riscv/cpu/mtrap.S:65: Error: unrecognized opcode `csrr a0,scause'
arch/riscv/cpu/mtrap.S:66: Error: unrecognized opcode `csrr a1,sepc'
arch/riscv/cpu/mtrap.S:67: Error: unrecognized opcode `csrr a2,stval'
arch/riscv/cpu/mtrap.S:70: Error: unrecognized opcode `csrw sepc,a0'

Signed-off-by: default avatarAlexandre Ghiti <alexandre.ghiti@canonical.com>
Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
Tested-by: default avatarHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tested-by: default avatarHeiko Stuebner <heiko@sntech.de>
Tested-by: default avatarChristian Stewart <christian@paral.in>
Reviewed-by: default avatarRick Chen <rick@andestech.com>
parent 3672ed71
Loading
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment