Skip to content

Commit

Permalink
Undo workarounds of mss::eff_memory_size
Browse files Browse the repository at this point in the history
  HWPS p9_mss_eff_grouping, p9_mss_setup_bars

RTC:173371
Change-Id: Id53d7ad48bc6a181e05dd412d46019d1b5102c16
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41422
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Joseph J. McGill <jmcgill@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Benjamin Gass <bgass@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41426
Reviewed-by: Hostboot Team <hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@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
ibmthi authored and dcrowell77 committed Jun 20, 2017
1 parent 77a31e8 commit 578f09c
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 33 deletions.
16 changes: 1 addition & 15 deletions src/import/chips/p9/procedures/hwp/nest/p9_mss_eff_grouping.C
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ struct EffGroupingDmiAttrs
uint8_t iv_unitPos = 0;

// Dimm size behind this DMI
uint32_t iv_dimmSize = 0;
uint64_t iv_dimmSize = 0;

// The membuf chip associated with this DMI
// (for deconfiguring if cannot group)
Expand All @@ -415,30 +415,16 @@ fapi2::ReturnCode EffGroupingDmiAttrs::getAttrs(
iv_membuf = l_attachedMembuf.front();

// Get the amount of memory behind this DMI target

//TODO: RTC 173371
// Need Memory team's supports for function to be called on a DMI target.
#if 0
FAPI_TRY(mss::eff_memory_size(i_target, iv_dimmSize),
"Error returned from eff_memory_size, l_rc 0x%.8X",
(uint64_t)fapi2::current_err);
#endif

}

// Get the DMI unit position
FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_CHIP_UNIT_POS, i_target, iv_unitPos),
"Error getting DMI ATTR_CHIP_UNIT_POS, l_rc 0x%.8X",
(uint64_t)fapi2::current_err);


//TODO: RTC 173371
// Force data for testing on AWAN
if ( (iv_unitPos >= 2) && (iv_unitPos <= 5) )
{
iv_dimmSize = 64;
}

// Display this DMI's attribute info
FAPI_INF("EffGroupingDmiAttrs::getAttrs: DMI %d, Centaur attached %d, "
"iv_dimmSize %d GB ",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
#
# IBM_PROLOG_END_TAG

# Include the macros and things for MSS procedures
PROCEDURE=p9_mss_eff_grouping
lib$(PROCEDURE)_DEPLIBS+=cen
OBJS+=p9_fbc_utils.o
$(call ADD_MODULE_INCDIR,$(PROCEDURE),$(ROOTPATH)/chips/p9/procedures/hwp/memory/)
$(call ADD_MODULE_INCDIR,$(PROCEDURE),$(ROOTPATH))
$(call BUILD_PROCEDURE)

15 changes: 2 additions & 13 deletions src/import/chips/p9/procedures/hwp/nest/p9_mss_setup_bars.C
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ fapi2::ReturnCode getMcMemSize(

// Get the amount of memory behind this MCA target
FAPI_TRY(mss::eff_memory_size(l_mca, l_mcaSize),
"Error returned from eff_memory_size, l_rc 0x%.8X",
"Error returned from eff_memory_size - MCA, l_rc 0x%.8X",
(uint64_t)fapi2::current_err);

FAPI_INF("MCA %u: Total DIMM size %lu GB", l_mcaPos, l_mcaSize);
Expand Down Expand Up @@ -315,21 +315,10 @@ fapi2::ReturnCode getMcMemSize(
"Error getting ATTR_CHIP_UNIT_POS, l_rc 0x%.8X",
(uint64_t)fapi2::current_err);

//TODO: RTC 173371
// Need Memory team's supports for function to be called on a DMI target.
#if 0
// Get the amount of memory behind this DMI target
FAPI_TRY(mss::eff_memory_size(l_dmi, l_dmiSize),
"Error returned from eff_memory_size, l_rc 0x%.8X",
"Error returned from eff_memory_size - DMI, l_rc 0x%.8X",
(uint64_t)fapi2::current_err);
#endif

//TODO: RTC 173371
// Fake data to test code on an AWAN
if ( (l_dmiPos >= 2) && (l_dmiPos <= 5) )
{
l_dmiSize = 64;
}

FAPI_INF("DMI %u: Total DIMM size %lu GB", l_dmiPos, l_dmiSize);
o_mcSize += l_dmiSize;
Expand Down
5 changes: 2 additions & 3 deletions src/import/chips/p9/procedures/hwp/nest/p9_mss_setup_bars.mk
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
# IBM_PROLOG_END_TAG

# Include the macros and things for MSS procedures
-include 00common.mk

PROCEDURE=p9_mss_setup_bars
$(eval $(call ADD_MEMORY_INCDIRS,$(PROCEDURE)))
lib$(PROCEDURE)_DEPLIBS+=cen
$(call ADD_MODULE_INCDIR,$(PROCEDURE),$(ROOTPATH))
$(call BUILD_PROCEDURE)
61 changes: 61 additions & 0 deletions src/usr/isteps/hb_temp_p9c_hwp_supports.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
/* $Source: src/usr/isteps/hb_temp_p9c_hwp_supports.C $ */
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2017 */
/* [+] 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. */
/* You may obtain a copy of the License at */
/* */
/* http://www.apache.org/licenses/LICENSE-2.0 */
/* */
/* Unless required by applicable law or agreed to in writing, software */
/* distributed under the License is distributed on an "AS IS" BASIS, */
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
/* implied. See the License for the specific language governing */
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
/**
*
* @file hb_temp_p9c_hwp_supports.C
*
* TODO: RTC 176018
*
* Contains the dummy functions to temporarily allow successful HB compilation
* when HWPs call Cumulus related libraries.
*
* This file is to be removed once Hostboot imports Cumulus lib code from EKB.
*
*/

/******************************************************************************/
// Includes
/******************************************************************************/
#include <stdint.h>
#include <fapi2.H>
#include <generic/memory/lib/utils/memory_size.H>

namespace mss
{

///
/// @brief Return the total memory size behind a DMI
/// @param[in] i_target the DMI target
/// @param[out] o_size the size of memory in GB behind the target
/// @return FAPI2_RC_SUCCESS if ok
///
template<>
fapi2::ReturnCode eff_memory_size( const fapi2::Target<fapi2::TARGET_TYPE_DMI>& i_target, uint64_t& o_size )
{
o_size = 0;
return fapi2::FAPI2_RC_SUCCESS;
}

}
6 changes: 5 additions & 1 deletion src/usr/isteps/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2011,2016
# Contributors Listed Below - COPYRIGHT 2011,2017
# [+] International Business Machines Corp.
#
#
Expand Down Expand Up @@ -49,6 +49,10 @@ OBJS += hwpistepud.o
OBJS += istepHelperFuncs.o
OBJS += pbusLinkSvc.o

#TODO: RTC 176018
EXTRAINCDIR += ${ROOTPATH}/src/import/
OBJS += hb_temp_p9c_hwp_supports.o

OBJS += $(if $(CONFIG_OPENPOWER_VOLTMSG),openpower_vddr.o,hbToHwsvVoltageMsg.o)

EXTRAINCDIR += ${ROOTPATH}/src/usr/initservice/istepdispatcher
Expand Down

0 comments on commit 578f09c

Please sign in to comment.