[librm] Correct page table stride calculation

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

View File

@@ -307,7 +307,7 @@ static void * ioremap_pages ( unsigned long bus_addr, size_t len ) {
sizeof ( io_pages.page[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 */