From owner-freebsd-current@freebsd.org Wed Aug 29 09:26:53 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91C0C1082E18 for ; Wed, 29 Aug 2018 09:26:53 +0000 (UTC) (envelope-from freebsd@grem.de) Received: from mail.grem.de (outcast.grem.de [213.239.217.27]) by mx1.freebsd.org (Postfix) with SMTP id EA3FF83FE9 for ; Wed, 29 Aug 2018 09:26:52 +0000 (UTC) (envelope-from freebsd@grem.de) Received: (qmail 90577 invoked by uid 89); 29 Aug 2018 09:26:52 -0000 Received: from unknown (HELO bsd64.grem.de) (mg@grem.de@194.97.158.70) by mail.grem.de with ESMTPA; 29 Aug 2018 09:26:52 -0000 Date: Wed, 29 Aug 2018 11:26:51 +0200 From: Michael Gmelin To: Konstantin Belousov Cc: John Baldwin , "freebsd-current@freebsd.org" , Matthias Apitz Subject: Re: Fatal trap 12: page fault on Acer Chromebook 720 (peppy) Message-ID: <20180829112651.333b877b@bsd64.grem.de> In-Reply-To: <20180829112105.47124954@bsd64.grem.de> References: <20180820150904.GS2340@kib.kiev.ua> <57B6DC4C-16EE-4B7B-B691-CB79D8C40289@grem.de> <20180822154603.GW2340@kib.kiev.ua> <20180822211528.GB2340@kib.kiev.ua> <1C7DACDC-36F2-4E65-8C75-7B7215BB6546@grem.de> <20180824195947.GG2340@kib.kiev.ua> <32F22868-92ED-4223-84B5-77E72C7DCF50@grem.de> <20180824203903.GJ2340@kib.kiev.ua> <3CE9AF7F-CD5B-4FE3-9BDA-7F25C7A7C0B9@grem.de> <20180826130435.GS2340@kib.kiev.ua> <20180829112105.47124954@bsd64.grem.de> X-Mailer: Claws Mail 3.15.1 (GTK+ 2.24.31; amd64-portbld-freebsd10.3) X-Face: $wrgCtfdVw_H9WAY?S&9+/F"!41z'L$uo*WzT8miX?kZ~W~Lr5W7v?j0Sde\mwB&/ypo^}> +a'4xMc^^KroE~+v^&^#[B">soBo1y6(TW6#UZiC]o>C6`ej+i Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEWJBwe5BQDl LASZU0/LTEWEfHbyj0Txi32+sKrp1Mv944X8/fm1rS+cAAAACXBIWXMAAAsTAAAL EwEAmpwYAAAAB3RJTUUH3wESCxwC7OBhbgAAACFpVFh0Q29tbWVudAAAAAAAQ3Jl YXRlZCB3aXRoIFRoZSBHSU1QbbCXAAAAAghJREFUOMu11DFvEzEUAGCfEhBVFzuq AKkLd0O6VrIQsLXVSZXoWE5N1K3DobBBA9fQpRWc8OkWouaIjedWKiyREOKs+3PY fvalCNjgLVHeF7/3bMtBzV8C/VsQ8tecEgCcDgrzjekwKZ7TwsJZd/ywEKwwP+ZM 8P3drTsAwWn2mpWuDDuYiK1bFs6De0KUUFw0tWxm+D4AIhuuvZqtyWYeO7jQ4Aea 7jUqI+ixhQoHex4WshEvSXdood7stlv4oSuFOC4tqGcr0NjEqXgV4mMJO38nld4+ xKNxRDon7khyKVqY7YR4d+Cg0OMrkWXZOM7YDkEfKiilCn1qYv4mighZiynuHHOA Wq9QJq+BIES7lMFUtcikMnkDGHUoncA+uHgrP0ctIEqfwLHzeSo+eUA66AqzwN6n 2ZHJhw6Qh/PoyC/QENyEyC/AyNjq74Bs+3UH0xYwzDUC4B97HgLocg1QLYgDDO1v f3UX9Y307Ew4AHh67YAFFsxEpkXwpXY3eIgMhAAE3R19L919nNnuD2wlPcDE3UeT L2ytEICQib9BXgS2fU8PrD82ToYO1OEmMSnYTjSqSv9wdC0tPYC+rQRQD9ESnldF CyqfmiYW+tlALt8gH2xrMdC/youbjzPXEun+/ReXsMCDyve3dZc09fn2Oas8oXGc Jj6/fOeK5UmSMPmf/jL+GD8BEj0k/Fn6IO4AAAAASUVORK5CYII= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2018 09:26:53 -0000 On Wed, 29 Aug 2018 11:21:05 +0200 Michael Gmelin wrote: > On Sun, 26 Aug 2018 16:04:35 +0300 > Konstantin Belousov wrote: > > > On Sat, Aug 25, 2018 at 07:21:28PM +0200, Michael Gmelin wrote: > > > Now, with the patch applied correctly, the machine actually boots. > > > > > > Before calling init_ops.mp_bootaddress in > > > getmemsize (machdep.c), physmap looks like this: > > > > > > physmap_idx: 8 > > > i mem atop > > > 0 0x0 0x0 > > > 1 0x30000 0x30 > > > 2 0x40000 0x40 > > > 3 0x9e400 0x9e > > > 4 0x100000 0x100 > > > 5 0xf00000 0xf00 > > > 6 0x1000000 0x1000 > > > 7 0x7bf7a000 0x7bf7a > > > 8 0x100000000 0x100000 > > > 9 0x100600000 0x100600 > > > 10 0x0 0x0 > > > > > > With your patch, it looks like this now > > > (after calling getmemsize) > > > > > > 0 0x0 0x0 > > > 1 0x30000 0x30 > > > 2 0x40000 0x40 > > > 3 0x9e400 0x9e > > > 4 0x100000 0x100 > > > 5 0xf00000 0xf00 > > > 6 0x1000000 0x1000 > > > 7 0x7bf77000 0x7bf77 > > > 8 0x100000000 0x100000 > > > 9 0x100600000 0x100600 > > > 10 0x0 0x0 > > > PAGETABLES is 0x7bf77000 > > > > > > So I guess this means that the gap is now at the last three pages > > > of [0x1000, 0x7bf7a[. > > > > > > If this is what was intended, I guess it's good, as the machine > > > boots okay now. > > > > It triggered the new code to chomp at the end of the suitable range, > > instead of the start. Anyway, to do that, it must evaluated the > > start of the range as intersecting with the kernel text, which I > > interpret as success. > > > > I put a review with the change at D16907. > > > > > > > > Sorry again for the extra roundtrip, the patched file was simply > > > in the wrong path. > > > > No problem. > > Just to close the loop on this: This was fixed in r338858, thanks to > kib@ for analyzing the problem and creating a patch and to jhb@ for > reviewing it. > The actual revision this was fixed in is r338356 (https://svnweb.freebsd.org/base?view=revision&revision=338356), I tested r338358 (world+kernel) to verify the fix. Best, Michael -- Michael Gmelin