Re: [PATCH V3 1/2] riscv-platform-spec: PLIC and CLINT for Linux-2022 platform

Abner Chang

Greg Favor <gfavor@...> 於 2021年5月8日 週六 上午1:25寫道:
On Fri, May 7, 2021 at 9:01 AM Abner Chang <renba.chang@...> wrote:
Initial description of PLIC  CLINT section of Linux-2022 platform.

Is this what we want to see of CLINT/Machine mode timer in the
platform spec?

I think we need a two-part treatment of the M-mode timer requirements.

For the "legacy/deprecated" PLIC+CLINT requirement, the platform spec should contain separate chapters that provide specs of the required PLIC and CLINT.  When this requirement gets removed in the 2024 platform spec, these chapters will simply disappear.

For the "new" AIA+"M-mode timer" requirement, the platform spec should contain a separate chapter that specs just the M-mode timer hardware.  This happens to be a subset of the above CLINT spec, but should be a standalone spec (especially since the CLINT chapter will eventually go away).
Hi Greg,
I am going to restructure the sections for PLIC/CLINT/MTIMER. I am not quite sure your preference of  "separate chapters that provide specs of the required PLIC and CLINT". The chapters in riscv-platform-spec are based on the platform definition, thus I think to have separate sections is good enough. The structure of sections would be looked as below,

1.1.3. Interrupt Controller  AIA  PLIC + CLINT [DEPRECATED] Interrupt Assignments

1.1.4. System Peripherals UART/Serial Console Clocks Timers ,Watchdog Timers Machine Mode Timer
With the above, we can remove section for Linux2024. Is this ok?


In the "M-mode timer" chapter, the offsets should be rebased to 0x0, i.e. the mtimecmp registers start at offset 0x0000, and mtime is at 0x7FF8.



Join { to automatically receive all group messages.