From nobody Thu Feb 5 16:42:06 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4f6NKq0pPbz6QrTK for ; Thu, 05 Feb 2026 16:42:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4f6NKp73S9z3rLl for ; Thu, 05 Feb 2026 16:42:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1770309727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kk1ULucXVg2neUFkgRUsg9bwBJdpXVGaoqi3eUEwYpE=; b=TojzqHW16DQfD0pAxnhTvYH4maa9ncwAD/RlwrowyloKlKSnzTA2c9+sApWdjV90u/dmm/ 3hvhQ+eVXJ9BLG9ejnM2IYg21VsJdCjR18pzYUJDkeq79iAtZ9kGaHdXdT0WWdoj0ahJj+ NOWqahFlj4b2mkEvU6HsanAK3l73lncLPNh7sNhcmv40S1SW1ECKcCPnzaN6EYmBx1Eo4i WG1OF9FiYwnPoK8blQa7bM7RgIx8FJgextO3qtBH7zAIzAVefE8f5pQdzMFsrAreMX/c8A SALv45cMInO9aksEWKotj2OObu7uq82h3Q+3D9izN5gnvjdYZpm0eTgbpprR7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1770309727; a=rsa-sha256; cv=none; b=AGjP6YDdtaOFPKn1LwfrLnlnT8NXMpWxvFS1vO0Xq8Rx4ijaHI7/7U/cs4LX2M9iRTS1w3 mZPf0U5Fqix/mUCPcsBqyK9X9jG5y+t0SJdl1vzhb1h4ybmRRRtziLPt+cnlfJKXv1lce5 w08vfokjqD5cdybBJ9cGTVYuW1ShYDdGufOwNhuyupjpN+8BpjvTBdTDzZ9sW1rclAsEo+ 9HVbpwk+bRhj/7dBnfHiwql3gz3GrCGjcD6Rgp2BOZhubO6BRgrylly1bcnZ56C+EWOh7f OygEWLwts47OQHpXUwOHFllhqp/xuNezWEV7NLjdz8hQlRUOw3lmn1LxonZpOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1770309727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kk1ULucXVg2neUFkgRUsg9bwBJdpXVGaoqi3eUEwYpE=; b=o0AwHueN9tT2qyy1jCOYhqE5wacFUtd5bQoCPJHqGs3v1YkUuyVz/V62HNJz17i4/auL1p 89sle36lmqf3iY0vv86ZSB955H3HOvvN4dfA6nah25UTumr6PLuiYBL9ClScrPLhK+JswZ sWAWbRGrh1Eahiesf/pN7C9LVaORmW2LScJH4n/0C6U3Bn+Bdn4ePJH1a8CyijBgmjRIHP PF+1HKay8zdbvXYdWVl+CvpTgzy/dm3FpZiIEpF/cNe/NPLVbKmkbFX2tqVNp5CimMVlCz JZEy0VxLgj8FzMnhP2yGhpxuXPh0CJcHpfXXH290lmxFuBbHWsWeHrMk0OHCCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4f6NKp6g2yzdvC for ; Thu, 05 Feb 2026 16:42:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2141e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 05 Feb 2026 16:42:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Timothy Pearson Subject: git: 1364e7d0921b - main - powerpc64: Fix disappearing low memory on radix MMU systems (POWER9) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tpearson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1364e7d0921bfd79738dae80748d836730e39056 Auto-Submitted: auto-generated Date: Thu, 05 Feb 2026 16:42:06 +0000 Message-Id: <6984c85e.2141e.13103b45@gitrepo.freebsd.org> The branch main has been updated by tpearson: URL: https://cgit.FreeBSD.org/src/commit/?id=1364e7d0921bfd79738dae80748d836730e39056 commit 1364e7d0921bfd79738dae80748d836730e39056 Author: Timothy Pearson AuthorDate: 2026-02-04 05:16:39 +0000 Commit: Timothy Pearson CommitDate: 2026-02-05 16:42:01 +0000 powerpc64: Fix disappearing low memory on radix MMU systems (POWER9) The FreeBSD radix implementation piggybacks on the physical memory allocation function from the HPT implementation, but did not share the same state information for number of physical memory ranges. This led to a situation where the HPT physical memory allocator would attempt to shift the physical memory ranges in the shared range table, but would use the wrong number of entries, thus overwriting the large segment of low memory that should have been available for e.g. 32-bit DMA. Incorrect physical memory map: real memory = 33997058048 (32422 MB) available KVA = 34359619583 (32767 MB) Physical memory chunk(s): 0x0000000000003000 - 0x0000000000002fff, 0 bytes (0 pages) 0x000000000000e000 - 0x000000000000ffff, 8192 bytes (2 pages) 0x0000000000094000 - 0x0000000000ffffff, 16171008 bytes (3948 pages) 0x0000000100000000 - 0x00000007a2042fff, 28487987200 bytes (6955075 pages) 0x00000007d0006000 - 0x00000007fc72dfff, 745701376 bytes (182056 pages) 0x00000007fdc00000 - 0x00000007ff79ffff, 28966912 bytes (7072 pages) 0x00000007ff7d1000 - 0x00000007ff7effff, 126976 bytes (31 pages) avail memory = 29190103040 (27837 MB) FreeBSD/SMP: Multiprocessor System Detected: 16 CPUs Correct physical memory map: real memory = 33997058048 (32422 MB) available KVA = 34359619583 (32767 MB) Physical memory chunk(s): 0x0000000000003000 - 0x0000000000002fff, 0 bytes (0 pages) 0x000000000000e000 - 0x000000000000ffff, 8192 bytes (2 pages) 0x0000000000094000 - 0x0000000000ffffff, 16171008 bytes (3948 pages) 0x0000000002000000 - 0x000000000284ffff, 8716288 bytes (2128 pages) 0x0000000004627000 - 0x000000002fffffff, 731746304 bytes (178649 pages) 0x0000000034040000 - 0x00000000efffffff, 3153854464 bytes (769984 pages) 0x0000000100000000 - 0x00000007982ecfff, 28323008512 bytes (6914797 pages) 0x00000007cc20a000 - 0x00000007fc72dfff, 810696704 bytes (197924 pages) 0x00000007fdc00000 - 0x00000007ff79ffff, 28966912 bytes (7072 pages) 0x00000007ff7d1000 - 0x00000007ff7effff, 126976 bytes (31 pages) avail memory = 32984436736 (31456 MB) FreeBSD/SMP: Multiprocessor System Detected: 16 CPUs Signed-off-by: Timothy Pearson Sponsored-by: Raptor Computing Systems, LLC --- sys/powerpc/aim/mmu_oea64.c | 3 ++- sys/powerpc/aim/mmu_oea64.h | 1 + sys/powerpc/aim/mmu_radix.c | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/powerpc/aim/mmu_oea64.c b/sys/powerpc/aim/mmu_oea64.c index c82c5c539de2..a7042ffb02a9 100644 --- a/sys/powerpc/aim/mmu_oea64.c +++ b/sys/powerpc/aim/mmu_oea64.c @@ -164,9 +164,10 @@ extern void *slbtrap, *slbtrapend; static struct mem_region *regions; static struct mem_region *pregions; static struct numa_mem_region *numa_pregions; -static u_int phys_avail_count; static int regions_sz, pregions_sz, numapregions_sz; +u_int phys_avail_count; + extern void bs_remap_earlyboot(void); /* diff --git a/sys/powerpc/aim/mmu_oea64.h b/sys/powerpc/aim/mmu_oea64.h index 38b743159980..bc93cf4d521d 100644 --- a/sys/powerpc/aim/mmu_oea64.h +++ b/sys/powerpc/aim/mmu_oea64.h @@ -139,5 +139,6 @@ extern u_long moea64_pteg_count; extern u_long moea64_pteg_mask; extern int n_slbs; extern bool moea64_has_lp_4k_16m; +extern u_int phys_avail_count; #endif /* _POWERPC_AIM_MMU_OEA64_H */ diff --git a/sys/powerpc/aim/mmu_radix.c b/sys/powerpc/aim/mmu_radix.c index a12142fc2d7b..85008de83870 100644 --- a/sys/powerpc/aim/mmu_radix.c +++ b/sys/powerpc/aim/mmu_radix.c @@ -632,7 +632,6 @@ static unsigned int isa3_base_pid; */ static struct mem_region *regions, *pregions; static struct numa_mem_region *numa_pregions; -static u_int phys_avail_count; static int regions_sz, pregions_sz, numa_pregions_sz; static struct pate *isa3_parttab; static struct prte *isa3_proctab;