Page MenuHomeFreeBSD

powerpc64: fix the calculation of Maxmem
ClosedPublic

Authored by luporl on Dec 14 2021, 9:11 PM.
Tags
None
Referenced Files
F154874379: D33449.diff
Wed, Apr 29, 4:36 PM
Unknown Object (File)
Tue, Apr 28, 2:16 AM
Unknown Object (File)
Fri, Apr 24, 7:39 AM
Unknown Object (File)
Thu, Apr 16, 11:53 PM
Unknown Object (File)
Thu, Apr 16, 3:47 PM
Unknown Object (File)
Mon, Apr 13, 1:09 PM
Unknown Object (File)
Mon, Apr 13, 5:34 AM
Unknown Object (File)
Sun, Apr 12, 12:59 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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 43353
Build 40241: arc lint + arc unit