From patchwork Tue Mar 22 05:48:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vasant Hegde X-Patchwork-Id: 600389 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3qThbT4pqNz9s5M for ; Tue, 22 Mar 2016 16:49:25 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3qThbT403szDqGl for ; Tue, 22 Mar 2016 16:49:25 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from e28smtp07.in.ibm.com (e28smtp07.in.ibm.com [125.16.236.7]) (using TLSv1.2 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3qThbD4Z6XzDq72 for ; Tue, 22 Mar 2016 16:49:12 +1100 (AEDT) Received: from localhost by e28smtp07.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 22 Mar 2016 11:19:09 +0530 Received: from d28relay05.in.ibm.com (9.184.220.62) by e28smtp07.in.ibm.com (192.168.1.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 22 Mar 2016 11:19:06 +0530 X-IBM-Helo: d28relay05.in.ibm.com X-IBM-MailFrom: hegdevasant@linux.vnet.ibm.com X-IBM-RcptTo: skiboot@lists.ozlabs.org Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay05.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u2M5mZU523658836 for ; Tue, 22 Mar 2016 11:18:35 +0530 Received: from d28av05.in.ibm.com (localhost [127.0.0.1]) by d28av05.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u2M5n4is013648 for ; Tue, 22 Mar 2016 11:19:05 +0530 Received: from hegdevasant.in.ibm.com (hegdevasant.in.ibm.com [9.193.66.166]) by d28av05.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u2M5n2au013612; Tue, 22 Mar 2016 11:19:03 +0530 From: Vasant Hegde To: skiboot@lists.ozlabs.org Date: Tue, 22 Mar 2016 11:18:54 +0530 Message-Id: <1458625738-8304-3-git-send-email-hegdevasant@linux.vnet.ibm.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1458625738-8304-1-git-send-email-hegdevasant@linux.vnet.ibm.com> References: <1458625738-8304-1-git-send-email-hegdevasant@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-MML: disable x-cbid: 16032205-0025-0000-0000-00000ACA653B Subject: [Skiboot] [PATCH v4 2/6] hdata: Define SPIRA-H and SPIRA-S structure X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: chsmart@au1.ibm.com, mikey@neuling.org Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" In latest firwmare the SPIRA is split into two portions, a hypervisor initialized and managed portion and a service processor (FSP) built portion, to accommodate secure boot. The hypervisor portion will be referred to as the SPIRA-H and the FSP portion referred to as the SPIRA-S. The legacy N-tuples that are no longer being used have been removed. N-tuples that are initialized by the hypervisor at compile/build time but not modified by the FSP reside in the SPIRA-H. All other N-tuples reside in the SPIRA-S that is built dynamically by the FSP at the beginning of that HDAT memory pointed to by the “Host Data Area” N-tuple in SPIRA-H. This patch defines new SPIRA-H and SPIRA-S structures. No functionality change. Signed-off-by: Vasant Hegde --- hdata/spira.h | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/hdata/spira.h b/hdata/spira.h index 1047a0d..3c6261f 100644 --- a/hdata/spira.h +++ b/hdata/spira.h @@ -80,6 +80,71 @@ struct spira { extern struct spira spira; +/* SPIRA-H signature */ +#define SPIRAH_HDIF_SIG "SPIRAH" + +/* First version of the secure boot compliant design. */ +#define SPIRAH_VERSION 0x50 + +/* N-tuples in SPIRAH */ +#define SPIRAH_NTUPLES_COUNT 0x6 + +struct spirah_ntuples { + struct HDIF_array_hdr array_hdr; /* 0x030 */ + struct spira_ntuple hs_data_area; /* 0x040 */ + struct spira_ntuple proc_init; /* 0x060 */ + struct spira_ntuple cpu_ctrl; /* 0x080 */ + struct spira_ntuple mdump_src; /* 0x0a0 */ + struct spira_ntuple mdump_dst; /* 0x0c0 */ + struct spira_ntuple mdump_res; /* 0x0e0 */ +}; + +struct spirah { + struct HDIF_common_hdr hdr; + struct HDIF_idata_ptr ntuples_ptr; + __be64 pad; + struct spirah_ntuples ntuples; + u8 reserved[0x100]; +} __packed __align(0x100); + +/* SPIRA-S signature */ +#define SPIRAS_HDIF_SIG "SPIRAS" + +/* First version on 810 release */ +#define SPIRAS_VERSION 0x40 + +/* N-tuples in SPIRAS */ +#define SPIRAS_NTUPLES_COUNT 0x10 + +struct spiras_ntuples { + struct HDIF_array_hdr array_hdr; /* 0x030 */ + struct spira_ntuple sp_subsys; /* 0x040 */ + struct spira_ntuple ipl_parms; /* 0x060 */ + struct spira_ntuple nt_enclosure_vpd; /* 0x080 */ + struct spira_ntuple slca; /* 0x0a0 */ + struct spira_ntuple backplane_vpd; /* 0x0c0 */ + struct spira_ntuple system_vpd; /* 0x0e0 */ + struct spira_ntuple clock_vpd; /* 0x100 */ + struct spira_ntuple anchor_vpd; /* 0x120 */ + struct spira_ntuple op_panel_vpd; /* 0x140 */ + struct spira_ntuple misc_cec_fru_vpd; /* 0x160 */ + struct spira_ntuple ms_vpd; /* 0x180 */ + struct spira_ntuple cec_iohub_fru; /* 0x1a0 */ + struct spira_ntuple pcia; /* 0x1c0 */ + struct spira_ntuple proc_chip; /* 0x1e0 */ + struct spira_ntuple hs_data; /* 0x200 */ + struct spira_ntuple ipmi_sensor; /* 0x220 */ +} __packed __align(0x100); + +struct spiras { + struct HDIF_common_hdr hdr; + struct HDIF_idata_ptr ntuples_ptr; + __be64 pad; + struct spiras_ntuples ntuples; + u8 reserved[0x1c0]; +} __packed __align(0x100); + + /* This macro can be used to check the validity of a pointer returned * by one of the HDIF API functions. It returns true if the pointer * appears valid. If it's not valid and not NULL, it will print some