Date: Wed, 22 Aug 2018 22:03:54 +0200 From: Michael Gmelin <freebsd@grem.de> To: Konstantin Belousov <kostikbel@gmail.com> Cc: John Baldwin <jhb@FreeBSD.org>, "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>, Matthias Apitz <guru@unixarea.de> Subject: Re: Fatal trap 12: page fault on Acer Chromebook 720 (peppy) Message-ID: <C8BC1622-4F47-4E56-A428-46DAC5CE71B4@grem.de> In-Reply-To: <20180822154603.GW2340@kib.kiev.ua> References: <20180815135531.GA2340@kib.kiev.ua> <FAEA5B0A-5302-4A48-B322-21CB0D97C8CC@grem.de> <e82ed552-83b0-5331-3117-6750b8c205f7@FreeBSD.org> <07E28AC5-EBE6-4893-810A-6C03F07925C8@grem.de> <8726bc32-6023-bfe1-7600-5b2c706236f8@FreeBSD.org> <20180819165951.274d61b0@bsd64.grem.de> <20180819161642.GP2340@kib.kiev.ua> <20180820004512.5171fa75@bsd64.grem.de> <20180820150904.GS2340@kib.kiev.ua> <57B6DC4C-16EE-4B7B-B691-CB79D8C40289@grem.de> <20180822154603.GW2340@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
> On 22. Aug 2018, at 17:46, Konstantin Belousov <kostikbel@gmail.com> wrote= : >=20 >> On Tue, Aug 21, 2018 at 12:14:35AM +0200, Michael Gmelin wrote: >>=20 >>=20 >>>> On 20. Aug 2018, at 17:09, Konstantin Belousov <kostikbel@gmail.com> wr= ote: >>>>=20 >>>> On Mon, Aug 20, 2018 at 12:45:12AM +0200, Michael Gmelin wrote: >>>>=20 >>>> See here for a screenshot (also including the output of "show pte >>>> 0xfffff80001000000"): >>>>=20 >>>> https://gist.github.com/grembo/78d0f2a100dd4f16775b85a118769658#file-dd= b1-png >>> It is too early for ddb routines to register. >>> Ok can you try the following debugging patch, to verify my guess ? >>>=20 >>> 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 >>> @@ -1052,8 +1052,7 @@ create_pagetables(vm_paddr_t *firstaddr) >>> pd_p =3D (pd_entry_t *)DMPDkernphys; >>> for (i =3D 0; i < (NPDEPG * nkdmpde); i++) >>> pd_p[i] =3D (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 =3D 0; i < nkdmpde; i++) >>> pdp_p[i] =3D (DMPDkernphys + ptoa(i)) | X86_PG_RW | >>> X86_PG_V; >>=20 >> With this change it boots okay (mptramp_pagetables is 0x1000000, as expec= ted). >=20 > Can you apply the following on top of the previous debugging patch and sho= w > me the line printed ? >=20 > 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 > @@ -2662,6 +2662,7 @@ pmap_pinit0(pmap_t pmap) > pmap->pm_pcids[i].pm_gen =3D 1; > } > pmap_activate_boot(pmap); > +printf("bootaddr addr %#lx rwx %#lx btext %#lx _end %#lx brwsection %#lx e= text %#lx KERNBASE %#lx\n", 0x1000000UL, bootaddr_rwx(0x1000000UL), (uintptr= _t)btext, (uintptr_t)_end, (uintptr_t)brwsection, (uintptr_t)etext, (uintptr= _t)KERNBASE); > } >=20 > void bootaddr addr 0x1000000 rwx 0 btext 0xffffffff80342000 _end 0xffffffff823cf8= 40 brwsection #ffffffff81a00000 etext 0xffffffff812041e4 KERNBASE 0xffffffff= 80000000 Best, Michael
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C8BC1622-4F47-4E56-A428-46DAC5CE71B4>