Re: [PATCH v3 07/12] riscv: Add option to support RISC-V privileged spec 1.9.1

2020-02-04 Thread Sean Anderson
On 2/4/20 11:04 AM, Bin Meng wrote: > Hi Sean, > > On Tue, Feb 4, 2020 at 10:48 PM Sean Anderson wrote: >> In any case, the errors I get are >> >> arch/riscv/cpu/cpu.c: Assembler messages: >> arch/riscv/cpu/cpu.c:94: Error: unknown CSR `CSR_MSCOUNTEREN' >> arch/riscv/cpu/cpu.c:94: Error: unknown

Re: [PATCH v3 07/12] riscv: Add option to support RISC-V privileged spec 1.9.1

2020-02-04 Thread Bin Meng
Hi Sean, On Tue, Feb 4, 2020 at 10:48 PM Sean Anderson wrote: > > On 2/4/20 9:38 AM, Bin Meng wrote: > > Hi Sean, > > > > On Tue, Feb 4, 2020 at 10:19 PM Sean Anderson wrote: > >> I believe the macro compiles to "csrs CSR_FOO". At least with my > >> gcc/binutils (9.2.0/2.33.1) this style is not

Re: [PATCH v3 07/12] riscv: Add option to support RISC-V privileged spec 1.9.1

2020-02-04 Thread Sean Anderson
On 2/4/20 9:38 AM, Bin Meng wrote: > Hi Sean, > > On Tue, Feb 4, 2020 at 10:19 PM Sean Anderson wrote: >> I believe the macro compiles to "csrs CSR_FOO". At least with my >> gcc/binutils (9.2.0/2.33.1) this style is not available for these older >> CSRs. Perhaps it would work if we switched to le

Re: [PATCH v3 07/12] riscv: Add option to support RISC-V privileged spec 1.9.1

2020-02-04 Thread Bin Meng
Hi Sean, On Tue, Feb 4, 2020 at 10:19 PM Sean Anderson wrote: > > > On 2/4/20 6:21 AM, Bin Meng wrote: > > Hi Sean, > > > > On Mon, Feb 3, 2020 at 4:05 AM Sean Anderson wrote: > >> > >> Some older processors (notably the Kendryte K210) use an older version of > >> the > >> RISC-V privileged spe

Re: [PATCH v3 07/12] riscv: Add option to support RISC-V privileged spec 1.9.1

2020-02-04 Thread Sean Anderson
On 2/4/20 6:21 AM, Bin Meng wrote: > Hi Sean, > > On Mon, Feb 3, 2020 at 4:05 AM Sean Anderson wrote: >> >> Some older processors (notably the Kendryte K210) use an older version of the >> RISC-V privileged specification. The primary changes between the old and new >> are >> in virtual memory,

Re: [PATCH v3 07/12] riscv: Add option to support RISC-V privileged spec 1.9.1

2020-02-04 Thread Bin Meng
Hi Sean, On Mon, Feb 3, 2020 at 4:05 AM Sean Anderson wrote: > > Some older processors (notably the Kendryte K210) use an older version of the > RISC-V privileged specification. The primary changes between the old and new > are > in virtual memory, and in the merging of three separate counter en

[PATCH v3 07/12] riscv: Add option to support RISC-V privileged spec 1.9.1

2020-02-02 Thread Sean Anderson
Some older processors (notably the Kendryte K210) use an older version of the RISC-V privileged specification. The primary changes between the old and new are in virtual memory, and in the merging of three separate counter enable CSRs. Using the new CSR on an old processor causes an illegal instruc