Skip to content

Commit

Permalink
arm64: correct physmap bounds in pmap_bootstrap()
Browse files Browse the repository at this point in the history
physmap_idx now contains the raw value; we should not multiply it.

Reviewed by:	markj
Fixes:	d03e1ff ("arm64: Remove some redundant calculations...")
  • Loading branch information
mhorne committed Jun 27, 2024
1 parent 995730a commit 32d2a1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sys/arm64/arm64/pmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 32d2a1d

Please sign in to comment.