Skip to content

Commit

Permalink
Add HB_VOLATILE PNOR section flag
Browse files Browse the repository at this point in the history
Change-Id: I8431edec1178cc062fdda943e5cade08acc5014c
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41687
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: Stephen M. Cprek <smcprek@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
sannerd authored and dcrowell77 committed Jun 16, 2017
1 parent ceb6abc commit bb22513
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/build/buildpnor/buildpnor.pl
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ sub addUserData
{
$miscFlags |= 0x10;
}
if( ($i_sectionHash{$i_key}{volatile} eq "yes") )
{
$miscFlags |= 0x08;
}

#First User Data Word
#[1:chip][1:compressType][2:dataInteg]
Expand Down
1 change: 1 addition & 0 deletions src/include/usr/pnor/pnor_const.H
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ struct SectionInfo_t
bool sha512perEC; /**< Version Checking perEC */
bool readOnly; /**< Section is read only */
bool reprovision; /**< Erase this section during a reprovision */
bool Volatile; /**< Section loses contents on non HB reboots */

This comment has been minimized.

Copy link
@williamspatrick

williamspatrick Jun 20, 2017

Hostboot allows variables with capital names now?

This comment has been minimized.

Copy link
@dcrowell77

dcrowell77 Jun 20, 2017

Collaborator

Slipped through

bool secure; /**< Indicates if a section is secure */
#ifdef CONFIG_SECUREBOOT
size_t secureProtectedPayloadSize; /**< Cache the secure payload size so
Expand Down
3 changes: 2 additions & 1 deletion src/usr/pnor/common/ffs_hb.H
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ enum
FFS_MISC_READ_ONLY = 0x40, /**< Read only section */
FFS_MISC_PSEUDO = 0x20, /**< Pseudo partition */
FFS_MISC_REPROVISION = 0x10, /**< Erased during reprovision */
FFS_MISC_VOLATILE = 0x08, /**< Loses contents based on boot types*/
FFS_MISC_GOLDEN = 0x01, /**< Golden side of PNOR */
FFS_MISC_UNUSED = 0x0E, /**< Unused MISC Flags */
FFS_MISC_UNUSED = 0x06, /**< Unused MISC Flags */
};

/**
Expand Down
2 changes: 2 additions & 0 deletions src/usr/pnor/pnorrp.C
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,8 @@ errlHndl_t PnorRP::getSectionInfo( PNOR::SectionId i_section,
!= 0) ? true : false;
o_info.reprovision = ((iv_TOC[id].misc & FFS_MISC_REPROVISION)
!= 0) ? true : false;
o_info.Volatile = ((iv_TOC[id].misc & FFS_MISC_VOLATILE)
!= 0) ? true : false;
}

} while(0);
Expand Down

0 comments on commit bb22513

Please sign in to comment.