mirror of
https://github.com/ipxe/ipxe
synced 2025-12-06 17:30:26 +03:00
[riscv] Correct page table stride calculation
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user