https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285415

--- Comment #3 from Dimitry Andric <d...@freebsd.org> ---
What seems to be happening is that in vm_phys_early_startup() it goes through
vm_phys_early_segs, which look like:

  vm_phys_early_nsegs=2
  vm_phys_early_segs[0]={start= 800000, end=2500000, domain=0}
  vm_phys_early_segs[1]={start=2400000, end=24f0000, domain=0}

So indeed, there is already an overlap, from whatever filled
vm_phys_early_segs.

With some help from EARLY_PRINTF I was able to get the following early boot
messages:

  DBG /usr/src/sys/i386/i386/machdep.c(916) getmemsize: calling
vm_phys_early_add_seg(start=800000, end=2500000)
  DBG /usr/src/sys/vm/vm_phys.c(1927) vm_phys_early_add_seg: enter,
start=800000, end=2500000
  DBG /usr/src/sys/vm/vm_phys.c(1936) vm_phys_early_add_seg: leave,
vm_phys_early_nsegs=1
  SMAP type=01 base=0000000000000000 len=000000000009fc00
  SMAP type=02 base=000000000009fc00 len=0000000000000400
  SMAP type=02 base=00000000000e0000 len=0000000000020000
  SMAP type=01 base=0000000000100000 len=00000000f7ef0000
  SMAP type=03 base=00000000f7ff0000 len=000000000000f000
  SMAP type=04 base=00000000f7fff000 len=0000000000001000
  SMAP type=01 base=0000000100000000 len=0000000108000000
  DBG /usr/src/sys/i386/i386/pmap.c(624) pmap_pae_bootstrap: calling
vm_phys_early_add_seg(start=2400000, end=24f0000)
  DBG /usr/src/sys/vm/vm_phys.c(1927) vm_phys_early_add_seg: enter,
start=2400000, end=24f0000
  DBG /usr/src/sys/vm/vm_phys.c(1936) vm_phys_early_add_seg: leave,
vm_phys_early_nsegs=2

So you can see that the segment [0x800000, 0x2500000) is inserted from
getmemsize(), but the overlapping segment [0x2400000, 0x24f0000) is inserted
from pmap_pae_bootstrap(KPTphys, KPTphys + ptoa(nkpt));

It looks like KPTphys is the result of allocpages(NKPT, &physfree), but I am
unsure why that would result in a range that overlaps.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to