HomeFreeBSD

powerpc64: fix the calculation of Maxmem

Description

powerpc64: fix the calculation of Maxmem

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.

Reviewed by: jhibbits
Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision: https://reviews.freebsd.org/D33449
MFC after: 2 weeks

Details

Provenance
luporlAuthored on Dec 15 2021, 11:49 AM
Reviewer
jhibbits
Differential Revision
D33449: powerpc64: fix the calculation of Maxmem
Parents
rG18679ab1c065: mmc_sim: fix setting of the mutex name
Branches
Unknown
Tags
Unknown