mirror of
https://github.com/ipxe/ipxe
synced 2025-12-07 01:40:28 +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] ) ) );
|
sizeof ( page_table.pte[0] ) ) );
|
||||||
|
|
||||||
/* Round up number of pages to a power of two */
|
/* Round up number of pages to a power of two */
|
||||||
stride = ( 1 << ( fls ( count ) - 1 ) );
|
stride = ( 1 << fls ( count - 1 ) );
|
||||||
assert ( count <= stride );
|
assert ( count <= stride );
|
||||||
|
|
||||||
/* Allocate pages */
|
/* Allocate pages */
|
||||||
|
|||||||
Reference in New Issue
Block a user