From owner-freebsd-bugs@freebsd.org Tue Mar 27 13:16:54 2018 Return-Path: Delivered-To: freebsd-bugs@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 D3C04F51D35 for ; Tue, 27 Mar 2018 13:16:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6AC698421E for ; Tue, 27 Mar 2018 13:16:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 83EDF1DDE for ; Tue, 27 Mar 2018 13:16:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w2RDGqMa077644 for ; Tue, 27 Mar 2018 13:16:52 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w2RDGq91077643 for freebsd-bugs@FreeBSD.org; Tue, 27 Mar 2018 13:16:52 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 226974] kernel DSI read trap at boot Date: Tue, 27 Mar 2018 13:16:52 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: leandro.lupori@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Mar 2018 13:16:54 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D226974 Bug ID: 226974 Summary: kernel DSI read trap at boot Product: Base System Version: CURRENT Hardware: powerpc OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: leandro.lupori@gmail.com Latest kernel and bootloader are not able to boot in powerpc64 anymore: Stopped at .trap+0x40: stdu r1, r1, 0xfe40 db> bt Tracing pid 0 tid 0 td 0x14c45e0 0xc000000000001190: kernel DSI read trap @ 0xdeadc0dedeadc0de by .pmap_decode_kernel_ptr+0x38: srr1=3D0x8000000000001032 r1=3D0xc000000000001440 cr=3D0x20001032 xer=3D0x20000000 ctr=3D0 r2=3D0x137bc08 sr=3D0x40000000 saved LR(0x7f83e3784bfffccd) is invalid. Using git bisect, I was able to find the commit that introduced the issue: commit 47a0fb0f642831283509dab8b3ca1c63f3d7cda6 Author: nwhitehorn Date: Sun Mar 4 04:49:09 2018 +0000 Where we can, pass the kernel an FDT facsimile of the OF device tree rather than a pointer to Open Firmware by default. This eliminates a number of potentially unsafe calls to firmware from the kernel and provides better performance. But this commit only sets usefdt to 1 in the bootloader. Older kernels didn= 't break with this option. So after another round of git bisect I found when t= he kernel stopped working with the new bootloader: commit e3be9f8fb6d01fd2604b306b6f8ab52afb2d1173 Author: jeff Date: Tue Feb 20 00:06:07 2018 +0000 Further parallelize the buffer cache. Tracking down the issue, this is what I was able to find out so far: - during one of the calls to keg_fetch_slab(), reached from malloc_init(), = when in mi_startup(), mmu_obj is overwritten with 0xdeadc0dedeadc0de. - then, the next time pmap_decode_kernel_ptr is called the trap happens whe= n it tries to use the now invalid mmu_obj --=20 You are receiving this mail because: You are the assignee for the bug.=