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)
Wed, Oct 8, 6:30 AM
Unknown Object (File)
Fri, Oct 3, 8:00 AM
Unknown Object (File)
Tue, Sep 30, 4:44 AM
Unknown Object (File)
Tue, Sep 16, 3:33 AM
Unknown Object (File)
Aug 1 2025, 2:01 PM
Unknown Object (File)
Jul 26 2025, 11:17 AM
Unknown Object (File)
Jul 25 2025, 6:56 AM
Unknown Object (File)
Jul 25 2025, 12:02 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