Skip to content

Commit

Permalink
libpore: Sync p8 files, remove erroneous "IBM Confidential"
Browse files Browse the repository at this point in the history
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 <ddzubak@us.ibm.com>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
stewartsmith committed Nov 28, 2018
1 parent acb0f21 commit 87b436c
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 28 deletions.
6 changes: 4 additions & 2 deletions libpore/fapi_sbe_common.H
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand All @@ -28,7 +30,7 @@
//------------------------------------------------------------------------------
// *! (C) Copyright International Business Machines Corp. 2011
// *! All Rights Reserved -- Property of IBM
// *! *** IBM Confidential ***
// *! *** ***
//------------------------------------------------------------------------------
// *! OWNER NAME : Email:

Expand Down
6 changes: 4 additions & 2 deletions libpore/p8_pore_table_gen_api.H
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand All @@ -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 */
Expand Down
6 changes: 4 additions & 2 deletions libpore/p8_pore_table_gen_api_fixed.C
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand All @@ -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 */
Expand Down
6 changes: 4 additions & 2 deletions libpore/p8_pore_table_static_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand All @@ -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. */
Expand Down
8 changes: 5 additions & 3 deletions libpore/pore_inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand All @@ -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 **
Expand Down Expand Up @@ -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 {

Expand Down
10 changes: 6 additions & 4 deletions libpore/pore_inline_assembler.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand All @@ -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 **
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down
23 changes: 14 additions & 9 deletions libpore/sbe_xip_image.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand All @@ -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
//------------------------------------------------------------------------------
Expand Down Expand Up @@ -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);

Expand All @@ -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, &section);
Expand All @@ -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, &section);
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -1841,6 +1843,7 @@ xipGetHaltMap(void* io_image,
void* io_arg)
{
int rc;

GetHaltStruct* s = (GetHaltStruct*)io_arg;

(void)io_image;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down
13 changes: 9 additions & 4 deletions libpore/sbe_xip_image.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand All @@ -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
//------------------------------------------------------------------------------
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 87b436c

Please sign in to comment.