From patchwork Wed Jun 6 05:35:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasant Hegde X-Patchwork-Id: 925732 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 410yBf3ss1zB3sh for ; Wed, 6 Jun 2018 15:38:18 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 410yBf2ZWZzF2ZL for ; Wed, 6 Jun 2018 15:38:18 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (mailfrom) smtp.mailfrom=linux.vnet.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=hegdevasant@linux.vnet.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 410y8G3G51zF2vT for ; Wed, 6 Jun 2018 15:36:14 +1000 (AEST) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w565YRWI103838 for ; Wed, 6 Jun 2018 01:36:12 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2je9cj0h5h-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 06 Jun 2018 01:36:12 -0400 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 6 Jun 2018 06:36:10 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 6 Jun 2018 06:36:08 +0100 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w565a6mU32506088 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 6 Jun 2018 05:36:06 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 817944204B; Wed, 6 Jun 2018 06:26:28 +0100 (BST) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9897542045; Wed, 6 Jun 2018 06:26:27 +0100 (BST) Received: from hegdevasant.in.ibm.com (unknown [9.199.176.210]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 6 Jun 2018 06:26:27 +0100 (BST) From: Vasant Hegde To: skiboot@lists.ozlabs.org Date: Wed, 6 Jun 2018 11:05:26 +0530 X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180606053535.8855-1-hegdevasant@linux.vnet.ibm.com> References: <20180606053535.8855-1-hegdevasant@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18060605-0008-0000-0000-000002449B56 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18060605-0009-0000-0000-000021AAA3BC Message-Id: <20180606053535.8855-10-hegdevasant@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-06-06_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=910 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806060064 Subject: [Skiboot] [PATCH v3 09/18] fadump: Define FADUMP structure X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" This structure is shared between OPAL and payload. During fadump registration payload will use this structure to pass kernel memory reservation details to OPAL. OPAL will use this structure to fill MDST, MDDT table. After fadump, OPAL uses MDRT table to fill this structure and passes this to payload via device tree. Signed-off-by: Vasant Hegde --- include/opal-api.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/include/opal-api.h b/include/opal-api.h index 09c77c18e..e30963909 100644 --- a/include/opal-api.h +++ b/include/opal-api.h @@ -1311,6 +1311,36 @@ enum { OPAL_PCI_P2P_TARGET = 1, }; +/* + * FADUMP memory region ID usable by kernel + * 0x80 - 0xff -> Payload + */ +#define FADUMP_REGION_HOST_START 0x80 +#define FADUMP_REGION_HOST_END 0xff + +/* + * fadump section details. This structure is shared between OPAL and payload. + * During fadump registration payload will use this structure to pass kernel + * memory reservation details to OPAL. OPAL will use this structure to fill + * MDST, MDDT table. After fadump, OPAL uses MDRT table to fill this structure. + * And passes this to payload via device tree. + */ +struct fadump_section { + u8 source_type; /* FADUMP_REGION_* */ + u8 reserved[7]; + u64 source_addr; + u64 source_size; + u64 dest_addr; + u64 dest_size; +} __packed; + +struct fadump { + u16 fadump_section_size; /* sizeof(struct fadump_section) */ + u16 section_count; + u32 reserved; + struct fadump_section section[]; +}; + #endif /* __ASSEMBLY__ */ #endif /* __OPAL_API_H */