[PATCH v2 20/20] platform: generic: mips eyeq7h: prohibit accessing memory beyond DRAM

Vladimir Kondratiev Vladimir.Kondratiev at mobileye.com
Mon Feb 23 03:14:53 PST 2026


On 2/22/26 18:03, Anup Patel wrote:
>> SBI code arranges domain PMP regions in a way that last entry is
>> all-inclusive "0..~0 RWX" and the rest of entries are not programmed.
>> This causes 2 problems for the eyeq7h.
>>
>> 1) Remaining entries from the boot loader.
>> When PMP is actually programmed on the later stage, only defined entries
>> get programmed. Therefore, if boot code configured some entries beyond
>> what is set in domain configuration, it will be untouched. Ex: boot code
>> sets entries 14 and 15, leaving others unconfigured. To prevent such
>> left over PMP entries, domain should configure all possible PMP regions.
> Better disable unused PMP entries in generic code itself. Basically,
> sbi_hart_oldpmp_configure() and sbi_hart_smepmp_configure()
> can disable unused PMP entries at the end just before calling
> sbi_hart_pmp_fence().

Agree, this is possible. Question is whether all platforms are OK
with this, meaning no one relies on boot loader configured PMPs.

I will prepare patch that disable non-configured PMP entries instead of not
touching it as it is today.

Thanks, Vladimir.
> 
>> 2) speculative prefetches
>> CPU can issue speculative prefetches to non-existent addresses. If this
>> access goes to the system NOC, it is mis-interpreted as an access
>> violation and error is reported, forcing system reset.
>>
>> To prevent such a speculative transaction to leave a CPU cluster,
>> block it using PMP, by restricting memory region to physically present
>> memory.
> The unused PMP entries are typically used when we have
> multiple domains on a platform (e.g. non-secure domain and
> secure domain). Consuming unused PMP entries to block
> speculative transactions leaves no PMP entries for system-level
> partitioning using domains.
> 
> I assume MIPS does not want to support OpenSBI domain
> on their platforms ??

So far I see only root domain. If multiple domains will be supported by
OpenSBI, no reason why not support it on the p8700 platform.

Thanks, Vladimir



More information about the opensbi mailing list