From owner-freebsd-current@freebsd.org Sun Aug 26 13:04:47 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 79D8F107643E for ; Sun, 26 Aug 2018 13:04:47 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF64080663; Sun, 26 Aug 2018 13:04:46 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id w7QD4Ztd044716 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 26 Aug 2018 16:04:38 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w7QD4Ztd044716 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w7QD4Z0R044715; Sun, 26 Aug 2018 16:04:35 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 26 Aug 2018 16:04:35 +0300 From: Konstantin Belousov To: Michael Gmelin Cc: John Baldwin , "freebsd-current@freebsd.org" , Matthias Apitz Subject: Re: Fatal trap 12: page fault on Acer Chromebook 720 (peppy) Message-ID: <20180826130435.GS2340@kib.kiev.ua> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3CE9AF7F-CD5B-4FE3-9BDA-7F25C7A7C0B9@grem.de> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home 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: Sun, 26 Aug 2018 13:04:47 -0000 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.