From patchwork Tue Nov 27 03:50:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 1003589 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 433qZj5Qkjz9s3Z for ; Tue, 27 Nov 2018 14:51:09 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 433qZj2RCtzDqbD for ; Tue, 27 Nov 2018 14:51:09 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=stewart@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (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 433qZc2CRKzDqBl for ; Tue, 27 Nov 2018 14:51:04 +1100 (AEDT) Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wAR3iMj6080516 for ; Mon, 26 Nov 2018 22:51:01 -0500 Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) by mx0b-001b2d01.pphosted.com with ESMTP id 2p0ujcnphp-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 26 Nov 2018 22:51:01 -0500 Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 27 Nov 2018 03:51:00 -0000 Received: from b01cxnp23034.gho.pok.ibm.com (9.57.198.29) by e17.ny.us.ibm.com (146.89.104.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 27 Nov 2018 03:50:59 -0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wAR3ouKN13238490 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 27 Nov 2018 03:50:56 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 63564AE05F; Tue, 27 Nov 2018 03:50:56 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D4921AE05C; Tue, 27 Nov 2018 03:50:55 +0000 (GMT) Received: from birb.localdomain (unknown [9.185.142.41]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 27 Nov 2018 03:50:55 +0000 (GMT) Received: by birb.localdomain (Postfix, from userid 1000) id 1FA184EC69F; Tue, 27 Nov 2018 14:50:52 +1100 (AEDT) From: Stewart Smith To: skiboot@lists.ozlabs.org, ddzubak@us.ibm.com Date: Tue, 27 Nov 2018 14:50:50 +1100 X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181127001903.9163-1-stewart@linux.ibm.com> References: <20181127001903.9163-1-stewart@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18112703-0040-0000-0000-00000498BB4D X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010127; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000270; SDB=6.01123313; UDB=6.00577119; IPR=6.00903442; MB=3.00024345; MTD=3.00000008; XFM=3.00000015; UTC=2018-11-27 03:51:00 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18112703-0041-0000-0000-000008A1D079 Message-Id: <20181127035050.26133-1-stewart@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-11-27_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811270030 Subject: [Skiboot] [PATCH v2] libpore: Sync p8 files, remove erroneous "IBM Confidential" X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: leolow@au1.ibm.com, andonnel@au1.ibm.com Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" We also had some rogue "IBM Confidential" strings that we failed to remove with the original change of Copyright headers for open sourcing. Do this by synchronising with the hostboot copy of the code, which removed the Confidential string when their copyright headers changed for initial open sourcing of the code back in 2014. See hostboot commit 3bcf5b7982bb8a2d9227dbff7be4ff2ce5fec05c where the HWP copyright headers were updated. We likely missed this as we did a similar process inside the skiboot repository, but likely only on the (C) headers themselves. The libpore changes that we were missing *look* minor, but we need to throw some testing at them at least, as there *are* changes that we were missing. We also have to make a minor modification (being sent upstream) to avoid a compiler warning of always false comparison (<0 on unsigned int) Reported-by: Dawn Sylvia Signed-off-by: Stewart Smith --- Changes since v1: - fix some fun build warnings because in skiboot we turn those on. libpore/fapi_sbe_common.H | 6 ++++-- libpore/p8_pore_table_gen_api.H | 6 ++++-- libpore/p8_pore_table_gen_api_fixed.C | 6 ++++-- libpore/p8_pore_table_static_data.c | 6 ++++-- libpore/pore_inline.h | 8 +++++--- libpore/pore_inline_assembler.c | 10 ++++++---- libpore/sbe_xip_image.c | 23 ++++++++++++++--------- libpore/sbe_xip_image.h | 13 +++++++++---- 8 files changed, 50 insertions(+), 28 deletions(-) diff --git a/libpore/fapi_sbe_common.H b/libpore/fapi_sbe_common.H index fa8cc7107753..cf0e76f92aae 100644 --- a/libpore/fapi_sbe_common.H +++ b/libpore/fapi_sbe_common.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -28,7 +30,7 @@ //------------------------------------------------------------------------------ // *! (C) Copyright International Business Machines Corp. 2011 // *! All Rights Reserved -- Property of IBM -// *! *** IBM Confidential *** +// *! *** *** //------------------------------------------------------------------------------ // *! OWNER NAME : Email: diff --git a/libpore/p8_pore_table_gen_api.H b/libpore/p8_pore_table_gen_api.H index 9846dfdd2157..63081ca50388 100644 --- a/libpore/p8_pore_table_gen_api.H +++ b/libpore/p8_pore_table_gen_api.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -24,7 +26,7 @@ /*------------------------------------------------------------------------------*/ /* *! (C) Copyright International Business Machines Corp. 2012 */ /* *! All Rights Reserved -- Property of IBM */ -/* *! *** IBM Confidential *** */ +/* *! *** *** */ /*------------------------------------------------------------------------------*/ /* *! TITLE : p8_pore_table_gen_api.H */ /* *! DESCRIPTION : Contains all external APIs used by firmware (PHYP) to */ diff --git a/libpore/p8_pore_table_gen_api_fixed.C b/libpore/p8_pore_table_gen_api_fixed.C index b609b0d6db1c..9e816ecd11b8 100644 --- a/libpore/p8_pore_table_gen_api_fixed.C +++ b/libpore/p8_pore_table_gen_api_fixed.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2013,2014 */ +/* Contributors Listed Below - COPYRIGHT 2013,2014 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -25,7 +27,7 @@ /*------------------------------------------------------------------------------*/ /* *! (C) Copyright International Business Machines Corp. 2012 */ /* *! All Rights Reserved -- Property of IBM */ -/* *! *** IBM Confidential *** */ +/* *! *** *** */ /*------------------------------------------------------------------------------*/ /* *! TITLE : p8_pore_table_gen_api_fixed.C */ /* *! DESCRIPTION : PORE SLW table generaion APIs */ diff --git a/libpore/p8_pore_table_static_data.c b/libpore/p8_pore_table_static_data.c index 49b9d9a147cc..d6c35b88027f 100644 --- a/libpore/p8_pore_table_static_data.c +++ b/libpore/p8_pore_table_static_data.c @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -25,7 +27,7 @@ /*------------------------------------------------------------------------------*/ /* *! (C) Copyright International Business Machines Corp. 2012 */ /* *! All Rights Reserved -- Property of IBM */ -/* *! *** IBM Confidential *** */ +/* *! *** *** */ /*------------------------------------------------------------------------------*/ /* *! TITLE : p8_pore_table_static_data */ /* *! DESCRIPTION : Global static data declaration file. */ diff --git a/libpore/pore_inline.h b/libpore/pore_inline.h index 214fca6f7557..1af9199cfce7 100644 --- a/libpore/pore_inline.h +++ b/libpore/pore_inline.h @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -28,7 +30,7 @@ //----------------------------------------------------------------------------- // *! (C) Copyright International Business Machines Corp. 2013 // *! All Rights Reserved -- Property of IBM -// *! *** IBM Confidential *** +// *! *** *** //----------------------------------------------------------------------------- // ** WARNING : This file is maintained as part of the OCC firmware. Do ** @@ -291,7 +293,7 @@ typedef uint32_t PoreInlineLocation; /// PORE inline assembler context /// /// See the documentation page \ref pore_inline_assembler and the function -/// pore_inline_context_create() for further details. +/// pore_inline_context_create() for futher details. typedef struct { diff --git a/libpore/pore_inline_assembler.c b/libpore/pore_inline_assembler.c index 6c8e303eef29..5747c6f4df7b 100644 --- a/libpore/pore_inline_assembler.c +++ b/libpore/pore_inline_assembler.c @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -25,7 +27,7 @@ //----------------------------------------------------------------------------- // *! (C) Copyright International Business Machines Corp. 2013 // *! All Rights Reserved -- Property of IBM -// *! *** IBM Confidential *** +// *! *** *** //----------------------------------------------------------------------------- // ** WARNING : This file is maintained as part of the OCC firmware. Do ** @@ -890,7 +892,7 @@ pore_inline_instruction3(PoreInlineContext *ctx, int opcode, uint32_t operand, // Assemble WAIT // // The cycle count must be an unsigned 24-bit immediate otherwise the error -// PORE_INLINE_UINT24_REQUIRED is signaled. PGAS requires that HALT be used +// PORE_INLINE_UINT24_REQUIRED is signalled. PGAS requires that HALT be used // if the intention is to halt int @@ -914,7 +916,7 @@ pore_WAITS(PoreInlineContext *ctx, uint32_t cycles) // Assemble HOOKI // // The hook index must be an unsigned 24-bit immediate otherwise the error -// PORE_INLINE_UINT24_REQUIRED is signaled. +// PORE_INLINE_UINT24_REQUIRED is signalled. int pore_HOOKI(PoreInlineContext *ctx, uint32_t index, uint64_t imm) diff --git a/libpore/sbe_xip_image.c b/libpore/sbe_xip_image.c index 3f32d653aed2..2b05a0b90e9e 100644 --- a/libpore/sbe_xip_image.c +++ b/libpore/sbe_xip_image.c @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2015 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -20,12 +22,12 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ -// $Id: sbe_xip_image.c,v 1.28 2013/12/11 00:12:41 bcbrock Exp $ +// $Id: sbe_xip_image.c,v 1.31 2015/07/29 23:40:06 cmolsen Exp $ // $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/sbe/sbe_xip_image.c,v $ //----------------------------------------------------------------------------- // *! (C) Copyright International Business Machines Corp. 2011 // *! All Rights Reserved -- Property of IBM -// *! *** IBM Confidential *** +// *! *** *** //----------------------------------------------------------------------------- // *! OWNER NAME: Bishop Brock Email: bcbrock@us.ibm.com //------------------------------------------------------------------------------ @@ -578,7 +580,7 @@ xipPutSection(const void* i_image, SbeXipSection* i_hostSection) { int rc; - SbeXipSection *imageSection; + SbeXipSection *imageSection = NULL; rc = xipGetSectionPointer(i_image, i_sectionId, &imageSection); @@ -596,7 +598,7 @@ XIP_STATIC int xipSetSectionOffset(void* io_image, const int i_section, const uint32_t i_offset) { - SbeXipSection* section; + SbeXipSection* section = NULL; int rc; rc = xipGetSectionPointer(io_image, i_section, §ion); @@ -612,7 +614,7 @@ xipSetSectionOffset(void* io_image, const int i_section, XIP_STATIC int xipSetSectionSize(void* io_image, const int i_section, const uint32_t i_size) { - SbeXipSection* section; + SbeXipSection* section = NULL; int rc; rc = xipGetSectionPointer(io_image, i_section, §ion); @@ -1711,7 +1713,7 @@ sbe_xip_get_section(const void* i_image, SbeXipSection* o_hostSection) { int rc; - SbeXipSection *imageSection; + SbeXipSection *imageSection = NULL; rc = xipGetSectionPointer(i_image, i_sectionId, &imageSection); @@ -1841,6 +1843,7 @@ xipGetHaltMap(void* io_image, void* io_arg) { int rc; + GetHaltStruct* s = (GetHaltStruct*)io_arg; (void)io_image; @@ -2257,7 +2260,8 @@ sbe_xip_append(void* io_image, SbeXipSection section, initialSection; int rc, final, restoreOnError; void* hostAddress; - uint32_t pad, initialSize; + uint32_t pad; + uint32_t initialSize = 0; do { restoreOnError = 0; @@ -2493,8 +2497,9 @@ sbe_xip_translate_header(SbeXipHeader* o_dest, const SbeXipHeader* i_src) o_dest->iv_magic = xipRevLe64(i_src->iv_magic); o_dest->iv_entryOffset = xipRevLe64(i_src->iv_entryOffset); o_dest->iv_linkAddress = xipRevLe64(i_src->iv_linkAddress); + o_dest->iv_ptsVersion = xipRevLe64(i_src->iv_ptsVersion); - for (i = 0; i < 5; i++) { + for (i = 0; i < 4; i++) { o_dest->iv_reserved64[i] = 0; } diff --git a/libpore/sbe_xip_image.h b/libpore/sbe_xip_image.h index 955f3dcfdbb3..0b871a769949 100644 --- a/libpore/sbe_xip_image.h +++ b/libpore/sbe_xip_image.h @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2015 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -23,12 +25,12 @@ #ifndef __SBE_XIP_IMAGE_H #define __SBE_XIP_IMAGE_H -// $Id: sbe_xip_image.h,v 1.24 2013/06/13 20:26:33 bcbrock Exp $ +// $Id: sbe_xip_image.h,v 1.26 2015/07/29 23:40:17 cmolsen Exp $ // $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/sbe/sbe_xip_image.h,v $ //----------------------------------------------------------------------------- // *! (C) Copyright International Business Machines Corp. 2011 // *! All Rights Reserved -- Property of IBM -// *! *** IBM Confidential *** +// *! *** *** //----------------------------------------------------------------------------- // *! OWNER NAME: Bishop Brock Email: bcbrock@us.ibm.com //------------------------------------------------------------------------------ @@ -341,8 +343,11 @@ typedef struct { /// address uint64_t iv_linkAddress; + /// PTS version + uint64_t iv_ptsVersion; + /// Reserved for future expansion - uint64_t iv_reserved64[5]; + uint64_t iv_reserved64[4]; ////////////////////////////////////////////////////////////////////// // Section Table - 4-byte aligned; 16 entries