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)
Jan 15 2024, 1:55 PM
Unknown Object (File)
Jan 12 2024, 7:43 AM
Unknown Object (File)
Jan 11 2024, 8:04 AM
Unknown Object (File)
Dec 23 2023, 7:20 PM
Unknown Object (File)
Dec 20 2023, 5:25 AM
Unknown Object (File)
Nov 11 2023, 7:01 AM
Unknown Object (File)
Nov 9 2023, 2:09 AM
Unknown Object (File)
Nov 7 2023, 1:51 PM
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