git: 32d2a1de3d64 - main - arm64: correct physmap bounds in pmap_bootstrap()

From: Mitchell Horne <mhorne_at_FreeBSD.org>
Date: Thu, 27 Jun 2024 19:33:01 UTC
The branch main has been updated by mhorne:

URL: https://cgit.FreeBSD.org/src/commit/?id=32d2a1de3d64981ad99650bb0d9bc011a0aab7fc

commit 32d2a1de3d64981ad99650bb0d9bc011a0aab7fc
Author:     Mitchell Horne <mhorne@FreeBSD.org>
AuthorDate: 2024-06-27 19:30:00 +0000
Commit:     Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2024-06-27 19:32:44 +0000

    arm64: correct physmap bounds in pmap_bootstrap()
    
    physmap_idx now contains the raw value; we should not multiply it.
    
    Reviewed by:    markj
    Fixes:  d03e1ffbea6d ("arm64: Remove some redundant calculations...")
---
 sys/arm64/arm64/pmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c
index d072a387d9b9..f4a46823428a 100644
--- a/sys/arm64/arm64/pmap.c
+++ b/sys/arm64/arm64/pmap.c
@@ -1215,7 +1215,7 @@ pmap_bootstrap_dmap(vm_paddr_t min_pa)
 	dmap_phys_max = 0;
 	dmap_max_addr = 0;
 
-	for (i = 0; i < (physmap_idx * 2); i += 2) {
+	for (i = 0; i < physmap_idx; i += 2) {
 		bs_state.pa = physmap[i] & ~L3_OFFSET;
 		bs_state.va = bs_state.pa - dmap_phys_base + DMAP_MIN_ADDRESS;