[riscv] Correct page table stride calculation

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2025-10-27 14:04:08 +00:00
parent 426c721e32
commit 0ddd830693

View File

@@ -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 */