Messages in this thread | | | From | Philipp Tomsich <> | Date | Wed, 13 Apr 2022 11:09:31 +0200 | Subject | Re: [PATCH v9 08/12] riscv: Fix accessing pfn bits in PTEs for non-32bit variants |
| |
On Wed, 13 Apr 2022 at 05:04, Heiko Stuebner <heiko@sntech.de> wrote: > > On rv32 the PFN part of PTEs is defined to use bits [xlen-1:10] > while on rv64 it is defined to use bits [53:10], leaving [63:54] > as reserved. > > With upcoming optional extensions like svpbmt these previously > reserved bits will get used so simply right-shifting the PTE > to get the PFN won't be enough. > > So introduce a _PAGE_PFN_MASK constant to mask the correct bits > for both rv32 and rv64 before shifting. > > Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Philipp Tomsich <philipp.tomsich@vrull.eu>
| |