riscv-software-src / opensbi

RISC-V Open Source Supervisor Binary Interface
Other
1k stars 501 forks source link

lib: sbi_domain: Fix PMP condition for addresses #346

Closed CodingVoid closed 6 months ago

CodingVoid commented 7 months ago

In order to put an address/size into an NAPOT PMP region, the address needs to be aligned to the size shifted two to the right.

Example: fw_start: 0x80040000 fw_size: 0x00040000 PMP address: 0x80040000 | (0x00040000 >> 2) fw_size is valid, but not in the current implementation

Fixes issue #345

avpatel commented 7 months ago

We have mailing list based patch review so it would be great if you can send these patchs to OpenSBI mailing list.

You need to join OpenSBI mailing list using following link http://lists.infradead.org/mailman/listinfo/opensbi

Make sure you use "git send-email" to send the patches.

Regards, Anup

CodingVoid commented 7 months ago

Sorry I didn't know that. I will send the patch via email.