diff options
| author | Michael Brown | 2025-10-27 15:04:08 +0100 |
|---|---|---|
| committer | Michael Brown | 2025-10-27 15:22:16 +0100 |
| commit | 0ddd83069363f411881442857d5971654638a986 (patch) | |
| tree | 3e39a41f03d4e5c6e39959774cbd456e0a84de7f /src/arch/riscv/core | |
| parent | [librm] Correct page table stride calculation (diff) | |
| download | ipxe-0ddd83069363f411881442857d5971654638a986.tar.gz ipxe-0ddd83069363f411881442857d5971654638a986.tar.xz ipxe-0ddd83069363f411881442857d5971654638a986.zip | |
[riscv] Correct page table stride calculation
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/arch/riscv/core')
| -rw-r--r-- | src/arch/riscv/core/svpage.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/riscv/core/svpage.c b/src/arch/riscv/core/svpage.c index 0728289b0..c0fa8b445 100644 --- a/src/arch/riscv/core/svpage.c +++ b/src/arch/riscv/core/svpage.c @@ -150,7 +150,7 @@ static void * svpage_map ( physaddr_t phys, size_t len, unsigned long attrs ) { sizeof ( page_table.pte[0] ) ) ); /* Round up number of pages to a power of two */ - stride = ( 1 << ( fls ( count ) - 1 ) ); + stride = ( 1 << fls ( count - 1 ) ); assert ( count <= stride ); /* Allocate pages */ |
