Re: [PATCH v6 10/11] riscv: dts: add initial canmv-k230 and k230-evb dts

Conor Dooley
2024-04-05T15:52:32Z

[-- Attachment #1: Type: text/plain, Size: 1414 bytes --]

On Mon, Mar 25, 2024 at 11:10:49AM +0800, Yangyu Chen wrote:
> > On Mar 25, 2024, at 00:23, Icenowy Zheng <uwu@icenowy.me> wrote:
> > 在 2024-03-23星期六的 20:12 +0800，Yangyu Chen写道：
> >> - Svpbmt and T-Head MAEE both supported
> >>
> >> T-Head C908 does support both Svpbmt and T-Head MAEE for page-based
> >> memory
> >> attributes and is controlled by BIT(21) on CSR.MXSTATUS. The Svpbmt
> >> is used
> >> here for mainline kernel support for K230. If the kernel wants to use
> >> Svpbmt, the M-Mode software should unset BIT(21) of CSR.MXSTATUS
> >> before
> >> entering the S-Mode kernel. Otherwise, the kernel will not boot, as 0
> >> on
> >> T-Head MAEE is NonCachable Memory. Once the kernel switches from bare
> >> metal
> >> to Sv39, It will lose dirty cache line modifications that haven't
> >> been
> >> written back to the memory.
> >
> > As MXSTATUS has a S-mode read-only mirror known as SXSTATUS, maybe the
> > kernel should detect SXSTATUS to decide whether to use Svpbmt or
> > Xtheadpbmt (BTW Svnapot conflicts with Xtheadpbmt too).
> >
>
> Thanks for this hint. I may need to change some code in the T-Head PBMT probe.

For now, I'd rather we just focused on supporting the standard
extensions on this SoC in mainline. I've applied the patches re-doing
the Kconfig options just now, feel free to resend these patches
whenever.

Thanks,
Conor.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]