From owner-svn-src-head@freebsd.org Mon Oct 21 11:56:58 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5D1A5154E65; Mon, 21 Oct 2019 11:56:58 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46xZqt1qJYz47mQ; Mon, 21 Oct 2019 11:56:58 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1BF9D239D5; Mon, 21 Oct 2019 11:56:58 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x9LBuvVs045876; Mon, 21 Oct 2019 11:56:57 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x9LBuvLB045875; Mon, 21 Oct 2019 11:56:57 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <201910211156.x9LBuvLB045875@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Mon, 21 Oct 2019 11:56:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r353795 - head/sys/powerpc/aim X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: head/sys/powerpc/aim X-SVN-Commit-Revision: 353795 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Oct 2019 11:56:58 -0000 Author: luporl Date: Mon Oct 21 11:56:57 2019 New Revision: 353795 URL: https://svnweb.freebsd.org/changeset/base/353795 Log: [PPC64] Add minidump support to PowerNV Implementation of PowerNV specific minidump code. Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D21643 Modified: head/sys/powerpc/aim/moea64_native.c Modified: head/sys/powerpc/aim/moea64_native.c ============================================================================== --- head/sys/powerpc/aim/moea64_native.c Mon Oct 21 09:33:45 2019 (r353794) +++ head/sys/powerpc/aim/moea64_native.c Mon Oct 21 11:56:57 2019 (r353795) @@ -213,6 +213,12 @@ static struct rwlock moea64_eviction_lock; static volatile struct pate *moea64_part_table; /* + * Dump function. + */ +static void *moea64_dump_pmap_native(mmu_t mmu, void *ctx, void *buf, + u_long *nbytes); + +/* * PTE calls. */ static int moea64_pte_insert_native(mmu_t, struct pvo_entry *); @@ -233,6 +239,7 @@ static mmu_method_t moea64_native_methods[] = { /* Internal interfaces */ MMUMETHOD(mmu_bootstrap, moea64_bootstrap_native), MMUMETHOD(mmu_cpu_bootstrap, moea64_cpu_bootstrap_native), + MMUMETHOD(mmu_dump_pmap, moea64_dump_pmap_native), MMUMETHOD(moea64_pte_synch, moea64_pte_synch_native), MMUMETHOD(moea64_pte_clear, moea64_pte_clear_native), @@ -787,3 +794,21 @@ moea64_pte_insert_native(mmu_t mmu, struct pvo_entry * return (-1); } +static void * +moea64_dump_pmap_native(mmu_t mmu, void *ctx, void *buf, u_long *nbytes) +{ + struct dump_context *dctx; + u_long ptex, ptex_end; + + dctx = (struct dump_context *)ctx; + ptex = dctx->ptex; + ptex_end = ptex + dctx->blksz / sizeof(struct lpte); + ptex_end = MIN(ptex_end, dctx->ptex_end); + *nbytes = (ptex_end - ptex) * sizeof(struct lpte); + + if (*nbytes == 0) + return (NULL); + + dctx->ptex = ptex_end; + return (__DEVOLATILE(struct lpte *, moea64_pteg_table) + ptex); +}