i386: Avoid registering overlapping vm_phys_seg entries

The entry added in pmap_bootstrap() is guaranteed to be covered by that
added in pmap_cold().  This apparently went unnoticed until commit
8a14ddcc1d8e ("vm_phys: Check for overlap when adding a segment").

PR:		285415
Tested by:	dim
MFC after:	2 weeks

(cherry picked from commit e173855c9f6b3b87c975418d0acf1c22ac4f1626)
This commit is contained in:
Mark Johnston 2025-03-26 05:34:53 -04:00
parent 5246532449
commit 24b82123a8

View file

@ -624,15 +624,6 @@ __CONCAT(PMTYPE, bootstrap)(vm_paddr_t firstaddr)
res = atop(firstaddr - (vm_paddr_t)KERNLOAD);
/*
* Add a physical memory segment (vm_phys_seg) corresponding to the
* preallocated kernel page table pages so that vm_page structures
* representing these pages will be created. The vm_page structures
* are required for promotion of the corresponding kernel virtual
* addresses to superpage mappings.
*/
vm_phys_early_add_seg(KPTphys, KPTphys + ptoa(nkpt));
/*
* Initialize the first available kernel virtual address.
* However, using "firstaddr" may waste a few pages of the