HomeFreeBSD

loader/libofw: Fix disk size truncation

Description

loader/libofw: Fix disk size truncation

At present OF_ioctl first multiplies, then casts to 64-bit, meaning at
the asm level it truncates the result to 32-bit, then zero-extends it to
64-bit to return. Cast n to 64-bit before multiplying, so that the
correct result is returned.

(cherry picked from commit cd6e526e268e4fdf1c9a65b9d792e67343f52307)

Details

Provenance
jhibbitsAuthored on Feb 20 2024, 10:08 PM
impCommitted on Apr 16 2024, 7:54 PM
Parents
rG57ca2848c0aa: loader: Make MK_LOADER_BIOS_TEXTONLY work
Branches
Unknown
Tags
Unknown