Hi Michal,
>> +
>> +/*
>> + * Set limit address of MPU protection region.
>> + *
>> + * @pr: pointer to the protection region structure.
>> + * @limit: exclusive address as limit of the protection region.
>> + */
>> +static inline void pr_set_limit(pr_t *pr, paddr_t limit)
>> +{
>> + pr->prlar.reg.limit = (((limit - 1) & ~MPU_REGION_RES0)
> Might be worth adding a comment that PRLAR expects inclusive limit hence
> (limit -1).
You mean on top of the assignment? I’ve probably misunderstood you comment in
the past version
and thought that the @limit description was enough, I’m ok to add also this
comment.
I’ll fix your other findings.
Cheers,
Luca