diff options
| author | Sachin Gupta <sgupta2m@in.ibm.com> | 2015-02-26 11:06:04 -0600 |
|---|---|---|
| committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2015-02-28 00:05:47 -0600 |
| commit | fb95b417015157ceefb740c86c7c17b2596e9676 (patch) | |
| tree | 62ff6304f372395ebe919a94b6dd7574b36b4e56 /src/usr/diag/prdf/runtime | |
| parent | e2f74b107bab691ec9e8c8e31bd0952cb5e3b204 (diff) | |
| download | blackbird-hostboot-fb95b417015157ceefb740c86c7c17b2596e9676.tar.gz blackbird-hostboot-fb95b417015157ceefb740c86c7c17b2596e9676.zip | |
PRD: Dynamic memory deallocation support for HBRT
Change-Id: Ifef5f14dc1a1f3c5d9dc5acdeb21e5d8620b87b8
RTC: 123111
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/16026
Reviewed-by: Christopher T. Phan <cphan@us.ibm.com>
Tested-by: Jenkins Server
Reviewed-by: Zane Shelley <zshelle@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/diag/prdf/runtime')
| -rw-r--r-- | src/usr/diag/prdf/runtime/prdfPlatServices_rt.C | 51 |
1 files changed, 46 insertions, 5 deletions
diff --git a/src/usr/diag/prdf/runtime/prdfPlatServices_rt.C b/src/usr/diag/prdf/runtime/prdfPlatServices_rt.C index 450655dbb..2a50aa5af 100644 --- a/src/usr/diag/prdf/runtime/prdfPlatServices_rt.C +++ b/src/usr/diag/prdf/runtime/prdfPlatServices_rt.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014 */ +/* Contributors Listed Below - COPYRIGHT 2014,2015 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -32,6 +32,8 @@ */ #include <prdfPlatServices.H> +#include <prdfTrace.H> +#include <runtime/interface.h> //------------------------------------------------------------------------------ @@ -47,21 +49,60 @@ namespace PlatServices void sendPageGardRequest( uint64_t i_systemAddress ) { - // TODO: RTC 118920 need to create and call OPAL interfaces + #define PRDF_FUNC "[PlatServices::sendPageGardRequest] " + + do + { + if( !g_hostInterfaces || !g_hostInterfaces->memory_error ) + { + PRDF_ERR(PRDF_FUNC" memory_error() interface is not defined"); + break; + } + + int32_t rc = g_hostInterfaces->memory_error( i_systemAddress, + i_systemAddress, + MEMORY_ERROR_CE ); + if( SUCCESS != rc ) + { + PRDF_ERR(PRDF_FUNC" memory_error() failed"); + break; + } + }while(0); + + #undef PRDF_FUNC } //------------------------------------------------------------------------------ void sendLmbGardRequest( uint64_t i_systemAddress, bool i_isFetchUE ) { - // TODO: RTC 118920 need to create and call OPAL interfaces + //NO-OP for OPAL } - //------------------------------------------------------------------------------ void sendDynMemDeallocRequest( uint64_t i_startAddr, uint64_t i_endAddr ) { - // TODO: RTC 118920 need to create and call OPAL interfaces + #define PRDF_FUNC "[PlatServices::sendDynMemDeallocRequest] " + + do + { + if( !g_hostInterfaces || !g_hostInterfaces->memory_error ) + { + PRDF_ERR(PRDF_FUNC" memory_error() interface is not defined"); + break; + } + + int32_t rc = g_hostInterfaces->memory_error( i_startAddr, + i_startAddr, + MEMORY_ERROR_UE ); + if( SUCCESS != rc ) + { + PRDF_ERR(PRDF_FUNC" memory_error() failed"); + break; + } + }while(0); + + #undef PRDF_FUNC } //------------------------------------------------------------------------------ |

