summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2013-04-08 14:40:21 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-04-17 16:56:52 -0500
commit79f790c2b9d6a368f61a99af07d04ed9348ca504 (patch)
treead13d684f026aed530be76a2266730f9a31552f4
parent24677286a33ea478fd5c2db959e894dd3a5f0e85 (diff)
downloadtalos-hostboot-79f790c2b9d6a368f61a99af07d04ed9348ca504.tar.gz
talos-hostboot-79f790c2b9d6a368f61a99af07d04ed9348ca504.zip
Fixes for GCC 4.7
Change-Id: Ief0b9202e13bd70cf0de84ca3cb20f5c6df4d3d8 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4035 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
-rw-r--r--src/include/sys/vfs.h4
-rw-r--r--src/include/usr/targeting/common/iterators/targetiterator.H154
-rw-r--r--src/include/util/functor.H52
-rw-r--r--src/include/utility14
-rw-r--r--src/kernel.ld3
-rw-r--r--src/kernel/intmsghandler.C5
-rw-r--r--src/kernel/ptmgr.C12
-rw-r--r--src/lib/ctype.C46
-rw-r--r--src/lib/syscall_task.C7
-rw-r--r--src/module.ld56
-rw-r--r--src/usr/diag/prdf/common/framework/rule/prdfRuleMetaData.C11
-rw-r--r--src/usr/dump/test/dumptest.H140
-rw-r--r--src/usr/errl/parser/errlparser.C17
-rwxr-xr-xsrc/usr/i2c/i2c.C4
-rw-r--r--src/usr/initservice/istepdispatcher/istepdispatcher.C3
-rw-r--r--src/usr/runtime/test/runtimeattrstest.H4
-rw-r--r--src/usr/targeting/common/test/testcommontargeting.H29
-rw-r--r--src/usr/testcore/kernel/vmmbasetest.H6
-rw-r--r--src/usr/testcore/kernel/vmmpagetest.H6
19 files changed, 290 insertions, 283 deletions
diff --git a/src/include/sys/vfs.h b/src/include/sys/vfs.h
index 224422ffa..566f331a8 100644
--- a/src/include/sys/vfs.h
+++ b/src/include/sys/vfs.h
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2010,2012 */
+/* COPYRIGHT International Business Machines Corp. 2010,2013 */
/* */
/* p1 */
/* */
@@ -77,7 +77,7 @@ enum VfsMessages
struct VfsSystemModule
{
- const char module[VFS_MODULE_NAME_MAX]; //!< Module name
+ char module[VFS_MODULE_NAME_MAX]; //!< Module name
void (*init)(void*); //!< ptr to init()
void (*start)(void*); //!< ptr to start()
void (*fini)(void*); //!< ptr to fini()
diff --git a/src/include/usr/targeting/common/iterators/targetiterator.H b/src/include/usr/targeting/common/iterators/targetiterator.H
index 5abb21f81..8b3463f70 100644
--- a/src/include/usr/targeting/common/iterators/targetiterator.H
+++ b/src/include/usr/targeting/common/iterators/targetiterator.H
@@ -1,25 +1,25 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/include/usr/targeting/iterators/targetiterator.H $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2011
-//
-// p1
-//
-// Object Code Only (OCO) source materials
-// Licensed Internal Code Source Materials
-// IBM HostBoot Licensed Internal Code
-//
-// The source code for this program is not published or other-
-// wise divested of its trade secrets, irrespective of what has
-// been deposited with the U.S. Copyright Office.
-//
-// Origin: 30
-//
-// IBM_PROLOG_END
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/targeting/common/iterators/targetiterator.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2011,2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
#ifndef __TARGETING_COMMON_TARGETITERATOR_H
#define __TARGETING_COMMON_TARGETITERATOR_H
@@ -28,7 +28,7 @@
* @file targeting/common/iterators/targetiterator.H
*
* @brief Interface describing iterator/const iterator used to iterate through
- * target service targets
+ * target service targets
*/
//******************************************************************************
@@ -63,12 +63,12 @@ namespace TARGETING
#define TARG_CLASS "_TargetIterator<T>::"
class Target;
-
+
/**
* @brief Class which iterates through targets managed by the target service.
* Provides "Target*" and "const Target*" versions via templates
- */
-template<typename T>
+ */
+template<typename T>
class _TargetIterator
{
public:
@@ -81,10 +81,10 @@ class _TargetIterator
typedef T value_type;
/**
- * @brief Create an iterator to a (const/non-const) target handle.
+ * @brief Create an iterator to a (const/non-const) target handle.
* Defaults to end()
*/
- ALWAYS_INLINE
+ ALWAYS_INLINE inline
_TargetIterator()
: iv_pCurrent(NULL)
{
@@ -93,145 +93,145 @@ class _TargetIterator
/**
* @brief Create an iterator to a (const/non-const) target handle
*
- * @param[in] i_pTarget Target handle (pointer or const pointer
+ * @param[in] i_pTarget Target handle (pointer or const pointer
* depending on flavor) the iterator should reference
*/
- ALWAYS_INLINE
- explicit _TargetIterator(T i_pTarget)
+ ALWAYS_INLINE inline
+ explicit _TargetIterator(T i_pTarget)
: iv_pCurrent(i_pTarget)
{
- }
+ }
/**
- * @brief Destroy an iterator to a (const/non-const) target handle
+ * @brief Destroy an iterator to a (const/non-const) target handle
*
* @note Iterator does not own any resources to destroy
*/
- ALWAYS_INLINE
+ ALWAYS_INLINE inline
~_TargetIterator()
{
}
- /**
+ /**
* @brief Dereference the iterator (return what it points to)
*
* @return Target handle in form of Target* or const Target*
*
- * @note Returns NULL if it points to end(), should not be
+ * @note Returns NULL if it points to end(), should not be
* dereferenced in this case.
- */
- ALWAYS_INLINE
+ */
+ ALWAYS_INLINE inline
T operator* () const
{
// Only return copy of the target pointer (instead of a reference)
- // because a reference will go out of scope when the iterator
+ // because a reference will go out of scope when the iterator
// advances
return iv_pCurrent;
}
- /**
- * @brief Dereference the iterator (return what it points to)
- * and (outside this function) call a function/member of
+ /**
+ * @brief Dereference the iterator (return what it points to)
+ * and (outside this function) call a function/member of
* the referenced target
*
* @return Target handle in form of Target* or const Target*
*
- * @note Returns NULL if it points to end(), causing an
+ * @note Returns NULL if it points to end(), causing an
* assert when automatically dereferenced.
- */
- ALWAYS_INLINE
+ */
+ ALWAYS_INLINE inline
T operator->() const
{
// Only return copy of the target pointer (instead of a reference)
- // because a reference will go out of scope when the iterator
+ // because a reference will go out of scope when the iterator
// advances
return iv_pCurrent;
}
- /**
+ /**
* @brief Pre-increment the iterator
*
* @return The reference to the same iterator after advancing it
- */
- ALWAYS_INLINE
+ */
+ ALWAYS_INLINE inline
_TargetIterator& operator++();
- /**
+ /**
* @brief Post-increment the iterator
*
* @param[in] UNNAMED Dummy parameter used to distinguish
* this interface from pre-increment
*
* @return Copy of the original iterator before it advanced
- */
- ALWAYS_INLINE
+ */
+ ALWAYS_INLINE inline
_TargetIterator operator++(int);
-
- /**
+
+ /**
* @brief Determine if two iterators of same type are logically equal
*
* @param[in] i_rhs The other iterator to compare
- *
+ *
* @return bool indicating whether the iterators point to the same
* entity
- *
+ *
* @retval true Iterators point to same entity
* @retval false Iterators do not point to same entity
- */
- ALWAYS_INLINE
+ */
+ ALWAYS_INLINE inline
bool operator==(const _TargetIterator& i_rhs) const
{
return (iv_pCurrent == i_rhs.iv_pCurrent);
}
- /**
- * @brief Determine if two iterators of same type are logically not
+ /**
+ * @brief Determine if two iterators of same type are logically not
* equal
*
* @param[in] i_rhs The other iterator to compare
- *
+ *
* @return bool indicating whether the iterators point to a different
* logical entity
- *
+ *
* @retval true Iterators point to different entity
* @retval false Iterators point to same entity
- */
- ALWAYS_INLINE
+ */
+ ALWAYS_INLINE inline
bool operator!=(const _TargetIterator& i_rhs) const
{
return (iv_pCurrent != i_rhs.iv_pCurrent);
}
- /**
+ /**
* @brief Assignment operator; assign iterator to another (such that
* they logically point to same entity)
*
* @param[in] i_rhs The iterator to assign
- *
+ *
* @return Reference to the iterator, now updated to point to the same
* entity as the input iterator points to
- */
- ALWAYS_INLINE
+ */
+ ALWAYS_INLINE inline
_TargetIterator& operator=(const _TargetIterator& i_rhs)
{
iv_pCurrent = i_rhs.iv_pCurrent;
return *this;
}
- /**
- * @brief Copy constructor; assign iterator to a new iterator (such
+ /**
+ * @brief Copy constructor; assign iterator to a new iterator (such
* that they logically point to same entity)
*
* @param[in] i_rhs The iterator to assign
- */
- ALWAYS_INLINE
- _TargetIterator(const _TargetIterator& i_rhs)
+ */
+ ALWAYS_INLINE inline
+ _TargetIterator(const _TargetIterator& i_rhs)
: iv_pCurrent(i_rhs.iv_pCurrent)
{
}
private:
-
+
/**
* @brief Advance the iterator to point to the next item maintained by
* the target service (or end() if end of list)
@@ -246,19 +246,19 @@ class _TargetIterator
*/
typedef _TargetIterator<Target*> TargetIterator;
typedef _TargetIterator<const Target*> ConstTargetIterator;
-
+
//******************************************************************************
// _TargetIterator::operator++ (postincrement)
//******************************************************************************
template<typename T>
-_TargetIterator<T> _TargetIterator<T>::operator++(int)
+_TargetIterator<T> _TargetIterator<T>::operator++(int)
{
_TargetIterator l_originalIterator(*this);
advance();
return l_originalIterator;
}
-
+
//******************************************************************************
// _TargetIterator::operator++ (preincrement)
//******************************************************************************
diff --git a/src/include/util/functor.H b/src/include/util/functor.H
index 037f4ddd8..b5bf1f9de 100644
--- a/src/include/util/functor.H
+++ b/src/include/util/functor.H
@@ -1,25 +1,25 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/include/util/functor.H $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2011
-//
-// p1
-//
-// Object Code Only (OCO) source materials
-// Licensed Internal Code Source Materials
-// IBM HostBoot Licensed Internal Code
-//
-// The source code for this program is not published or other-
-// wise divested of its trade secrets, irrespective of what has
-// been deposited with the U.S. Copyright Office.
-//
-// Origin: 30
-//
-// IBM_PROLOG_END
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/util/functor.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2011,2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
#ifndef __UTIL_FUNCTOR_H
#define __UTIL_FUNCTOR_H
@@ -75,7 +75,7 @@ namespace Util
};
template <typename _ARG, typename _RESULT>
- ALWAYS_INLINE
+ ALWAYS_INLINE inline
ptr_to_unary_function<_ARG, _RESULT> ptr_fun(_RESULT (*f)(_ARG))
{
return ptr_to_unary_function<_ARG,_RESULT>(f);
@@ -97,7 +97,7 @@ namespace Util
function_type function;
public:
- mem_ptr_to_unary_function(member_type& o, function_type f)
+ mem_ptr_to_unary_function(member_type& o, function_type f)
: object(o), function(f) {};
_RESULT operator()(_ARG t)
@@ -107,8 +107,8 @@ namespace Util
};
template <typename _ARG, typename _RESULT, typename _CLASS>
- ALWAYS_INLINE
- mem_ptr_to_unary_function<_ARG, _RESULT, _CLASS>
+ ALWAYS_INLINE inline
+ mem_ptr_to_unary_function<_ARG, _RESULT, _CLASS>
mem_ptr_fun(_CLASS& o, _RESULT (_CLASS::*f)(_ARG))
{
return mem_ptr_to_unary_function<_ARG,_RESULT,_CLASS>(o, f);
diff --git a/src/include/utility b/src/include/utility
index 3e6fbc413..5a36e117c 100644
--- a/src/include/utility
+++ b/src/include/utility
@@ -53,7 +53,7 @@ namespace std
* @return a newly-constructed pair<> object
*/
template <typename T1, typename T2> __attribute__ ((always_inline))
- pair<T1,T2> make_pair (T1 x, T2 y)
+ inline pair<T1,T2> make_pair (T1 x, T2 y)
{
return ( pair<T1,T2>(x,y) );
}
@@ -65,7 +65,7 @@ namespace std
* @return true if x is strictly eq y
*/
template <typename T1, typename T2> __attribute__ ((always_inline))
- bool operator==(const pair<T1, T2>& x, const pair<T1, T2>& y)
+ inline bool operator==(const pair<T1, T2>& x, const pair<T1, T2>& y)
{
return x.first == y.first && x.second == y.second;
}
@@ -77,7 +77,7 @@ namespace std
* @return true if x < y
*/
template<typename T1, typename T2> __attribute__ ((always_inline))
- bool operator<(const pair<T1, T2>& x, const pair<T1, T2>& y)
+ inline bool operator<(const pair<T1, T2>& x, const pair<T1, T2>& y)
{
return (x.first < y.first) ||
(!(y.first < x.first) && x.second < y.second);
@@ -90,7 +90,7 @@ namespace std
* @return true if x != y
*/
template<typename T1, typename T2> __attribute__ ((always_inline))
- bool operator!=(const pair<T1, T2>& x, const pair<T1, T2>& y)
+ inline bool operator!=(const pair<T1, T2>& x, const pair<T1, T2>& y)
{
return !(x == y);
}
@@ -103,7 +103,7 @@ namespace std
* @return true if x > y
*/
template<typename T1, typename T2> __attribute__ ((always_inline))
- bool operator>(const pair<T1, T2>& x, const pair<T1, T2>& y)
+ inline bool operator>(const pair<T1, T2>& x, const pair<T1, T2>& y)
{
return y < x;
}
@@ -115,7 +115,7 @@ namespace std
* @return true if x <= y
*/
template<typename T1, typename T2> __attribute__ ((always_inline))
- bool operator<=(const pair<T1, T2>& x, const pair<T1, T2>& y)
+ inline bool operator<=(const pair<T1, T2>& x, const pair<T1, T2>& y)
{
return !(y < x);
}
@@ -127,7 +127,7 @@ namespace std
* @return true if x >= y
*/
template<typename T1, typename T2> __attribute__ ((always_inline))
- bool operator>=(const pair<T1, T2>& x, const pair<T1, T2>& y)
+ inline bool operator>=(const pair<T1, T2>& x, const pair<T1, T2>& y)
{
return !(x < y);
}
diff --git a/src/kernel.ld b/src/kernel.ld
index d55da99de..d1f2cef42 100644
--- a/src/kernel.ld
+++ b/src/kernel.ld
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2010,2012 */
+/* COPYRIGHT International Business Machines Corp. 2010,2013 */
/* */
/* p1 */
/* */
@@ -33,6 +33,7 @@ SECTIONS
*(.text.kernelasm)
*(.text)
*(.text._*)
+ *(.text.*)
*(.rodata)
*(.rodata.*)
. = ALIGN(0x8);
diff --git a/src/kernel/intmsghandler.C b/src/kernel/intmsghandler.C
index 538d322ae..0a6e87b0d 100644
--- a/src/kernel/intmsghandler.C
+++ b/src/kernel/intmsghandler.C
@@ -100,8 +100,9 @@ void InterruptMsgHdlr::handleInterrupt()
if(cv_instance)
{
cv_instance->sendMessage(MSG_INTR_EXTERN,
- (void *)pir,
- (void *)xirr,
+ reinterpret_cast<void*>(pir),
+ reinterpret_cast<void*>(
+ static_cast<uint64_t>(xirr)),
NULL);
}
}
diff --git a/src/kernel/ptmgr.C b/src/kernel/ptmgr.C
index 35f55873a..bb1380b4d 100644
--- a/src/kernel/ptmgr.C
+++ b/src/kernel/ptmgr.C
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2012 */
+/* COPYRIGHT International Business Machines Corp. 2011,2013 */
/* */
/* p1 */
/* */
@@ -44,7 +44,7 @@
* @param[in] i_lastbit Bit to stop extraction on, inclusive
* @return uint64_t Right-justified data
*/
-ALWAYS_INLINE static
+ALWAYS_INLINE static inline
uint64_t EXTRACT_RJ( uint64_t i_var64,
uint64_t i_startbit,
uint64_t i_lastbit )
@@ -63,7 +63,7 @@ uint64_t EXTRACT_RJ( uint64_t i_var64,
* @return uint64_t Left-justified data
*/
/*
-ALWAYS_INLINE static
+ALWAYS_INLINE static inline
uint64_t EXTRACT_LJ( uint64_t var64,
uint64_t i_startbit,
uint64_t i_lastbit )
@@ -91,7 +91,7 @@ uint64_t EXTRACT_LJ( uint64_t var64,
* original bit length
* @return uint64_t Left-justified data
*/
-ALWAYS_INLINE static
+ALWAYS_INLINE static inline
uint64_t EXTRACT_RJ_LEN( uint64_t i_lastword,
uint64_t i_bitlen,
uint64_t i_startbit,
@@ -159,7 +159,7 @@ uint64_t EXTRACT_RJ_LEN( uint64_t i_lastword,
* @return uint64_t Left-justified data
*/
/*
-ALWAYS_INLINE static
+ALWAYS_INLINE static inline
uint64_t EXTRACT_LJ_LEN( uint64_t i_lastword,
uint64_t i_bitlen,
uint64_t i_startbit,
@@ -973,7 +973,7 @@ uint64_t PageTableManager::getAccessType( const PageTableEntry* i_pte )
/**
* @brief Fill in default values for the PTE
*/
-ALWAYS_INLINE
+ALWAYS_INLINE inline
void PageTableManager::setupDefaultPTE( PageTableEntry* o_pte )
{
o_pte->B = 0b01; //Segment Size (01=1TB)
diff --git a/src/lib/ctype.C b/src/lib/ctype.C
index 44e3dabeb..8ae144a5d 100644
--- a/src/lib/ctype.C
+++ b/src/lib/ctype.C
@@ -1,25 +1,27 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/lib/ctype.C $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2011
-//
-// p1
-//
-// Object Code Only (OCO) source materials
-// Licensed Internal Code Source Materials
-// IBM HostBoot Licensed Internal Code
-//
-// The source code for this program is not published or other-
-// wise divested of its trade secrets, irrespective of what has
-// been deposited with the U.S. Copyright Office.
-//
-// Origin: 30
-//
-// IBM_PROLOG_END
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/lib/ctype.C $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2011,2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
+#include <ctype.h>
+
int toupper(int ch)
{
if(( ch >= 'a') && (ch <= 'z' ))
diff --git a/src/lib/syscall_task.C b/src/lib/syscall_task.C
index 846163c8b..27272ef2e 100644
--- a/src/lib/syscall_task.C
+++ b/src/lib/syscall_task.C
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2010,2012 */
+/* COPYRIGHT International Business Machines Corp. 2010,2013 */
/* */
/* p1 */
/* */
@@ -159,7 +159,10 @@ tid_t task_wait_tid(tid_t tid, int* status, void** retval)
{
return static_cast<tid_t>(
reinterpret_cast<uint64_t>(
- _syscall3(TASK_WAIT,(void*)tid,status,retval)));
+ _syscall3(TASK_WAIT,
+ reinterpret_cast<void*>(static_cast<uint64_t>(tid)),
+ status,
+ retval)));
}
tid_t task_wait(int* status, void** retval)
diff --git a/src/module.ld b/src/module.ld
index 1528d4b8e..4cd3e3f4f 100644
--- a/src/module.ld
+++ b/src/module.ld
@@ -1,45 +1,45 @@
-/* IBM_PROLOG_BEGIN_TAG
- * This is an automatically generated prolog.
- *
- * $Source: src/module.ld $
- *
- * IBM CONFIDENTIAL
- *
- * COPYRIGHT International Business Machines Corp. 2010 - 2011
- *
- * p1
- *
- * Object Code Only (OCO) source materials
- * Licensed Internal Code Source Materials
- * IBM HostBoot Licensed Internal Code
- *
- * The source code for this program is not published or other-
- * wise divested of its trade secrets, irrespective of what has
- * been deposited with the U.S. Copyright Office.
- *
- * Origin: 30
- *
- * IBM_PROLOG_END
- */
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/module.ld $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2010,2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
SECTIONS
{
.text : {
*(.text)
*(.text._*)
+ *(.text.*)
*(.rodata)
*(.rodata.*)
*(.glink)
-
- . = ALIGN(0x8);
- ctor_start_address = .;
- *(.ctors)
- ctor_end_address = .;
}
.data ALIGN(0x1000): {
*(.data)
*(.data.*)
*(.branch_lt)
+
+ . = ALIGN(0x8);
+ ctor_start_address = .;
+ *(.ctors)
+ ctor_end_address = .;
*(.toc)
*(.opd)
*(.got)
diff --git a/src/usr/diag/prdf/common/framework/rule/prdfRuleMetaData.C b/src/usr/diag/prdf/common/framework/rule/prdfRuleMetaData.C
index df840f91f..f26501364 100644
--- a/src/usr/diag/prdf/common/framework/rule/prdfRuleMetaData.C
+++ b/src/usr/diag/prdf/common/framework/rule/prdfRuleMetaData.C
@@ -137,12 +137,9 @@ errlHndl_t RuleMetaData::loadRuleFile( ScanFacility & i_scanFactory ,
RegMap_t l_regMap;
Reset_t l_resetMap;
ResetAndMaskPair l_currentResets;
- uint32_t l_regMax = 0;
uint32_t l_vregMax = 0;
- uint32_t l_groupMax = 0;
ActionMap_t l_actionMap;
GroupMap_t l_groupMap;
- uint32_t l_actionMax = 0;
uint32_t l_id = 1;
errlHndl_t l_errl = NULL ;
SharedThreshold_t l_sharedThresholds;
@@ -255,7 +252,7 @@ errlHndl_t RuleMetaData::loadRuleFile( ScanFacility & i_scanFactory ,
cv_hwCaptureGroups[1].push_back(l_regMap[l_id]);
}
- l_regMax = l_id++;
+ l_id++;
}
@@ -286,21 +283,21 @@ errlHndl_t RuleMetaData::loadRuleFile( ScanFacility & i_scanFactory ,
{
iv_groupList.push_back( new Group( l_defaultResolution ) );
l_groupMap[l_id] = iv_groupList.back();
- l_groupMax = l_id++;
+ l_id++;
};
for (int i = 0; i < l_chip->cv_actionCount; i++)
{
if (l_actionMap[i])
{
- l_actionMax = l_id++;
+ l_id++;
continue;
}
// createActionClass will add to the actionMap.
this->createActionClass(i, l_localData);
//l_actionMap[l_id] = l_tmp;
- l_actionMax = l_id++;
+ l_id++;
}
for (int i = 0; i < l_chip->cv_groupCount; i++)
diff --git a/src/usr/dump/test/dumptest.H b/src/usr/dump/test/dumptest.H
index 7b9d16385..b3c21608a 100644
--- a/src/usr/dump/test/dumptest.H
+++ b/src/usr/dump/test/dumptest.H
@@ -126,19 +126,19 @@ class DumpTest: public CxxTest::TestSuite
DUMP_TEST_DST_DATA_AREA + 192, 64};
- // Point to the location of the src Data pointer.
- uint64_t *srcTablePtr = reinterpret_cast<uint64_t *>(srcTableAddr);
+ // Point to the location of the src Data pointer.
+ uint64_t *srcTablePtr = reinterpret_cast<uint64_t *>(srcTableAddr);
- // Point to the location of the dest Data pointer.
- uint64_t *dstTablePtr = reinterpret_cast<uint64_t *>(dstTableAddr);
+ // Point to the location of the dest Data pointer.
+ uint64_t *dstTablePtr = reinterpret_cast<uint64_t *>(dstTableAddr);
uint64_t *resultTablePtr = reinterpret_cast<uint64_t *>(resultsTableAddr);
- // Put the src addresses defined above into the MDST
- memcpy(srcTablePtr, src_data, sizeof(src_data));
+ // Put the src addresses defined above into the MDST
+ memcpy(srcTablePtr, src_data, sizeof(src_data));
- // Put the src addresses defined above into the MDDT
- memcpy(dstTablePtr, dst_data, sizeof(dst_data));
+ // Put the src addresses defined above into the MDDT
+ memcpy(dstTablePtr, dst_data, sizeof(dst_data));
// Need to memory map
uint64_t src_Inputdata[4][8] = {
@@ -179,19 +179,19 @@ class DumpTest: public CxxTest::TestSuite
for (int i = 0; i<4; i++)
{
-
+
// Get the Va for the page aligned Physical address
va_mapsrcTableAddr =
static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(src_data[index])),
THIRTYTWO_GB));
- // copy the mapped VA to a VA pointer we will
+ // copy the mapped VA to a VA pointer we will
va_srcTableAddr = va_mapsrcTableAddr;
// calculate offset based on page alignment.
offset = src_data[index] - ALIGN_PAGE_DOWN(src_data[index]);
- // increment the offset to correct VA offset.
+ // increment the offset to correct VA offset.
va_srcTableAddr += (offset/(sizeof (uint64_t)));
memcpy(va_srcTableAddr, src_Inputdata[i], sizeof(src_Inputdata[i]));
@@ -240,13 +240,13 @@ class DumpTest: public CxxTest::TestSuite
static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(dst_data[index])),
THIRTYTWO_GB));
- // copy the mapped VA to a VA pointer we will
+ // copy the mapped VA to a VA pointer we will
va_destTableAddr = va_mapdestTableAddr;
// calculate offset based on page alignment.
offset = dst_data[index] - ALIGN_PAGE_DOWN(dst_data[index]);
- // increment the offset to correct VA offset.
+ // increment the offset to correct VA offset.
va_destTableAddr += (offset/(sizeof (uint64_t)));
uint64_t paddr = mm_virt_to_phys(va_destTableAddr);
@@ -259,7 +259,7 @@ class DumpTest: public CxxTest::TestSuite
}
- // Check the destination table.
+ // Check the destination table.
int src_rc = memcmp(va_destTableAddr,src_Inputdata[i],sizeof(src_Inputdata[i]));
if (src_rc!=0)
@@ -284,7 +284,7 @@ class DumpTest: public CxxTest::TestSuite
}
- // Check the results table.
+ // Check the results table.
int result_rc = memcmp(resultTablePtr,result_data,sizeof (result_data));
if (result_rc!=0)
@@ -299,7 +299,7 @@ class DumpTest: public CxxTest::TestSuite
/**
* @brief Basic dump test that has sequential src addresses to
- * imbalanced destination locations and sizes.
+ * imbalanced destination locations and sizes.
*
*/
void test_DumpCollectUnevenDest(void)
@@ -337,12 +337,12 @@ class DumpTest: public CxxTest::TestSuite
DUMP_TEST_DST_DATA_AREA+1024 + 96, 32, // 4600480
DUMP_TEST_DST_DATA_AREA+1024+ 128, 128}; // 46004C0
- uint64_t *srcTablePtr = reinterpret_cast<uint64_t *>(srcTableAddr);
- uint64_t *dstTablePtr = reinterpret_cast<uint64_t *>(dstTableAddr);
+ uint64_t *srcTablePtr = reinterpret_cast<uint64_t *>(srcTableAddr);
+ uint64_t *dstTablePtr = reinterpret_cast<uint64_t *>(dstTableAddr);
uint64_t *resultTablePtr = reinterpret_cast<uint64_t *>(resultsTableAddr);
- memcpy(srcTablePtr, src_data, sizeof(src_data));
- memcpy(dstTablePtr, dst_data, sizeof(dst_data));
+ memcpy(srcTablePtr, src_data, sizeof(src_data));
+ memcpy(dstTablePtr, dst_data, sizeof(dst_data));
// Need to memory map
@@ -365,7 +365,7 @@ class DumpTest: public CxxTest::TestSuite
{0xdddddddddddddddd, 0xdddddddddddddddd,
0xdddddddddddddddd, 0xdddddddddddddddd,
0xdddddddddddddddd, 0xdddddddddddddddd,
- 0xdddddddddddddddd, 0xdddddddddddddddd},
+ 0xdddddddddddddddd, 0xdddddddddddddddd},
};
// results output data expected
@@ -383,19 +383,19 @@ class DumpTest: public CxxTest::TestSuite
int index = 0;
for (int i = 0; i<4; i++)
- {
+ {
// Get the Va for the page aligned Physical address
va_mapsrcTableAddr =
static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(src_data[index])),
THIRTYTWO_GB));
- // copy the mapped VA to a VA pointer
+ // copy the mapped VA to a VA pointer
va_srcTableAddr = va_mapsrcTableAddr;
// calculate offset based on page alignment.
offset = src_data[index] - ALIGN_PAGE_DOWN(src_data[index]);
- // increment the offset to correct VA offset.
+ // increment the offset to correct VA offset.
va_srcTableAddr += (offset/(sizeof (uint64_t)));
memcpy(va_srcTableAddr, src_Inputdata[i], sizeof(src_Inputdata[i]));
@@ -432,7 +432,7 @@ class DumpTest: public CxxTest::TestSuite
}
//----------------------------------------------------------------
- // !!!!! VERIFYING RESULTS
+ // !!!!! VERIFYING RESULTS
// Verify that the data and the VA mapping is correct.
//--------------------------------------------------------------
do
@@ -453,13 +453,13 @@ class DumpTest: public CxxTest::TestSuite
// Get the Va for the page aligned Physical address
va_mapdestTableAddr = static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(dst_data[index])),THIRTYTWO_GB));
- // copy the mapped VA to a VA pointer we will
+ // copy the mapped VA to a VA pointer we will
va_destTableAddr = va_mapdestTableAddr;
// calculate offset based on page alignment.
offset = dst_data[index] - ALIGN_PAGE_DOWN(dst_data[index]);
- // increment the offset to correct VA offset.
+ // increment the offset to correct VA offset.
va_destTableAddr += (offset/(sizeof (uint64_t)));
paddr = mm_virt_to_phys(va_destTableAddr);
@@ -479,7 +479,7 @@ class DumpTest: public CxxTest::TestSuite
}
else
{
- // Check the destination table.
+ // Check the destination table.
src_rc = memcmp(va_destTableAddr,src_Inputdata[i],dst_data[index+1]);
}
@@ -511,13 +511,13 @@ class DumpTest: public CxxTest::TestSuite
// Get the Va for the page aligned Physical address
va_mapdestTableAddr = static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(dst_data[index])),THIRTYTWO_GB));
- // copy the mapped VA to a VA pointer we will
+ // copy the mapped VA to a VA pointer we will
va_destTableAddr = va_mapdestTableAddr;
// calculate offset based on page alignment.
offset = dst_data[index] - ALIGN_PAGE_DOWN(dst_data[index]);
- // increment the offset to correct VA offset.
+ // increment the offset to correct VA offset.
va_destTableAddr += (offset/(sizeof (uint64_t)));
paddr = mm_virt_to_phys(va_destTableAddr);
@@ -532,12 +532,12 @@ class DumpTest: public CxxTest::TestSuite
int dataentries = (dst_data[index+1]/16);
- // start with 3rd src index..
+ // start with 3rd src index..
int i = 2;
// Src Data input.
int dataIndex = 0;
- // Now loop through the data at this memory address and compare it to the data
+ // Now loop through the data at this memory address and compare it to the data
for (int j = 0; j<dataentries; j++)
{
if (va_destTableAddr[j] != src_Inputdata[i][dataIndex])
@@ -576,7 +576,7 @@ class DumpTest: public CxxTest::TestSuite
}while(0);
- // Check the results table.
+ // Check the results table.
int result_rc = memcmp(resultTablePtr,result_data,sizeof (result_data));
if (result_rc!=0)
@@ -585,7 +585,7 @@ class DumpTest: public CxxTest::TestSuite
TS_FAIL( "DumpTest::DumpCollectUnevenDest ERROR : Unexpected error data mismatch in results table" );
}
-
+
TRACFCOMP( g_trac_dump, "dumpTest::test_dumpCollectUnevenDest COMPLETE" );
}
@@ -638,12 +638,12 @@ class DumpTest: public CxxTest::TestSuite
DUMP_TEST_DST_DATA_AREA+3072+64, 128}; // 4600C40
- uint64_t *srcTablePtr = reinterpret_cast<uint64_t *>(srcTableAddr);
- uint64_t *dstTablePtr = reinterpret_cast<uint64_t *>(dstTableAddr);
+ uint64_t *srcTablePtr = reinterpret_cast<uint64_t *>(srcTableAddr);
+ uint64_t *dstTablePtr = reinterpret_cast<uint64_t *>(dstTableAddr);
uint64_t *resultTablePtr = reinterpret_cast<uint64_t *>(resultsTableAddr);
- memcpy(srcTablePtr, src_data, sizeof(src_data));
- memcpy(dstTablePtr, dst_data, sizeof(dst_data));
+ memcpy(srcTablePtr, src_data, sizeof(src_data));
+ memcpy(dstTablePtr, dst_data, sizeof(dst_data));
// Need to memory map
@@ -687,7 +687,7 @@ class DumpTest: public CxxTest::TestSuite
offset = src_data[0] - ALIGN_PAGE_DOWN(src_data[0]);
- // increment the offset to correct VA offset.
+ // increment the offset to correct VA offset.
va_srcTableAddr += (offset/(sizeof (uint64_t)));
memcpy(va_srcTableAddr, src_data0, sizeof(src_data0));
@@ -713,7 +713,7 @@ class DumpTest: public CxxTest::TestSuite
// calculate offset based on page alignment.
offset = src_data[2] - ALIGN_PAGE_DOWN(src_data[2]);
- // increment the offset to correct VA offset.
+ // increment the offset to correct VA offset.
va_srcTableAddr += (offset/(sizeof (uint64_t)));
memcpy(va_srcTableAddr, src_data1, sizeof(src_data1));
@@ -739,7 +739,7 @@ class DumpTest: public CxxTest::TestSuite
// calculate offset based on page alignment.
offset = src_data[4] - ALIGN_PAGE_DOWN(src_data[4]);
- // increment the offset to correct VA offset.
+ // increment the offset to correct VA offset.
va_srcTableAddr += (offset/(sizeof (uint64_t)));
memcpy(va_srcTableAddr, src_data2, sizeof(src_data2));
@@ -765,7 +765,7 @@ class DumpTest: public CxxTest::TestSuite
// calculate offset based on page alignment.
offset = src_data[6] - ALIGN_PAGE_DOWN(src_data[6]);
- // increment the offset to correct VA offset.
+ // increment the offset to correct VA offset.
va_srcTableAddr += (offset/(sizeof (uint64_t)));
memcpy(va_srcTableAddr, src_data3, sizeof(src_data3));
@@ -804,7 +804,7 @@ class DumpTest: public CxxTest::TestSuite
//----------------------------------------------------------------
- // !!!!! VERIFYING RESULTS
+ // !!!!! VERIFYING RESULTS
// Verify that the data and the VA mapping is correct.
//----------------------------------------------------------------
@@ -815,7 +815,6 @@ class DumpTest: public CxxTest::TestSuite
uint64_t *va_destTableAddr = 0;
offset = 0;
int index = 0;
- int i = 0;
// FIRST Destination ENTRY source entires 0 and 1 !!!!
@@ -824,13 +823,13 @@ class DumpTest: public CxxTest::TestSuite
static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(dst_data[index])),
THIRTYTWO_GB));
- // copy the mapped VA to a VA pointer we will
+ // copy the mapped VA to a VA pointer we will
va_destTableAddr = va_mapdestTableAddr;
// calculate offset based on page alignment.
offset = dst_data[index] - ALIGN_PAGE_DOWN(dst_data[index]);
- // increment the offset to correct VA offset.
+ // increment the offset to correct VA offset.
va_destTableAddr += (offset/(sizeof (uint64_t)));
uint64_t paddr = mm_virt_to_phys(va_destTableAddr);
@@ -847,7 +846,7 @@ class DumpTest: public CxxTest::TestSuite
int curSrcEntry = 0;
- // Now loop through the data at this memory address and compare it to the data
+ // Now loop through the data at this memory address and compare it to the data
for (int j = 0; j<2; j++)
{
if (va_destTableAddr[j] != src_data0[j])
@@ -864,7 +863,7 @@ class DumpTest: public CxxTest::TestSuite
}
- // Now loop through the remainder of this destination to a new src data entry
+ // Now loop through the remainder of this destination to a new src data entry
for (int j = 0; j<dataentries; j++)
{
if (va_destTableAddr[curSrcEntry] != src_data1[j])
@@ -900,13 +899,13 @@ class DumpTest: public CxxTest::TestSuite
static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(dst_data[index])),
THIRTYTWO_GB));
- // copy the mapped VA to a VA pointer we will
+ // copy the mapped VA to a VA pointer we will
va_destTableAddr = va_mapdestTableAddr;
// calculate offset based on page alignment.
offset = dst_data[index] - ALIGN_PAGE_DOWN(dst_data[index]);
- // increment the offset to correct VA offset.
+ // increment the offset to correct VA offset.
va_destTableAddr += (offset/(sizeof (uint64_t)));
paddr = mm_virt_to_phys(va_destTableAddr);
@@ -918,9 +917,8 @@ class DumpTest: public CxxTest::TestSuite
}
dataentries = (dst_data[index+1]/16);
- i = 0;
- // Now loop through the data at this memory address and compare it to the data
+ // Now loop through the data at this memory address and compare it to the data
for (int j = 0; j<dataentries; j++)
{
if (va_destTableAddr[j] != src_data2[j])
@@ -951,13 +949,13 @@ class DumpTest: public CxxTest::TestSuite
// Get the Va for the page aligned Physical address
va_mapdestTableAddr = static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(dst_data[index])),THIRTYTWO_GB));
- // copy the mapped VA to a VA pointer we will
+ // copy the mapped VA to a VA pointer we will
va_destTableAddr = va_mapdestTableAddr;
// calculate offset based on page alignment.
offset = dst_data[index] - ALIGN_PAGE_DOWN(dst_data[index]);
- // increment the offset to correct VA offset.
+ // increment the offset to correct VA offset.
va_destTableAddr += (offset/(sizeof (uint64_t)));
paddr = mm_virt_to_phys(va_destTableAddr);
@@ -969,11 +967,11 @@ class DumpTest: public CxxTest::TestSuite
}
dataentries = (dst_data[index+1]/16);
-
+
curSrcEntry = 0;
- // Now loop through the data at this memory address and compare it to the data
+ // Now loop through the data at this memory address and compare it to the data
for (int j = 0; j<dataentries; j++)
{
if (va_destTableAddr[j] != src_data3[j])
@@ -1008,13 +1006,13 @@ class DumpTest: public CxxTest::TestSuite
static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(dst_data[index])),
THIRTYTWO_GB));
- // copy the mapped VA to a VA pointer we will
+ // copy the mapped VA to a VA pointer we will
va_destTableAddr = va_mapdestTableAddr;
// calculate offset based on page alignment.
offset = dst_data[index] - ALIGN_PAGE_DOWN(dst_data[index]);
- // increment the offset to correct VA offset.
+ // increment the offset to correct VA offset.
va_destTableAddr += (offset/(sizeof (uint64_t)));
paddr = mm_virt_to_phys(va_destTableAddr);
@@ -1029,7 +1027,7 @@ class DumpTest: public CxxTest::TestSuite
dataentries = (dst_data[index+1]/16);
- // Now loop through the data at this memory address and compare it to the data
+ // Now loop through the data at this memory address and compare it to the data
for (int j = 0; j<dataentries; j++)
{
if (va_destTableAddr[j] != src_data3[curSrcEntry])
@@ -1061,7 +1059,7 @@ class DumpTest: public CxxTest::TestSuite
}while(0);
- // Check the results table.
+ // Check the results table.
int result_rc = memcmp(resultTablePtr,result_data,sizeof (result_data));
if (result_rc!=0)
@@ -1120,20 +1118,20 @@ class DumpTest: public CxxTest::TestSuite
uint64_t dst_data[8] = {DUMP_TEST_DST_DATA_AREA+4096, 64, // 4601000
DUMP_TEST_DST_DATA_AREA + 4096 + 64, 64,
DUMP_TEST_DST_DATA_AREA + 4096 + 128, 64,
- DUMP_TEST_DST_DATA_AREA + 4096 + 192, 32}; // NOTE>> TOO SMALL of a space..
+ DUMP_TEST_DST_DATA_AREA + 4096 + 192, 32}; // NOTE>> TOO SMALL of a space..
- // Point to the location of the src Data pointer.
- uint64_t *srcTablePtr = reinterpret_cast<uint64_t *>(srcTableAddr);
+ // Point to the location of the src Data pointer.
+ uint64_t *srcTablePtr = reinterpret_cast<uint64_t *>(srcTableAddr);
- // Point to the location of the dest Data pointer.
- uint64_t *dstTablePtr = reinterpret_cast<uint64_t *>(dstTableAddr);
+ // Point to the location of the dest Data pointer.
+ uint64_t *dstTablePtr = reinterpret_cast<uint64_t *>(dstTableAddr);
- // Put the src addresses defined above into the MDST
- memcpy(srcTablePtr, src_data, sizeof(src_data));
+ // Put the src addresses defined above into the MDST
+ memcpy(srcTablePtr, src_data, sizeof(src_data));
- // Put the src addresses defined above into the MDDT
- memcpy(dstTablePtr, dst_data, sizeof(dst_data));
+ // Put the src addresses defined above into the MDDT
+ memcpy(dstTablePtr, dst_data, sizeof(dst_data));
// Need to memory map
@@ -1170,13 +1168,13 @@ class DumpTest: public CxxTest::TestSuite
// Get the Va for the page aligned Physical address
va_mapsrcTableAddr = static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(src_data[index])),THIRTYTWO_GB));
- // copy the mapped VA to a VA pointer we will
+ // copy the mapped VA to a VA pointer we will
va_srcTableAddr = va_mapsrcTableAddr;
// calculate offset based on page alignment.
offset = src_data[index] - ALIGN_PAGE_DOWN(src_data[index]);
- // increment the offset to correct VA offset.
+ // increment the offset to correct VA offset.
va_srcTableAddr += (offset/(sizeof (uint64_t)));
memcpy(va_srcTableAddr, src_Inputdata[i], sizeof(src_Inputdata[i]));
diff --git a/src/usr/errl/parser/errlparser.C b/src/usr/errl/parser/errlparser.C
index 71d71aab5..ba6d2defa 100644
--- a/src/usr/errl/parser/errlparser.C
+++ b/src/usr/errl/parser/errlparser.C
@@ -25,21 +25,21 @@
/**
* @file errlparser.C
*
- * @brief This program spawns the FipS x86 errl tool to display
- * a Hostboot error log in full detail. This program can also show a
- * brief list of error logs without the detail. When the user
+ * @brief This program spawns the FipS x86 errl tool to display
+ * a Hostboot error log in full detail. This program can also show a
+ * brief list of error logs without the detail. When the user
* wants the full detail, this program extracts the error log from
* the Hostboot image (or dump) and puts it into a temporary file. When
* saved to file, then this program execs "errl -d..." to display
- * the error log PEL data.
- *
+ * the error log PEL data.
+ *
* There are other options, such as "-p" which writes all the PEL files
- * and does not exec errl. This is useful for debugging.
- *
+ * and does not exec errl. This is useful for debugging.
+ *
* Enter errlparser ? (or -? or -h or --help) to print help.
* This program can be run standalone using a Simics
* L3 memory image and the HB syms file, however it is more likely
- * spawned via "simics> hb-errl"
+ * spawned via "simics> hb-errl"
*/
@@ -47,6 +47,7 @@
#include <stdlib.h>
#include <netinet/in.h>
#include <fcntl.h>
+#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
diff --git a/src/usr/i2c/i2c.C b/src/usr/i2c/i2c.C
index 2a80063a7..23398fbc3 100755
--- a/src/usr/i2c/i2c.C
+++ b/src/usr/i2c/i2c.C
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2012 */
+/* COPYRIGHT International Business Machines Corp. 2011,2013 */
/* */
/* p1 */
/* */
@@ -536,7 +536,6 @@ errlHndl_t i2cSetup ( TARGETING::Target * i_target,
ENTER_MRK"i2cSetup()" );
// Define the registers that we'll use
- statusreg status;
modereg mode;
cmdreg cmd;
@@ -545,7 +544,6 @@ errlHndl_t i2cSetup ( TARGETING::Target * i_target,
// TODO - Validate some of the arg values passed in
// Wait for Command complete before we start
- status.value = 0x0ull;
err = i2cWaitForCmdComp( i_target,
i_args );
diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.C b/src/usr/initservice/istepdispatcher/istepdispatcher.C
index 409c070d9..d09bb46b0 100644
--- a/src/usr/initservice/istepdispatcher/istepdispatcher.C
+++ b/src/usr/initservice/istepdispatcher/istepdispatcher.C
@@ -111,7 +111,7 @@ IStepDispatcher::IStepDispatcher ()
iv_curIStep = 0x0;
iv_curSubStep = 0x0;
iv_sync = false;
-
+
// Save flag indicating whether we're in MPIPL mode
iv_mpipl_mode = checkMpiplMode();
TRACFCOMP( g_trac_initsvc, "MPIPL mode = %u",
@@ -887,6 +887,7 @@ void IStepDispatcher::handleBreakpoint ( uint32_t i_info )
// breakpoint
msg_t * rspMsg;
rspMsg = msg_wait( iv_msgQ );
+ msg_free(rspMsg);
}
msg_free( myMsg );
diff --git a/src/usr/runtime/test/runtimeattrstest.H b/src/usr/runtime/test/runtimeattrstest.H
index 7ab4b1592..5fedfe42c 100644
--- a/src/usr/runtime/test/runtimeattrstest.H
+++ b/src/usr/runtime/test/runtimeattrstest.H
@@ -142,7 +142,7 @@ class RuntimeAttrsTest: public CxxTest::TestSuite
}
}
attr++;
- }
+ }
if( attr != sysdata->numAttr )
{
@@ -423,6 +423,7 @@ class RuntimeAttrsTest: public CxxTest::TestSuite
0,
sys_data_addr,
sys_data_size );
+ if (errhdl) delete errhdl;
return( (hsvc_system_data_t*)(sys_data_addr) );
};
hsvc_node_data_t* getNodePtr(void)
@@ -434,6 +435,7 @@ class RuntimeAttrsTest: public CxxTest::TestSuite
0,
node_data_addr,
node_data_size );
+ if (errhdl) delete errhdl;
return( (hsvc_node_data_t*)(node_data_addr) );
};
diff --git a/src/usr/targeting/common/test/testcommontargeting.H b/src/usr/targeting/common/test/testcommontargeting.H
index fef4267f8..90681c12a 100644
--- a/src/usr/targeting/common/test/testcommontargeting.H
+++ b/src/usr/targeting/common/test/testcommontargeting.H
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2012 */
+/* COPYRIGHT International Business Machines Corp. 2011,2013 */
/* */
/* p1 */
/* */
@@ -165,12 +165,12 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite
{
TARG_TS_FAIL("Expected to get the original target");
}
-
- // Post init
+
+ // Post init
// Tested API: Target* toTarget(
// const EntityPath& i_entityPath) const;
- // Behavior: Given an arbitrary target, I should be able to take its
- // affinity path and convert it to the original target
+ // Behavior: Given an arbitrary target, I should be able to take its
+ // affinity path and convert it to the original target
PredicateCTM mbaPredicate(CLASS_UNIT,TYPE_MBA);
TargetRangeFilter mbaFilter(
targetService().begin(),
@@ -558,7 +558,7 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite
}
PredicateHwas hwasPredicate;
-
+
ATTR_HWAS_STATE_type savedHwasState
= l_pTopLevel->getAttr<ATTR_HWAS_STATE>();
@@ -566,10 +566,14 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite
// should return a match
for(size_t i=0; i<32; ++i)
{
- ATTR_HWAS_STATE_type sweepHwasState
- = { i&16, i&8, i&4, i&2, i&1 };
+ ATTR_HWAS_STATE_type sweepHwasState
+ = { static_cast<uint8_t>(i&16),
+ static_cast<uint8_t>(i&8),
+ static_cast<uint8_t>(i&4),
+ static_cast<uint8_t>(i&2),
+ static_cast<uint8_t>(i&1) };
l_pTopLevel->setAttr<ATTR_HWAS_STATE>(sweepHwasState);
-
+
if(!hwasPredicate(l_pTopLevel))
{
TARG_TS_FAIL("Expected default HWAS predicate to match the "
@@ -618,7 +622,7 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite
TARG_TS_FAIL("Expected HWAS non-functional predicate to match the "
"target's non-functional HWAS state");
}
-
+
// Test: Given a predicate looking for target whose HWAS state
// exactly matches all 5 configurable HWAS states, filter should
// return true
@@ -634,7 +638,7 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite
}
// Test: Given a predicate looking for target whose HWAS state
- // exactly matches all 4 of 5 configurable HWAS states, filter
+ // exactly matches all 4 of 5 configurable HWAS states, filter
// should return false
allFiveHwasState.dumpfunctional = true;
l_pTopLevel->setAttr<ATTR_HWAS_STATE>(allFiveHwasState);
@@ -644,6 +648,9 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite
"4/5 matching HWAS state configuration");
}
+ // Restore state.
+ l_pTopLevel->setAttr<ATTR_HWAS_STATE>(savedHwasState);
+
} while(0);
TARG_TS_TRACE(EXIT_MRK "testPredicateHwas" );
diff --git a/src/usr/testcore/kernel/vmmbasetest.H b/src/usr/testcore/kernel/vmmbasetest.H
index 15c853268..026290f4c 100644
--- a/src/usr/testcore/kernel/vmmbasetest.H
+++ b/src/usr/testcore/kernel/vmmbasetest.H
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2012 */
+/* COPYRIGHT International Business Machines Corp. 2011,2013 */
/* */
/* p1 */
/* */
@@ -166,14 +166,12 @@ class VmmBaseTest : public CxxTest::TestSuite
static void* msgDaemon(void* unused)
{
msg_t* message = NULL;
- uint64_t ea = 0;
while (1)
{
message = msg_wait(iv_mq);
if (message)
{
- ea = message->data[0];
- /*printkd("Effective Addr: 0x%lX, %s\n",ea,
+ /*printkd("Effective Addr: 0x%lX, %s\n",message->data[0],
message->type==MSG_MM_RP_READ?"READ":"WRITE");*/
message->data[1] = 0;
msg_respond(iv_mq, message);
diff --git a/src/usr/testcore/kernel/vmmpagetest.H b/src/usr/testcore/kernel/vmmpagetest.H
index 51b40731e..32dcb5d06 100644
--- a/src/usr/testcore/kernel/vmmpagetest.H
+++ b/src/usr/testcore/kernel/vmmpagetest.H
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2012 */
+/* COPYRIGHT International Business Machines Corp. 2011,2013 */
/* */
/* p1 */
/* */
@@ -214,14 +214,12 @@ class vmmpagetest: public CxxTest::TestSuite
static void* testDaemon(void* unused)
{
msg_t* message = NULL;
- uint64_t ea = 0;
while (1)
{
message = msg_wait(iv_mq);
if (message)
{
- ea = message->data[0];
- printkd("Effective Addr: 0x%lX, %s\n",ea,
+ printkd("Effective Addr: 0x%lX, %s\n",message->data[0],
message->type==MSG_MM_RP_READ?"READ":"WRITE");
message->data[1] = 0;
rc = msg_respond(iv_mq, message);
OpenPOWER on IntegriCloud