diff options
-rwxr-xr-x | src/build/mkrules/dist.targets.mk | 13 | ||||
-rw-r--r-- | src/include/usr/fapi2/plat_target_filter.H | 54 | ||||
-rw-r--r-- | src/usr/pnor/ecc.C | 18 | ||||
-rwxr-xr-x | src/usr/targeting/attroverride/attrTextToBinaryBlob.C | 36 |
4 files changed, 91 insertions, 30 deletions
diff --git a/src/build/mkrules/dist.targets.mk b/src/build/mkrules/dist.targets.mk index fea703b09..e5e106392 100755 --- a/src/build/mkrules/dist.targets.mk +++ b/src/build/mkrules/dist.targets.mk @@ -5,7 +5,7 @@ # # OpenPOWER HostBoot Project # -# Contributors Listed Below - COPYRIGHT 2013,2017 +# Contributors Listed Below - COPYRIGHT 2013,2018 # [+] International Business Machines Corp. # # @@ -313,7 +313,16 @@ fsp.tar_CONTENTS = \ obj/genfiles/targAttrInfo.csv\ obj/genfiles/plugins/hbfwPlatHwpErrParser.H:plugins/ \ obj/genfiles/plugins/hbfwPlatHwpErrParserFFDC.H:plugins \ - src/include/runtime/generic_hbrt_fsp_message.H + src/include/runtime/generic_hbrt_fsp_message.H \ + obj/genfiles/fapi2AttrOverrideEnums.H \ + obj/genfiles/fapi2AttrOverrideData.H \ + src/usr/pnor/ecc.C \ + src/include/usr/pnor/ecc.H:pnor/ \ + src/import/hwpf/fapi2/include/target_types.H \ + src/include/usr/fapi2/plat_target_filter.H \ + src/usr/targeting/attroverride/attrTextToBinaryBlob.C \ + src/usr/targeting/attroverride/attrTextToBinaryBlob.H + # # Portions of the FSP sandbox which must be rebuilt based on file changes. diff --git a/src/include/usr/fapi2/plat_target_filter.H b/src/include/usr/fapi2/plat_target_filter.H index 49d6f3484..a064b2f6a 100644 --- a/src/include/usr/fapi2/plat_target_filter.H +++ b/src/include/usr/fapi2/plat_target_filter.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -39,9 +39,11 @@ namespace fapi2 { namespace PlatTargetFilter { + +// overrideAttribute x86.nfp requires this file to not be in C++11 format +#ifndef CONTEXT_x86_nfp // These values must contain only 1 bit 'on' so that they can be ORed // together as composite filters - constexpr uint64_t PLAT_TARGET_FILTER_TP = 0x4000000000000000; // Pervasive 1 constexpr uint64_t PLAT_TARGET_FILTER_NEST_NORTH = 0x2000000000000000; // Pervasive 2 constexpr uint64_t PLAT_TARGET_FILTER_NEST_EAST = 0x1000000000000000; // Pervasive 3 @@ -87,7 +89,53 @@ namespace fapi2 constexpr uint64_t PLAT_TARGET_FILTER_CORE21 = 0x0000000000000400; // Pervasive 53 constexpr uint64_t PLAT_TARGET_FILTER_CORE22 = 0x0000000000000200; // Pervasive 54 constexpr uint64_t PLAT_TARGET_FILTER_CORE23 = 0x0000000000000100; // Pervasive 55 - +#else + const uint64_t PLAT_TARGET_FILTER_TP = 0x4000000000000000ULL; // Pervasive 1 + const uint64_t PLAT_TARGET_FILTER_NEST_NORTH = 0x2000000000000000ULL; // Pervasive 2 + const uint64_t PLAT_TARGET_FILTER_NEST_EAST = 0x1000000000000000ULL; // Pervasive 3 + const uint64_t PLAT_TARGET_FILTER_NEST_SOUTH = 0x0800000000000000ULL; // Pervasive 4 + const uint64_t PLAT_TARGET_FILTER_NEST_WEST = 0x0400000000000000ULL; // Pervasive 5 + const uint64_t PLAT_TARGET_FILTER_XBUS = 0x0200000000000000ULL; // Pervasive 6 + const uint64_t PLAT_TARGET_FILTER_MC_WEST = 0x0100000000000000ULL; // Pervasive 7 + const uint64_t PLAT_TARGET_FILTER_MC_EAST = 0x0080000000000000ULL; // Pervasive 8 + const uint64_t PLAT_TARGET_FILTER_OBUS0 = 0x0040000000000000ULL; // Pervasive 9 + const uint64_t PLAT_TARGET_FILTER_OBUS1 = 0x0020000000000000ULL; // Pervasive 10 + const uint64_t PLAT_TARGET_FILTER_OBUS2 = 0x0010000000000000ULL; // Pervasive 11 + const uint64_t PLAT_TARGET_FILTER_OBUS3 = 0x0008000000000000ULL; // Pervasive 12 + const uint64_t PLAT_TARGET_FILTER_PCI0 = 0x0004000000000000ULL; // Pervasive 13 + const uint64_t PLAT_TARGET_FILTER_PCI1 = 0x0002000000000000ULL; // Pervasive 14 + const uint64_t PLAT_TARGET_FILTER_PCI2 = 0x0001000000000000ULL; // Pervasive 15 + const uint64_t PLAT_TARGET_FILTER_CACHE0 = 0x0000800000000000ULL; // Pervasive 16 + const uint64_t PLAT_TARGET_FILTER_CACHE1 = 0x0000400000000000ULL; // Pervasive 17 + const uint64_t PLAT_TARGET_FILTER_CACHE2 = 0x0000200000000000ULL; // Pervasive 18 + const uint64_t PLAT_TARGET_FILTER_CACHE3 = 0x0000100000000000ULL; // Pervasive 19 + const uint64_t PLAT_TARGET_FILTER_CACHE4 = 0x0000080000000000ULL; // Pervasive 20 + const uint64_t PLAT_TARGET_FILTER_CACHE5 = 0x0000040000000000ULL; // Pervasive 21 + const uint64_t PLAT_TARGET_FILTER_CORE0 = 0x0000000080000000ULL; // Pervasive 32 + const uint64_t PLAT_TARGET_FILTER_CORE1 = 0x0000000040000000ULL; // Pervasive 33 + const uint64_t PLAT_TARGET_FILTER_CORE2 = 0x0000000020000000ULL; // Pervasive 34 + const uint64_t PLAT_TARGET_FILTER_CORE3 = 0x0000000010000000ULL; // Pervasive 35 + const uint64_t PLAT_TARGET_FILTER_CORE4 = 0x0000000008000000ULL; // Pervasive 36 + const uint64_t PLAT_TARGET_FILTER_CORE5 = 0x0000000004000000ULL; // Pervasive 37 + const uint64_t PLAT_TARGET_FILTER_CORE6 = 0x0000000002000000ULL; // Pervasive 38 + const uint64_t PLAT_TARGET_FILTER_CORE7 = 0x0000000001000000ULL; // Pervasive 39 + const uint64_t PLAT_TARGET_FILTER_CORE8 = 0x0000000000800000ULL; // Pervasive 40 + const uint64_t PLAT_TARGET_FILTER_CORE9 = 0x0000000000400000ULL; // Pervasive 41 + const uint64_t PLAT_TARGET_FILTER_CORE10 = 0x0000000000200000ULL; // Pervasive 42 + const uint64_t PLAT_TARGET_FILTER_CORE11 = 0x0000000000100000ULL; // Pervasive 43 + const uint64_t PLAT_TARGET_FILTER_CORE12 = 0x0000000000080000ULL; // Pervasive 44 + const uint64_t PLAT_TARGET_FILTER_CORE13 = 0x0000000000040000ULL; // Pervasive 45 + const uint64_t PLAT_TARGET_FILTER_CORE14 = 0x0000000000020000ULL; // Pervasive 46 + const uint64_t PLAT_TARGET_FILTER_CORE15 = 0x0000000000010000ULL; // Pervasive 47 + const uint64_t PLAT_TARGET_FILTER_CORE16 = 0x0000000000008000ULL; // Pervasive 48 + const uint64_t PLAT_TARGET_FILTER_CORE17 = 0x0000000000004000ULL; // Pervasive 49 + const uint64_t PLAT_TARGET_FILTER_CORE18 = 0x0000000000002000ULL; // Pervasive 50 + const uint64_t PLAT_TARGET_FILTER_CORE19 = 0x0000000000001000ULL; // Pervasive 51 + const uint64_t PLAT_TARGET_FILTER_CORE20 = 0x0000000000000800ULL; // Pervasive 52 + const uint64_t PLAT_TARGET_FILTER_CORE21 = 0x0000000000000400ULL; // Pervasive 53 + const uint64_t PLAT_TARGET_FILTER_CORE22 = 0x0000000000000200ULL; // Pervasive 54 + const uint64_t PLAT_TARGET_FILTER_CORE23 = 0x0000000000000100ULL; // Pervasive 55 +#endif } // namespace PlatTargetFilter } // namespace fapi2 diff --git a/src/usr/pnor/ecc.C b/src/usr/pnor/ecc.C index 7ccab7b69..1c67b9f40 100644 --- a/src/usr/pnor/ecc.C +++ b/src/usr/pnor/ecc.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2013,2016 */ +/* Contributors Listed Below - COPYRIGHT 2013,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -49,21 +49,21 @@ namespace ECC */ static uint64_t eccMatrix[] = { //0000000000000000111010000100001000111100000011111001100111111111 - 0x0000e8423c0f99ff, + 0x0000e8423c0f99ffULL, //0000000011101000010000100011110000001111100110011111111100000000 - 0x00e8423c0f99ff00, + 0x00e8423c0f99ff00ULL, //1110100001000010001111000000111110011001111111110000000000000000 - 0xe8423c0f99ff0000, + 0xe8423c0f99ff0000ULL, //0100001000111100000011111001100111111111000000000000000011101000 - 0x423c0f99ff0000e8, + 0x423c0f99ff0000e8ULL, //0011110000001111100110011111111100000000000000001110100001000010 - 0x3c0f99ff0000e842, + 0x3c0f99ff0000e842ULL, //0000111110011001111111110000000000000000111010000100001000111100 - 0x0f99ff0000e8423c, + 0x0f99ff0000e8423cULL, //1001100111111111000000000000000011101000010000100011110000001111 - 0x99ff0000e8423c0f, + 0x99ff0000e8423c0fULL, //1111111100000000000000001110100001000010001111000000111110011001 - 0xff0000e8423c0f99 + 0xff0000e8423c0f99ULL }; /** Syndrome calculation matrix. diff --git a/src/usr/targeting/attroverride/attrTextToBinaryBlob.C b/src/usr/targeting/attroverride/attrTextToBinaryBlob.C index 11529e9e4..545b181a7 100755 --- a/src/usr/targeting/attroverride/attrTextToBinaryBlob.C +++ b/src/usr/targeting/attroverride/attrTextToBinaryBlob.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014,2017 */ +/* Contributors Listed Below - COPYRIGHT 2014,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -226,9 +226,7 @@ bool AttrTextToBinaryBlob::writeDataToBuffer( size_t & io_totalSize ) { bool l_err = false; - FILE * l_data; uint64_t l_size; - int l_success; uint32_t * l_bytes; uint32_t l_padding = 0x00000000; uint32_t l_tankLayer; @@ -514,19 +512,22 @@ void AttrTextToBinaryBlob::updateLabels( std::vector<target_label> & io_labels, const target_label & i_label_override) { - for (auto & l_label : io_labels) + // Using non-C++11 auto format so x86.nfp compiles + for (std::vector<target_label>::iterator it = io_labels.begin(); + it != io_labels.end(); + ++it) { if (i_label_override.node != AttributeTank::ATTR_NODE_NA) { - l_label.node = i_label_override.node; + it->node = i_label_override.node; } if (i_label_override.targetPos != AttributeTank::ATTR_POS_NA) { - l_label.targetPos = i_label_override.targetPos; + it->targetPos = i_label_override.targetPos; } if (i_label_override.unitPos != AttributeTank::ATTR_UNIT_POS_NA) { - l_label.unitPos = i_label_override.unitPos; + it->unitPos = i_label_override.unitPos; } } } @@ -910,7 +911,7 @@ bool AttrTextToBinaryBlob::attrFileAttrLinesToData( bool & o_const, AttributeTank::TankLayer & o_tankLayer) { - bool l_pErr = false; + bool l_success = true; size_t l_numElements = 0; // Data for the attribute uint32_t l_attrElemSizeBytes = 0; @@ -929,9 +930,8 @@ bool AttrTextToBinaryBlob::attrFileAttrLinesToData( for (l_itr = i_lines.begin(); l_itr != i_lines.end(); ++l_itr) { // Split the attribute line into fields - bool l_success = attrFileAttrLineToFields(*l_itr, l_attrString, td, - l_valString, o_const); - + l_success = attrFileAttrLineToFields(*l_itr, l_attrString, td, + l_valString, o_const); if (!l_success) { @@ -1033,7 +1033,8 @@ bool AttrTextToBinaryBlob::attrFileAttrLinesToData( } } - return l_pErr; + + return (!l_success); } //****************************************************************************** @@ -1537,7 +1538,6 @@ AttrTextToBinaryBlob::TargetTypeRc // (check for comma separated list) size_t nValCurPosn = nValStartPosn; - size_t nValNextPosn = nValCurPosn; for // loop thru the potential comma separated list ( int i = nValStartPosn; @@ -1701,7 +1701,7 @@ bool AttrTextToBinaryBlob::validateBinaryXlate( const uint8_t * i_buffer, } else { - printf("validateBinaryXlate: WARNING : Parm to large to format\n" ); + printf("validateBinaryXlate: WARNING : Parm too large to format (valSize = %d)\n", valSize); } } // end parm value } // end walk thru output buffer @@ -1889,8 +1889,13 @@ bool AttrTextToBinaryBlob::attrTextToBinaryBlob( std::ifstream& i_file, break; } - for (const auto & l_label : l_targetLabels) + // Removed C++11 auto so CONTEXT_x86_nfp will compile + for (std::vector<target_label>::iterator it = + l_targetLabels.begin(); + it != l_targetLabels.end(); ++it) { + target_label l_label = *it; + l_pos = l_label.targetPos; l_unitPos = l_label.unitPos; l_node = l_label.node; @@ -2144,7 +2149,6 @@ int main(int argc, char *argv[]) std::ifstream l_attributeFile; bool err = false; bool l_injectECC = false; - char * l_option; const char * l_attributeString; int opt; |