Page MenuHomeFreeBSD

powerpc64: fix the calculation of Maxmem
ClosedPublic

Authored by luporl on Dec 14 2021, 9:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Mar 28, 12:03 PM
Unknown Object (File)
Sat, Mar 28, 9:25 AM
Unknown Object (File)
Fri, Mar 27, 1:42 PM
Unknown Object (File)
Fri, Mar 27, 6:06 AM
Unknown Object (File)
Mon, Mar 23, 10:26 AM
Unknown Object (File)
Sun, Mar 22, 2:47 AM
Unknown Object (File)
Thu, Mar 19, 11:27 PM
Unknown Object (File)
Sun, Mar 15, 9:12 AM
Subscribers

Details

Summary

The calculation of Maxmem was skipping the last phys_avail segment,
because of a wrong stop condition.

This was detected when using QEMU/PowerNV with Radix MMU and
low memory (2G). In this case opal_pci would allocate a DMA window
that was too small to cover all physical memory, resulting in reading all
zeroes from disk when using memory that was not inside the allocated
window.

Test Plan

Tested on QEMU/PowerNV, S812L (POWER8) and Talos II (POWER9).

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable