Closed yf13 closed 9 months ago
The address offsets for the MTIME and MTIMECMP registers?
You can refer to the k230.dtsi, which is correct.
The frquency of the MTIMER in CLINT?
That is timebase-frequency
in dts, which is 27000000.
The meaning of the clint,has-no-64bit-mmio flag in k230.dtsi. Does it mean that we can't access CLINT registers with 64 bit load/store instructions?
Yes. If you want to use the mainline kernel and OpenSBI, you can replace "riscv,clint0" with "thead,c900-clint" and replace "riscv,plic0" with "thead,c900-plic". Both of them imply "clint,has-no-64bit-mmio" and it has been supported in mainline kernel and opensbi.
Once you have changed "riscv,plic0" to "thead,c900-plic", you need to specify the IRQ type (i.e. LEVEL or EDGE) in the dts. See my changes here.
@cyyself thanks a lot.
It seems that the hw.dtb
used with big core opensbi uses 8Mhz timebase-freqency
, maybe that is not used at all?
@wuwentao do you know the actual frequency of the CLINT timer frequencies of the two CPUs? If they are different, please teach.
@cyyself thanks for sharing the information.
With your suggested tweaks of u-boot in #48, I can run NuttX w/ MMU support on K230 using standard Risc-V compliant PTE format. I also did simple test with NuttX that 27Mhz works fine with CPU0.
I also can run mainline OpenSBI with test payload on CanMV-k230, though NuttX payload still not working right yet.
@cyyself thanks a lot.
It seems that the
hw.dtb
used with big core opensbi uses 8Mhztimebase-freqency
, maybe that is not used at all?
yes ,not used at all,hw.dtb is use only in big core opensbi.
@wuwentao do you know the actual frequency of the CLINT timer frequencies of the two CPUs? If they are different, please teach. both is 27Mhz
Help
Can you please teach answers for the following CLINT questions:
clint,has-no-64bit-mmio
flag in k230.dtsi. Does it mean that we can't access CLINT registers with 64 bit load/store instructions?