Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/808106/?format=api
{ "id": 808106, "url": "http://patchwork.ozlabs.org/api/patches/808106/?format=api", "web_url": "http://patchwork.ozlabs.org/project/skiboot/patch/1504165372-15971-2-git-send-email-cclaudio@linux.vnet.ibm.com/", "project": { "id": 44, "url": "http://patchwork.ozlabs.org/api/projects/44/?format=api", "name": "skiboot firmware development", "link_name": "skiboot", "list_id": "skiboot.lists.ozlabs.org", "list_email": "skiboot@lists.ozlabs.org", "web_url": "http://github.com/open-power/skiboot", "scm_url": "http://github.com/open-power/skiboot", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1504165372-15971-2-git-send-email-cclaudio@linux.vnet.ibm.com>", "list_archive_url": null, "date": "2017-08-31T07:42:48", "name": "[1/5] hdata: add secure and trusted boot ntuple to SPIRA-H/S", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "b1cd1efa89dfeeb8bc9ab0b9fa90725191348b15", "submitter": { "id": 69305, "url": "http://patchwork.ozlabs.org/api/people/69305/?format=api", "name": "Claudio Carvalho", "email": "cclaudio@linux.vnet.ibm.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/skiboot/patch/1504165372-15971-2-git-send-email-cclaudio@linux.vnet.ibm.com/mbox/", "series": [ { "id": 762, "url": "http://patchwork.ozlabs.org/api/series/762/?format=api", "web_url": "http://patchwork.ozlabs.org/project/skiboot/list/?series=762", "date": "2017-08-31T07:42:47", "name": "hdata: add and parse the tpmrel structure", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/762/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/808106/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/808106/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "skiboot@lists.ozlabs.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "skiboot@lists.ozlabs.org" ], "Received": [ "from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjZ9z3ZKPz9sRW\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 17:43:35 +1000 (AEST)", "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xjZ9z2KTHzDqXw\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 17:43:35 +1000 (AEST)", "from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com\n\t[148.163.158.5])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xjZ9Q71gWzDqGX\n\tfor <skiboot@lists.ozlabs.org>; Thu, 31 Aug 2017 17:43:06 +1000 (AEST)", "from pps.filterd (m0098420.ppops.net [127.0.0.1])\n\tby mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv7V7cmw8128104\n\tfor <skiboot@lists.ozlabs.org>; Thu, 31 Aug 2017 03:43:04 -0400", "from e35.co.us.ibm.com (e35.co.us.ibm.com [32.97.110.153])\n\tby mx0b-001b2d01.pphosted.com with ESMTP id 2cpdd6ahtr-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <skiboot@lists.ozlabs.org>; Thu, 31 Aug 2017 03:43:04 -0400", "from localhost\n\tby e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <skiboot@lists.ozlabs.org> from <cclaudio@linux.vnet.ibm.com>;\n\tThu, 31 Aug 2017 01:43:03 -0600", "from b03cxnp08028.gho.boulder.ibm.com (9.17.130.20)\n\tby e35.co.us.ibm.com (192.168.1.135) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tThu, 31 Aug 2017 01:43:02 -0600", "from b03ledav005.gho.boulder.ibm.com\n\t(b03ledav005.gho.boulder.ibm.com [9.17.130.236])\n\tby b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with\n\tESMTP id v7V7h2cm32112804\n\tfor <skiboot@lists.ozlabs.org>; Thu, 31 Aug 2017 00:43:02 -0700", "from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id D722ABE038\n\tfor <skiboot@lists.ozlabs.org>; Thu, 31 Aug 2017 01:43:01 -0600 (MDT)", "from legolas.ibm.com (unknown [9.85.193.48])\n\tby b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP id 36600BE03A\n\tfor <skiboot@lists.ozlabs.org>; Thu, 31 Aug 2017 01:43:01 -0600 (MDT)" ], "From": "Claudio Carvalho <cclaudio@linux.vnet.ibm.com>", "To": "skiboot@lists.ozlabs.org", "Date": "Thu, 31 Aug 2017 04:42:48 -0300", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1504165372-15971-1-git-send-email-cclaudio@linux.vnet.ibm.com>", "References": "<1504165372-15971-1-git-send-email-cclaudio@linux.vnet.ibm.com>", "X-TM-AS-GCONF": "00", "x-cbid": "17083107-0012-0000-0000-000014F010F3", "X-IBM-SpamModules-Scores": "", "X-IBM-SpamModules-Versions": "BY=3.00007640; HX=3.00000241; KW=3.00000007;\n\tPH=3.00000004; SC=3.00000226; SDB=6.00910104; UDB=6.00456514;\n\tIPR=6.00690384; \n\tBA=6.00005562; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009;\n\tZB=6.00000000; \n\tZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016938;\n\tXFM=3.00000015; UTC=2017-08-31 07:43:03", "X-IBM-AV-DETECTION": "SAVI=unused REMOTE=unused XFE=unused", "x-cbparentid": "17083107-0013-0000-0000-00004F4C4579", "Message-Id": "<1504165372-15971-2-git-send-email-cclaudio@linux.vnet.ibm.com>", "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-08-31_02:, , signatures=0", "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=1\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000\n\tdefinitions=main-1708310118", "Subject": "[Skiboot] [PATCH 1/5] hdata: add secure and trusted boot ntuple to\n\tSPIRA-H/S", "X-BeenThere": "skiboot@lists.ozlabs.org", "X-Mailman-Version": "2.1.23", "Precedence": "list", "List-Id": "Mailing list for skiboot development <skiboot.lists.ozlabs.org>", "List-Unsubscribe": "<https://lists.ozlabs.org/options/skiboot>,\n\t<mailto:skiboot-request@lists.ozlabs.org?subject=unsubscribe>", "List-Archive": "<http://lists.ozlabs.org/pipermail/skiboot/>", "List-Post": "<mailto:skiboot@lists.ozlabs.org>", "List-Help": "<mailto:skiboot-request@lists.ozlabs.org?subject=help>", "List-Subscribe": "<https://lists.ozlabs.org/listinfo/skiboot>,\n\t<mailto:skiboot-request@lists.ozlabs.org?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org", "Sender": "\"Skiboot\"\n\t<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>" }, "content": "This adds to spira-h/s the overall tpmrel structure, which defines\nsecure and trusted boot related data. The internal data structures will\nbe added in separated patches.\n\nSigned-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com>\n---\n hdata/Makefile.inc | 2 +-\n hdata/hdata.h | 1 +\n hdata/spira.c | 4 ++++\n hdata/spira.h | 12 +++++++++---\n hdata/test/hdata_to_dt.c | 1 +\n hdata/tpmrel.c | 40 ++++++++++++++++++++++++++++++++++++++++\n 6 files changed, 56 insertions(+), 4 deletions(-)\n create mode 100644 hdata/tpmrel.c", "diff": "diff --git a/hdata/Makefile.inc b/hdata/Makefile.inc\nindex 5b79dfe..c17b04f 100644\n--- a/hdata/Makefile.inc\n+++ b/hdata/Makefile.inc\n@@ -2,7 +2,7 @@\n \n SUBDIRS += hdata\n HDATA_OBJS = spira.o paca.o pcia.o hdif.o memory.o fsp.o iohub.o vpd.o slca.o\n-HDATA_OBJS += cpu-common.o vpd-common.o hostservices.o i2c.o\n+HDATA_OBJS += cpu-common.o vpd-common.o hostservices.o i2c.o tpmrel.o\n DEVSRC_OBJ = hdata/built-in.o\n \n $(DEVSRC_OBJ): $(HDATA_OBJS:%=hdata/%)\ndiff --git a/hdata/hdata.h b/hdata/hdata.h\nindex 6da9b55..31223c8 100644\n--- a/hdata/hdata.h\n+++ b/hdata/hdata.h\n@@ -65,6 +65,7 @@ extern void slca_dt_add_sai_node(void);\n extern bool hservices_from_hdat(const void *fdt, size_t size);\n int parse_i2c_devs(const struct HDIF_common_hdr *hdr, int idata_index,\n \tstruct dt_node *xscom);\n+extern void node_stb_parse(void);\n \n #endif /* __HDATA_H */\n \ndiff --git a/hdata/spira.c b/hdata/spira.c\nindex b58be7c..220ae9e 100644\n--- a/hdata/spira.c\n+++ b/hdata/spira.c\n@@ -1278,6 +1278,7 @@ static void fixup_spira(void)\n \tspira.ntuples.proc_chip = spiras->ntuples.proc_chip;\n \tspira.ntuples.hs_data = spiras->ntuples.hs_data;\n \tspira.ntuples.ipmi_sensor = spiras->ntuples.ipmi_sensor;\n+\tspira.ntuples.node_stb_data = spiras->ntuples.node_stb_data;\n }\n \n int parse_hdat(bool is_opal)\n@@ -1347,6 +1348,9 @@ int parse_hdat(bool is_opal)\n \n \tadd_stop_levels();\n \n+\t/* Parse node secure and trusted boot data */\n+\tnode_stb_parse();\n+\n \tprlog(PR_DEBUG, \"Parsing HDAT...done\\n\");\n \n \treturn 0;\ndiff --git a/hdata/spira.h b/hdata/spira.h\nindex 0276d4a..d2a70c1 100644\n--- a/hdata/spira.h\n+++ b/hdata/spira.h\n@@ -40,7 +40,7 @@ struct spira_ntuple {\n \t__be64\t\tpadding;\n } __packed;\n \n-#define SPIRA_NTUPLES_COUNT\t0x18\n+#define SPIRA_NTUPLES_COUNT\t0x19\n \n struct spira_ntuples {\n \tstruct HDIF_array_hdr\tarray_hdr;\n@@ -69,6 +69,7 @@ struct spira_ntuples {\n \tstruct spira_ntuple\tproc_chip;\t\t/* 0x300 */\n \tstruct spira_ntuple\ths_data;\t\t/* 0x320 */\n \tstruct spira_ntuple\tipmi_sensor;\t\t/* 0x360 */\n+\tstruct spira_ntuple\tnode_stb_data;\t\t/* 0x380 */\n };\n \n struct spira {\n@@ -82,7 +83,7 @@ struct spira {\n \t *\n \t * According to FSP engineers, this is an okay thing to do.\n \t */\n-\tu8\t\t\treserved[0xa0];\n+\tu8\t\t\treserved[0x80];\n } __packed __align(0x100);\n \n extern struct spira spira;\n@@ -146,7 +147,7 @@ struct spiras_ntuples {\n \tstruct spira_ntuple\ths_data;\t\t/* 0x200 */\n \tstruct spira_ntuple\thbrt_data;\t\t/* 0x220 */\n \tstruct spira_ntuple\tipmi_sensor;\t\t/* 0x240 */\n-\tstruct spira_ntuple\tnode_data;\t\t/* 0x260 */\n+\tstruct spira_ntuple\tnode_stb_data;\t\t/* 0x260 */\n };\n \n struct spiras {\n@@ -1092,6 +1093,11 @@ struct ipmi_sensors {\n /* Idata index 1 : LED - sensors ID mapping data */\n #define IPMI_SENSORS_IDATA_LED\t\t1\n \n+/*\n+ * Node Secure and Trusted Boot Related Data\n+ */\n+#define STB_HDIF_SIG\t\"TPMREL\"\n+\n static inline const char *cpu_state(u32 flags)\n {\n \tswitch ((flags & CPU_ID_VERIFY_MASK) >> CPU_ID_VERIFY_SHIFT) {\ndiff --git a/hdata/test/hdata_to_dt.c b/hdata/test/hdata_to_dt.c\nindex 155e41b..6da80a5 100644\n--- a/hdata/test/hdata_to_dt.c\n+++ b/hdata/test/hdata_to_dt.c\n@@ -124,6 +124,7 @@ static bool spira_check_ptr(const void *ptr, const char *file, unsigned int line\n #include \"../slca.c\"\n #include \"../hostservices.c\"\n #include \"../i2c.c\"\n+#include \"../tpmrel.c\"\n #include \"../../core/vpd.c\"\n #include \"../../core/device.c\"\n #include \"../../core/chip.c\"\ndiff --git a/hdata/tpmrel.c b/hdata/tpmrel.c\nnew file mode 100644\nindex 0000000..7ded404\n--- /dev/null\n+++ b/hdata/tpmrel.c\n@@ -0,0 +1,40 @@\n+/* Copyright 2013-2017 IBM Corp.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * \thttp://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n+ * implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+#ifndef pr_fmt\n+#define pr_fmt(fmt) \"HDAT TPMREL: \" fmt\n+#endif\n+\n+#include <skiboot.h>\n+\n+#include \"spira.h\"\n+#include \"hdata.h\"\n+#include \"hdif.h\"\n+\n+void node_stb_parse(void)\n+{\n+\tstruct HDIF_common_hdr *hdif_hdr;\n+\n+\thdif_hdr = get_hdif(&spira.ntuples.node_stb_data, \"TPMREL\");\n+\tif (!hdif_hdr) {\n+\t\tprlog(PR_INFO, \"could not find TPMREL data\\n\");\n+\t\treturn;\n+\t}\n+\n+\t/* TODO: Idata 0: Secure Boot and TPM Instance Info */\n+\t/* TODO: Idata 1: User Physical Interaction Mechanism Info */\n+\t/* TODO: Idata 2: Hash and Verification Function Offset Array */\n+}\n", "prefixes": [ "1/5" ] }