Details
- Reviewers
ngie - Commits
- rS322361: Support for v1.10 (latest) of RISC-V privilege specification.
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Replacing all instances of __riscv__ with __riscv seems like a slightly unwelcome inconsistency with other architectures. Is there a reason why this change needs to be made?
sys/riscv/riscv/machdep.c | ||
---|---|---|
858 | Why not make this a compile time check? |
So RISC-V is extensible ISA and the idea is to have built-in define per each extension, so together with __riscv we now have some subset of these as well (depends on -march string passed to compiler)
__riscv_compressed __riscv_atomic __riscv_mul __riscv_div __riscv_muldiv __riscv_fdiv __riscv_fsqrt __riscv_float_abi_soft __riscv_float_abi_single __riscv_float_abi_double __riscv_cmodel_medlow __riscv_cmodel_medany __riscv_cmodel_pic __riscv_xlen == 64
sys/riscv/riscv/machdep.c | ||
---|---|---|
858 | Good idea, added CTASSERT(FDT) |
If current compilers accept both __riscv__ and __riscv could we first commit that as an independent change?
- remove nop in crti.S
- remove align 2 (set to 0) in crti.S
this helps to build correct code
lib/csu/riscv/crti.S | ||
---|---|---|
49–50 | The compiler was inserting empty space of 2 bytes (0x0000) which is invalid instruction. Using nop we filling that space with real instruction. | |
sys/conf/ldscript.riscv | ||
9 | because BBL puts kernel to offset 0x200000 of physical memory. |
o Detect physical memory address kernel loaded to
o Remove offset to kernbase in RISC-V linker script