From owner-freebsd-current@freebsd.org Sun Jun 3 19:50:25 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 64FF6FF35AE for ; Sun, 3 Jun 2018 19:50:25 +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 BF57B78A70 for ; Sun, 3 Jun 2018 19:50:24 +0000 (UTC) (envelope-from freebsd@grem.de) Received: (qmail 86481 invoked by uid 89); 3 Jun 2018 19:50:22 -0000 Received: from unknown (HELO bsd64.grem.de) (mg@grem.de@194.97.158.70) by mail.grem.de with ESMTPA; 3 Jun 2018 19:50:22 -0000 Date: Sun, 3 Jun 2018 21:50:20 +0200 From: Michael Gmelin To: Konstantin Belousov Cc: Michael Gmelin , "freebsd-current@freebsd.org" , Matthias Apitz , jhb@freebsd.org Subject: Re: Fatal trap 12: page fault on Acer Chromebook 720 (peppy) Message-ID: <20180603215020.452a81d8@bsd64.grem.de> In-Reply-To: <20180603150423.GQ3789@kib.kiev.ua> References: <20180603144840.44bfea41@bsd64.grem.de> <20180603132110.GP3789@kib.kiev.ua> <20180603165500.361ec894@bsd64.grem.de> <20180603150423.GQ3789@kib.kiev.ua> 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.26 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, 03 Jun 2018 19:50:25 -0000 On Sun, 3 Jun 2018 18:04:23 +0300 Konstantin Belousov wrote: > On Sun, Jun 03, 2018 at 04:55:00PM +0200, Michael Gmelin wrote: > > > > > > On Sun, 3 Jun 2018 16:21:10 +0300 > > Konstantin Belousov wrote: > > > > > On Sun, Jun 03, 2018 at 02:48:40PM +0200, Michael Gmelin wrote: > > > > Hi, > > > > > > > > After upgrading CURRENT to r333992 (from something at least a > > > > year old, quite some changes in mp_machdep.c since), this > > > > machine crashes on boot: > > > > > > > > Copyright (c) 1992-2018 The FreeBSD Project. > > > > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, > > > > 1993, 1994 The Regents of the University of California. All > > > > rights reserved. FreeBSD is a registered trademark of The > > > > FreeBSD Foundation. FreeBSD 12.0-CURRENT #1 r333992: Tue May 22 > > > > 00:31:04 CEST 2018 > > > > root@flimsy:/usr/obj/usr/src/amd64.amd64/sys/flimsy amd64 > > > > FreeBSD clang version 6.0.0 (tags/RELEASE_600/final 326565) > > > > (based on LLVM 6.0.0) WARNING: WITNESS option enabled, expect > > > > reduced performance. VT(vga): resolution 640x480 CPU: Intel(R) > > > > Celeron(R) 2955U @ 1.40GHz (1396.80-MHz K8-class CPU) > > > > Origin="GenuineIntel" Id=0x40651 Family=0x6 Model=0x45 > > > > Stepping=1 > > > > Features=0xbfebfbff > > > CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE> > > > > Features2=0x4ddaebbf > > > xTPR,PDCM,PCID,SSE4.1,SSE4.2,MOVBE,POPCNT,TSCDLT,XSAVE,OSXSAVE,RDRAND> > > > > AMD Features=0x2c100800 AMD > > > > Features2=0x21 Structured Extended > > > > Features=0x2603 XSAVE > > > > Features=0x1 VT-x: (disabled in BIOS) > > > > PAT,HLT,MTF,PAUSE,EPT,UG,VPID TSC: P-state invariant, > > > > performance statistics real memory = 4301258752 (4102 MB) > > > > avail memory = 1907572736 (1819 MB) Event timer "LAPIC" quality > > > > 600 ACPI APIC Table: > > > What does this mean ? Did you flashed coreboot ? > > > > This machine comes with it by default (my model was delivered with > > SeaBIOS 20131018_145217-build121-m2). So I didn't flash anything > > (didn't feel like bricking it). > > > > > > > > > kernel trap 12 with interrupts disabled > > > > > > > > Fatal trap 12: page fault while in kernel mode > > > > cpuid = 0; apic id = 00 > > > > fault virtual address = 0xfffff80001000000 > > > > fault code = supervisor write data, protection > > > > violation instruction pointer = 0x20:Oxffffffff8102955f > > > > stack pointer = 0x28:0xffffffff82a79be0 > > > > frame pointer = 0x28:0xffffffff82a79c10 > > > > code segment = base Ox0, limit Oxfffff, type Ox1b > > > > = DPL 0, pres 1, long 1, def32 0, gran > > > > 1 processor eflags = resume, IOPL = 0 > > > > current process = 0 () > > > > [ thread pid 0 tid 0 ] > > > > Stopped at native_start_all_aps+0x08f: movq > > > > %rax,(%rsi) > > > Look up the source line number for this address. > > > > > > > I guess that's sys/amd64/amd64/support.S line 854 (in rdmsr), > > called by native_start_all_aps. Any additional hints how I can > > track it down? > Why did you decided that this is rdmsr_safe() ? First, > native_start_all_aps() does not call rdmsr, second the ddb > report clearly indicates that the fault occured acessing DMAP in > native_start_all_aps(). > > Just look up the source line by the address > native_start_all_aps+0x08f. Okay, according to kgbd this should be here: https://svnweb.freebsd.org/base/head/sys/amd64/amd64/mp_machdep.c?revision=333368&view=markup#l369 364 365 /* Create the initial 1GB replicated page tables */ 366 for (i = 0; i < 512; i++) { 367 /* Each slot of the level 4 pages points to the same level 3 page */ 368 pt4[i] = (u_int64_t)(uintptr_t)(mptramp_pagetables + PAGE_SIZE); 369 pt4[i] |= PG_V | PG_RW | PG_U; 370 371 /* Each slot of the level 3 pages points to the same level 2 page */ 372 pt3[i] = (u_int64_t)(uintptr_t)(mptramp_pagetables + (2 * PAGE_SIZE)); 373 pt3[i] |= PG_V | PG_RW | PG_U; 374 375 /* The level 2 page slots are mapped with 2MB pages for 1GB. */ 376 pt2[i] = i * (2 * 1024 * 1024); 377 pt2[i] |= PG_V | PG_RW | PG_PS | PG_U; 378 } -m p.s. This machine uses quirks in biosmem.c, see Type '?' for a list of command, 'help' for more detailed help. OK biosmem bios_basemem: 0x9e400 bios_extmem: 0x3ff00000 memtop: 0x3c000000 high_heap_base: 0x3c000000 high_heap_size: 0x4000000 bios_quirks: 0x01 BQ_DISTRUST_820_EXTMEM b_bios_probed: 0x0a B_BASEMEM_12 B_EXTMEM_E801 -- Michael Gmelin -- Michael Gmelin