From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61159C3A5A2 for ; Tue, 3 Sep 2019 11:22:16 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DCC4322CF8 for ; Tue, 3 Sep 2019 11:22:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DCC4322CF8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 46N4Kx211DzDqkV for ; Tue, 3 Sep 2019 21:22:13 +1000 (AEST) Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 46N44D50CxzDqfp for ; Tue, 3 Sep 2019 21:10:20 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Received: by ozlabs.org (Postfix) id 46N44D4QyNz9sDB; Tue, 3 Sep 2019 21:10:20 +1000 (AEST) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 46N44D1HrJz9s7T; Tue, 3 Sep 2019 21:10:20 +1000 (AEST) From: Michael Ellerman To: Hari Bathini , linuxppc-dev Subject: Re: [PATCH v5 10/31] opal: add MPIPL interface definitions In-Reply-To: <156630272066.8896.14185583668659839717.stgit@hbathini.in.ibm.com> References: <156630261682.8896.3418665808003586786.stgit@hbathini.in.ibm.com> <156630272066.8896.14185583668659839717.stgit@hbathini.in.ibm.com> Date: Tue, 03 Sep 2019 21:10:19 +1000 Message-ID: <87tv9tr5yc.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ananth N Mavinakayanahalli , Mahesh J Salgaonkar , Vasant Hegde , Oliver , Nicholas Piggin , Daniel Axtens Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Hari Bathini writes: > diff --git a/arch/powerpc/include/asm/opal-api.h b/arch/powerpc/include/asm/opal-api.h > index 383242e..c8a5665 100644 > --- a/arch/powerpc/include/asm/opal-api.h > +++ b/arch/powerpc/include/asm/opal-api.h > @@ -980,6 +983,50 @@ struct opal_sg_list { > }; > > /* > + * Firmware-Assisted Dump (FADump) using MPIPL > + */ > + > +/* MPIPL update operations */ > +enum opal_mpipl_ops { > + OPAL_MPIPL_ADD_RANGE = 0, > + OPAL_MPIPL_REMOVE_RANGE = 1, > + OPAL_MPIPL_REMOVE_ALL = 2, > + OPAL_MPIPL_FREE_PRESERVED_MEMORY = 3, > +}; > + > +/* > + * Each tag maps to a metadata type. Use these tags to register/query > + * corresponding metadata address with/from OPAL. > + */ > +enum opal_mpipl_tags { > + OPAL_MPIPL_TAG_CPU = 0, > + OPAL_MPIPL_TAG_OPAL = 1, > + OPAL_MPIPL_TAG_KERNEL = 2, > + OPAL_MPIPL_TAG_BOOT_MEM = 3, > +}; > + > +/* Preserved memory details */ > +struct opal_mpipl_region { > + __be64 src; > + __be64 dest; > + __be64 size; > +}; > + > +/* FADump structure format version */ > +#define MPIPL_FADUMP_VERSION 0x01 > + > +/* Metadata provided by OPAL. */ > +struct opal_mpipl_fadump { > + u8 version; > + u8 reserved[7]; > + __be32 crashing_pir; > + __be32 cpu_data_version; > + __be32 cpu_data_size; > + __be32 region_cnt; > + struct opal_mpipl_region region[]; > +} __attribute__((packed)); > + The above hunk is in the wrong place vs the skiboot header. Please put things in exactly the same place in the skiboot and kernel versions of the header. After your kernel & skiboot patches are applied, the result of: $ git diff ~/src/skiboot/include/opal-api.h arch/powerpc/include/asm/opal-api.h Should not include anything MPIPL/fadump related. > diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h > index 57bd029..878110a 100644 > --- a/arch/powerpc/include/asm/opal.h > +++ b/arch/powerpc/include/asm/opal.h > @@ -39,6 +39,12 @@ int64_t opal_npu_spa_clear_cache(uint64_t phb_id, uint32_t bdfn, > uint64_t PE_handle); > int64_t opal_npu_tl_set(uint64_t phb_id, uint32_t bdfn, long cap, > uint64_t rate_phys, uint32_t size); > + > +int64_t opal_mpipl_update(enum opal_mpipl_ops op, u64 src, > + u64 dest, u64 size); > +int64_t opal_mpipl_register_tag(enum opal_mpipl_tags tag, uint64_t addr); > +int64_t opal_mpipl_query_tag(enum opal_mpipl_tags tag, uint64_t *addr); > + Please consistently use kernel types for new prototypes in here. cheers