On Tue, Aug 21, 2018 at 12:14:35AM +0200, Michael Gmelin wrote: > > > > On 20. Aug 2018, at 17:09, Konstantin Belousov <kostikbel_at_gmail.com> wrote: > > > >> On Mon, Aug 20, 2018 at 12:45:12AM +0200, Michael Gmelin wrote: > >> > >> See here for a screenshot (also including the output of "show pte > >> 0xfffff80001000000"): > >> > >> https://gist.github.com/grembo/78d0f2a100dd4f16775b85a118769658#file-ddb1-png > > It is too early for ddb routines to register. > > Ok can you try the following debugging patch, to verify my guess ? > > > > diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c > > index 18777d23f09..cd05fdb763f 100644 > > --- a/sys/amd64/amd64/pmap.c > > +++ b/sys/amd64/amd64/pmap.c > > _at__at_ -1052,8 +1052,7 _at__at_ create_pagetables(vm_paddr_t *firstaddr) > > pd_p = (pd_entry_t *)DMPDkernphys; > > for (i = 0; i < (NPDEPG * nkdmpde); i++) > > pd_p[i] = (i << PDRSHIFT) | X86_PG_V | PG_PS | pg_g | > > - X86_PG_M | X86_PG_A | pg_nx | > > - bootaddr_rwx(i << PDRSHIFT); > > + X86_PG_M | X86_PG_A | pg_nx | X86_PG_RW; > > for (i = 0; i < nkdmpde; i++) > > pdp_p[i] = (DMPDkernphys + ptoa(i)) | X86_PG_RW | > > X86_PG_V; > > With this change it boots okay (mptramp_pagetables is 0x1000000, as expected). Can you apply the following on top of the previous debugging patch and show me the line printed ? diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 3d70532b7fd..613fa9f2165 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c _at__at_ -2662,6 +2662,7 _at__at_ pmap_pinit0(pmap_t pmap) pmap->pm_pcids[i].pm_gen = 1; } pmap_activate_boot(pmap); +printf("bootaddr addr %#lx rwx %#lx btext %#lx _end %#lx brwsection %#lx etext %#lx KERNBASE %#lx\n", 0x1000000UL, bootaddr_rwx(0x1000000UL), (uintptr_t)btext, (uintptr_t)_end, (uintptr_t)brwsection, (uintptr_t)etext, (uintptr_t)KERNBASE); } voidReceived on Wed Aug 22 2018 - 13:46:19 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:17 UTC