diff options
| author | Elizabeth Liner <eliner@us.ibm.com> | 2016-07-27 15:13:03 -0500 |
|---|---|---|
| committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-09-26 14:41:38 -0400 |
| commit | 9b2a0194995ebfdd070cf5facb0743fb08fdc38e (patch) | |
| tree | bc08dd6d1a00b5350325a531b7e96bbac2d644d6 /src/usr/isteps/istep18 | |
| parent | 1f8764f7c1673eb85a40ab36be14888f84e57545 (diff) | |
| download | talos-hostboot-9b2a0194995ebfdd070cf5facb0743fb08fdc38e.tar.gz talos-hostboot-9b2a0194995ebfdd070cf5facb0743fb08fdc38e.zip | |
Porting non-hdat from powervm-p8 into master-p8
Change-Id: I49d20a8c64bd5702aeceeff77bc5119f52996d21
RTC:156618
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/29810
Tested-by: Jenkins Server <pfd-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>
Diffstat (limited to 'src/usr/isteps/istep18')
| -rwxr-xr-x | src/usr/isteps/istep18/TodControls.C | 412 | ||||
| -rwxr-xr-x | src/usr/isteps/istep18/TodControls.H | 178 | ||||
| -rwxr-xr-x | src/usr/isteps/istep18/TodSvc.C | 3 | ||||
| -rwxr-xr-x | src/usr/isteps/istep18/TodTypes.H | 4 |
4 files changed, 68 insertions, 529 deletions
diff --git a/src/usr/isteps/istep18/TodControls.C b/src/usr/isteps/istep18/TodControls.C index 20c87c13d..8c3c678aa 100755 --- a/src/usr/isteps/istep18/TodControls.C +++ b/src/usr/isteps/istep18/TodControls.C @@ -537,164 +537,6 @@ errlHndl_t TodControls::buildTodDrawers( } //****************************************************************************** -//TodControls::getTodConfigState -//****************************************************************************** -errlHndl_t TodControls::getTodConfigState( - TOD_CONFIG_STATE& o_configState, - proc_tod_setup_tod_sel& o_activeConfig, - bool& o_isTodRunning)const -{ - TOD_ENTER("getTodConfigState"); - errlHndl_t l_errHdl = NULL; - o_configState = TOD_UNCHANGED; - o_activeConfig = TOD_PRIMARY; - o_isTodRunning = false; - - do - { - //Get the currently active TOD configuration - l_errHdl = queryActiveConfig (o_activeConfig,o_isTodRunning); - if ( l_errHdl ) - { - TOD_ERR("Call to queryActiveConfig failed "); - break; - } - //Need to read the TodSystemFile to decide if HW configuration has - //changed since the last time TOD was configured - std::vector<TodChipData> l_todChipDataVector; - l_errHdl = TodControls::readTodProcDataFromFile(l_todChipDataVector); - if ( l_errHdl ) //Indicates hard failure not limited to failure of tod - //logic only, we cannot continue with flow - { - TOD_ERR("Failed loading TodChipData from TodSystemFile"); - break; - } - - //Determine if the TOD HW has changed since the last time topology was - //created - //1) File data is valid but HW has changed => Report TOD_MODIFIED - //2) File data is valid and HW has not changed => Report TOD_UNCHANGED - //3) Authenticity of file data is in question => Report - //TOD_UNKNOWN - - //Check if TodSystemFile has topology data for atleast one node - if ( hasNoValidData ( l_todChipDataVector )) - { - TOD_INF("No valid data found in the file TodSystemFile"); - o_configState = TOD_UNKNOWN; - break; - } - - //For each functional processor present in the system, if we - //have, old configuration data in the TodSystemConfig file then - //validate it. - - //Get the processors present in the system - TARGETING::PredicateCTM - l_procFilter(TARGETING::CLASS_CHIP,TARGETING::TYPE_PROC, - TARGETING::MODEL_NA); - - TARGETING::PredicateHwas l_presencePredicate; - l_presencePredicate.present(true); - - TARGETING::PredicatePostfixExpr l_presenceAndProcChipFilter; - l_presenceAndProcChipFilter.push(&l_procFilter). - push(&l_presencePredicate).And(); - - TARGETING::TargetRangeFilter l_filter( - TARGETING::targetService().begin(), - TARGETING::targetService().end(), - &l_presenceAndProcChipFilter); - - bool l_state = false; //Variable for keeping functional state of - //the processor - uint32_t l_ordinalId = TOD_INVALID_UNITID; - //Initializing to some value not expected to be ordinal id - - ecmdDataBufferBase l_chipCtrlRegBuf(64); - - //Initialize l_chipCtrlRegBuf it will be used later - - FAPI_INVOKE_HWP(l_errHdl, init_chip_ctrl_reg, l_chipCtrlRegBuf); - if ( l_errHdl ) - { - TOD_ERR("init_chip_ctrl_reg returned error "); - break; - } - - for ( ; l_filter ; ++l_filter ) - { - l_state = false; - if ((*l_filter)->getAttr<ATTR_HWAS_STATE>().functional) - { - l_state = true; - } - - // use position attribute on one drawer only machine - l_ordinalId=(*l_filter)->getAttr<ATTR_POSITION>(); - - if ( l_state ) //Functional processor - { - //Check if TodSystemData file also indicates the processor as - //functional - - //Indexing into l_todChipDataVector is safe as size of vector is - //always determined by the maximum possible processors for this - //system type - if(((l_todChipDataVector[l_ordinalId].header.flags) & - TOD_FUNC) != 0 ) - { - - //File data says that the chip is functional do some more - //validation on the data - - //Check if the chip control register (0x40010) data is valid - //This data does not depend on topology, so it should tally - if ( (l_todChipDataVector[l_ordinalId].regs.ccr) != - l_chipCtrlRegBuf.getWord(0) ) - { - TOD_INF("Chip control register read from TodSystemData" - "is not valid for the processor 0x%08X", - (*l_filter)->getAttr<TARGETING::ATTR_HUID>()); - //We do not have a valid data no need to continue - //further - o_configState = TOD_UNKNOWN; - break; - } - } - else - { - //New hardware has been added - TOD_INF("New processor detected 0x%08X", - (*l_filter)->getAttr<ATTR_HUID>()); - o_configState = TOD_MODIFIED; - } - - } - else - { - //Check if this chip was functional earlier - if ( ((l_todChipDataVector[l_ordinalId].header.flags) & - TOD_FUNC) != 0 ) - { - //HW has been removed - o_configState = TOD_MODIFIED; - TOD_INF("Processor 0x%08X is no more available ", - (*l_filter)->getAttr<ATTR_HUID>()); - } - } - } - - }while(0); - - TOD_EXIT(" config state = %d, active config = %d, TOD HW State = " - "%d errHdl = %p", - o_configState, o_activeConfig , o_isTodRunning, l_errHdl); - - return l_errHdl; -} - -//****************************************************************************** //TodControls::isTodRunning //****************************************************************************** errlHndl_t TodControls::isTodRunning(bool& o_isTodRunning)const @@ -1038,6 +880,11 @@ errlHndl_t TodControls::writeTodProcData( TodChipData blank; uint32_t l_maxProcCount = getMaxProcsOnSystem(); + Target* l_target = NULL; + + //the size of the attribute needs to accomodate the size of the struct + TOD_ASSERT(sizeof(TodChipData) == sizeof(ATTR_TOD_CPU_DATA_type), + "sizeof TodChipData and attribute are different"); TOD_INF("Max possible processor chips for this system when configured " "completely is %d",l_maxProcCount); @@ -1119,15 +966,13 @@ errlHndl_t TodControls::writeTodProcData( } - } - } + ATTR_TOD_CPU_DATA_type l_tod_array; + memcpy(l_tod_array, + &iv_todChipDataVector[l_ordId],sizeof(TodChipData)); - //Done with setting the data write it to the file - l_errHdl = writeTodProcDataToFile(); - if ( l_errHdl ) - { - TOD_ERR( "Failed writing TOD chip data to the file "); - break; + l_target = const_cast<Target *>((*l_procItr)->getTarget()); + l_target->setAttr<ATTR_TOD_CPU_DATA>(l_tod_array); + } } }while(0); @@ -1137,235 +982,76 @@ errlHndl_t TodControls::writeTodProcData( }//end of writeTodProcData - //****************************************************************************** -//TodControls::writeTodProcDataToFile() +//HwsvTodControls::hasNoValidData() //****************************************************************************** -errlHndl_t TodControls::writeTodProcDataToFile() +bool TodControls::hasNoValidData(const std::vector<TodChipData>& + i_todChipDataVector)const { - TOD_ENTER("writeTodProcDataToFile"); - errlHndl_t l_errHdl = NULL; -#ifndef __HOSTBOOT_MODULE - do + TOD_ENTER("hasNoValidData"); + bool result = true; + for(std::vector<TodChipData>::const_iterator l_iter = + i_todChipDataVector.begin(); + l_iter != i_todChipDataVector.end(); ++l_iter) { - std::string l_fileOpenMode(FILE_WRITE_MODE); - char l_fileName[128]; - l_errHdl = getTodProcDataFilePath(l_fileName); - if(l_errHdl) - { - TOD_ERR("Failed getting the file path for sharing TOD data with " - " HDAT "); - break; - } - - //Create the parent directory in which file has to be written - std::string l_dirPath = l_fileName.substr - (0,l_fileName.find_last_of(DIR_PATH_SERERATOR)); - int rc = mkdir(l_dirPath.c_str(),DIR_CREATION_MODE); - - if ( rc != 0 ) - { - //EEXIST just means it already exists, which is fine - if (errno != EEXIST) - { - TOD_ERR("Error creating the directory %s " - "system returned error code %d", - l_dirPath.c_str(),errno); - break; - } - } - - UtilFile file; - l_errHdl = file.open(l_fileName.c_str(), l_fileOpenMode.c_str()); - if ( l_errHdl ) - { - TOD_ERR("Failed opening the file %s, with mode %s" , - l_fileName.c_str(),l_fileOpenMode.c_str()); - break; - } - - TodChipDataContainer::iterator l_chipDataItr = - iv_todChipDataVector.begin(); - file.write(reinterpret_cast<void *>((&(*l_chipDataItr))), - (iv_todChipDataVector.size()* sizeof(TodChipData))); - - l_errHdl = file.getLastError(); - if ( l_errHdl ) - { - TOD_ERR("Failed writing the tod chip data to file "); - break; - } - - l_errHdl = file.close(); - if ( l_errHdl ) + if(((*l_iter).header.flags & TOD_FUNC) != 0) { - TOD_ERR("Failed closing the file %s", l_fileName.c_str()); + result = false; break; } - - }while(0); -#endif - TOD_EXIT("writeTodProcDataToFile. errHdl = %p", l_errHdl); - return l_errHdl; - + } + TOD_EXIT("hasNoValidData"); + return result; } + //***************************************************************************** -//TodControls::readTodProcDataFromFile +//TodControls::getTodProcDataFromAttribute() //****************************************************************************** -errlHndl_t TodControls::readTodProcDataFromFile( +errlHndl_t TodControls::getTodProcDataFromAttribute( std::vector<TodChipData>& o_todChipDataVector )const { - TOD_ENTER("readTodProcDataFromFile"); + TOD_ENTER("getTodProcDataFromAttribute()"); errlHndl_t l_errHdl = NULL; -#ifndef __HOSTBOOT_MODULE + do { - std::string l_todProcDataFile; - UtilFile l_file; - - l_errHdl = getTodProcDataFilePath(l_todProcDataFile); - if(l_errHdl) - { - TOD_ERR("Failed getting the path of TodSystemFile "); - break; - } + TodChipData l_todData; + memset(&l_todData,0,sizeof(TodChipData)); + ATTR_TOD_CPU_DATA_type l_arrayVal; - if ( !UtilFile::exists(l_todProcDataFile.c_str())) - { - TOD_INF("File %s , does not exist",l_todProcDataFile.c_str()); - break; - } - - //Open the file for reading - l_errHdl = l_file.open(l_todProcDataFile.c_str(),FILE_READ_MODE); - if ( l_errHdl ) - { - TOD_ERR("Failed opening the file %s, with mode %s" , - l_todProcDataFile.c_str(),FILE_READ_MODE); - break; - } + //the size of the attribute needs to accommodate the size of the struct + TOD_ASSERT(sizeof(TodChipData) == sizeof(ATTR_TOD_CPU_DATA_type), + "sizeof TodChipData and attribute different"); //The amount of data stored on TodSystemFile always depend on the //maximum processor possible for the given system type uint32_t l_maxProcCount = getMaxProcsOnSystem(); - uint32_t l_bytesToRead = l_file.size(); - - if ( (l_bytesToRead == 0) || (l_bytesToRead > (l_maxProcCount * - sizeof(TodChipData)))) //Check for further safeguards - { - TOD_ERR("Error, File %s is corrupted" - ,l_todProcDataFile.c_str()); - - //Commit this locally, because system can still proceed if TOD HW is - //not running - l_errHdl->commit(HWSV_COMP_ID, ERRL_ACTION_REPORT, - ERRL_SEV_INFORMATIONAL); - delete l_errHdl; - l_errHdl = 0; - break; - } - TodChipData blank; - o_todChipDataVector.assign(l_maxProcCount,blank); //Allocate memory with - //default values - //Read the data from file - l_file.read(reinterpret_cast<void *>(&(*(o_todChipDataVector.begin()))), - l_bytesToRead); + //Allocate memory + o_todChipDataVector.assign(l_maxProcCount,blank); + TARGETING::TargetHandleList l_procListA; + getAllChips(l_procListA, TYPE_PROC); - l_errHdl = l_file.getLastError(); - if ( l_errHdl ) + bool l_read=0; + for(TargetHandleList::const_iterator proc = l_procListA.begin(); + proc != l_procListA.end(); ++proc) { - TOD_ERR("Failed reading tod chip data from file "); - break; - + l_read = + (*proc)->tryGetAttr<TARGETING::ATTR_TOD_CPU_DATA>(l_arrayVal); + TOD_ASSERT(l_read==true, "ATTR_TOD_CPU_DATA not found"); + memcpy(&l_todData, l_arrayVal, sizeof(TodChipData)); + o_todChipDataVector + [(*proc)->getAttr<TARGETING::ATTR_POSITION>()]= l_todData; } - l_errHdl = l_file.close(); - if ( l_errHdl ) - { - TOD_ERR("Failed closing the file %s", l_todProcDataFile.c_str()); - break; - } - //Not going to close the file in error path , UtilFile will close it. - - }while(0); -#endif - TOD_EXIT("readTodProcDataFromFile. errHdl = %p", l_errHdl); - return l_errHdl; -} - -//****************************************************************************** -//TodControls::getTodProcDataFilePath() -//****************************************************************************** -errlHndl_t TodControls::getTodProcDataFilePath(char * o_fileName) - const -{ - TOD_ENTER("getTodProcDataFilePath"); - errlHndl_t l_errHdl = NULL; -#ifndef __HOSTBOOT_MODULE - char *l_buf = NULL; - do - { - uint32_t l_fileSize = 0; - const char* l_stringToAppend = NULL; - const char* l_filePathKey[2] = - { P1_ROOT_PATH, - CINI_SYSTODFILE_PATH - }; - - - l_errHdl = UtilReg::path(l_filePathKey,(sizeof(l_filePathKey) / - sizeof(l_filePathKey[0])), - l_stringToAppend,l_buf,l_fileSize); - - if ( l_errHdl ) - { - TOD_ERR("Failed getting file path from the registry using keys" - "P1_ROOT_PATH and CINI_SYSTODFILE_PATH " ); - break; - } - - o_fileName = std::string(l_buf); - TOD_INF("Found file path %s",o_fileName.c_str()); - - }while(0); + TOD_EXIT("getTodProcDataFromAttribute(). errHdl = %p", l_errHdl); - if ( l_buf ) - { - delete l_buf; - } -#endif - TOD_EXIT("getTodProcDataFilePath. errHdl = %p", l_errHdl); return l_errHdl; } - -//****************************************************************************** -//HwsvTodControls::hasNoValidData() -//****************************************************************************** -bool TodControls::hasNoValidData(const std::vector<TodChipData>& - i_todChipDataVector)const -{ - TOD_ENTER("hasNoValidData"); - bool result = true; - for(std::vector<TodChipData>::const_iterator l_iter = - i_todChipDataVector.begin(); - l_iter != i_todChipDataVector.end(); ++l_iter) - { - if(((*l_iter).header.flags & TOD_FUNC) != 0) - { - result = false; - break; - } - } - TOD_EXIT("hasNoValidData"); - return result; -} - - }//end of namespace diff --git a/src/usr/isteps/istep18/TodControls.H b/src/usr/isteps/istep18/TodControls.H index d072f5ff5..339bfb9a6 100755 --- a/src/usr/isteps/istep18/TodControls.H +++ b/src/usr/isteps/istep18/TodControls.H @@ -41,7 +41,6 @@ #include <util/singleton.H> #include "proc_tod_utils.H" #include "TodDrawer.H" -#include <map> namespace TOD { @@ -273,66 +272,6 @@ public: return iv_todConfig[i_config].iv_isConfigured; } - /** - * - * @brief getTodConfigState will enable other methods to make a decision - * regarding valid action to be performed to modify the - * topology. - * - * @par Detailed Description: - * On getting a topology creation/modification request, TOD service - * methods need to determine next course of action based on the ChipTOD - * HW state and the state of the data that is available in the - * TodSystemData file.(TodSystemData file contains the previously - * created TOD topology's information). This method will provide all - * the information that is required to determine next course of action. - * - * Following algorithm is used - * 1) Check TOD status register to determine TOD HW state and the active - * configuration - * 2) Read the TodSystemData to find, if HW has changed i.e. new - * functional processors became available or one of the processor that - * was functional when topology was created last time became - * non-functional. - * - * Method can report TOD config state as one of the following - * a)TOD_UNCHANGED ==> No change in the HW - * b)TOD_MODIFIED ==> HW has changed - * c)TOD_UNKNOWN ==> It is not possible to determine the state - * - * @param[out] o_configState - * This parameter will indicate to caller if the HW as seen by - * getTodConfigState is same as indicated by the TodSystemData or not. - * One of the enums listed in TOD_CONFIG_STATE will be returned. - * - * @param[out] o_isTodRunning - * It will be true if the ChipTOD HW is running. - * - * @param[out] o_activeConfig - * This parameter will carry back the information regarding the topology - * that has been currently selected by PHYP, if ChipTOD HW is running. - * In case TOD HW is not running then it will report TOD_PRIMARY, as - * that is the configuration to be picked by PHYP once the TOD logic - * starts running. - * - * @return Error log handle that will determine if method was successful in - * determining various parameters or not - * @retval NULL , Indicates success - * @retval !NULL , Failed getting the output parameters,in this case - * value of o_configState,o_isTodRunning and o_activeConfig should - * not be considered for any further action. - * - * This API may return one of the following "special" reason codes: - * NA - * - * @note It is up to the caller to change the severity of the - * returned error based on what it decides to do with it. By default - * any returned error created by this function will be a non-reported - * tracing event error log. - */ - errlHndl_t getTodConfigState ( TOD_CONFIG_STATE& o_configState, - proc_tod_setup_tod_sel& o_activeConfig, - bool& o_isTodRunning)const; /** * @brief isTodRunning returns the current state of ChipTOD HW i.e. * whether it is running or not @@ -369,14 +308,14 @@ public: /** - * @brief This method will provide TOD topology register data to HDAT + * @brief This method will save TOD topology register data for HDAT * * @par Detailed Description: * HWSV needs to share TOD topology data with HDAT. * HWSV also needs to persist with TOD topology data across non-memory * preserving IPL's. * Both the above requirements will be fulfilled by writing data - * to a file. + * to an attribute per proc. * This method will take the TOD register data and put it in the format * required by HDAT, and then call helper method to write the same to a * file @@ -389,78 +328,24 @@ public: * building one of the topologies i.e. primary could be built but not * the secondary then primary should be passed as i_config. * - * @return Error log handle indicating the status of the request. - * @retval NULL if successful - * @retval !NULL if failed to write TOD configuration data - * - * Error log handle points to a valid error log object whose primary - * SRC reason code (pError->getSRC()->reasonCode()) indicates the type - * of error. - * - * @note It is up to the caller to change the severity of the returned - * error based on what it decides to do with it. By default any - * returned error created by this function will be a non-reported - * tracing event error log. + * @return NULL if successful + * !NULL otherwise */ errlHndl_t writeTodProcData(const proc_tod_setup_tod_sel i_config); - - /** - * - * @brief This is a helper method for writeTodProcDataToFile, it will - * determine file path where array of hwsvTodChipData structure has to - * be written by HWSV , HDAT will read this file. - * - * @par Detailed Description: - * The file to which data has to be written will be determined by the - * following registry keys - * 1. fstp/P1_Root (To determine the root directory of P1) - * 2. CINI_SYSTODFILE_PATH (To determine the directory and file name - * within P1_Root where the data is to be written) - * - * @param[in] o_fileName - * Output parameter to carry back the file name qualified by full path - * where the data has has to be written. - * - * @return Error log handle indicating the status of the request. - * @retval NULL if file path could be determined successfully - * @retval !NULL if file path could not be found - * - * Error log handle points to a valid error log object whose primary - * SRC reason code (pError->getSRC()->reasonCode()) indicates the type - * of error. - * - * @note It is up to the caller to change the severity of the returned error - * based on what it decides to do with it. By default any returned - * error created by this function will be a non-reported tracing event - * error log. - */ - errlHndl_t getTodProcDataFilePath(char * o_fileName) const; - /** - * @brief This is a helper method for writeTodProcData, it will write the - * array of hwsvTodChipData structures created by writeTodProcData to a - * file with P1 persistancy - * - * @par Detailed Description: - * The method will work on iv_todChipData and take help of - * getTodProcDataFilePath to detrmine the file path where - * iv_todChipData has to be written. - * - * @return Error log handle indicating the status of the request - * @retval NULL if the data could not be written successfully - * @retval !NULL if the data was written successfully - * - * Error log handle points to a valid error log object whose primary - * SRC reason code (pError->getSRC()->reasonCode()) indicates the type - * of error. - * - * @note It is up to the caller to change the severity of the returned - * error based on what it decides to do with it. By default any - * returned error created by this function will be a non-reported - * tracing event error log. - */ - errlHndl_t writeTodProcDataToFile(); + /** + * @brief This method will be used to return Tod Data for all procs + * by reading the TOD data from chip attribute + * + * @param[in]: o_todChipDataVector + * is populated with TOD data + * + * @return if it cannot read from attribute TOD_ASSERT() will be invoked + */ + errlHndl_t getTodProcDataFromAttribute( + std::vector<TodChipData>& o_todChipDataVector )const; + /** * @@ -563,37 +448,6 @@ private: TARGETING::Target*& o_secondaryMdmt)const; /** - * @brief This method will read the TOD topology register data from - * TodSystemData file - * - * @par Detailed Description: - * TodSystemData file is a P1 persistent file that will retain the TOD - * topology data from previous configuration. Any request to recofigure - * backup topology should consider the previous topology data. This - * method will read the TodSystemData file and put the data in - * hwsvTodChipData structures. - * - * @param[out ] o_todChipDataVector , Array of hwsvTodChipData structures - * that will be populated with the data from TodSystemData file. - * - * @return Error log handle indicating the status of the request. - * @retval NULL if TodSystemData was successfully read. - * @retval !NULL if TodSystemData could not be read. This will happen if - * the file does not exist, one of the file operation failed or file - * does not have expected data. - * - * This API may return one of the following "special" reason codes: - * NA - * - * @note It is up to the caller to change the severity of the - * returned error based on what it decides to do with it. By default - * any returned error created by this function will be a non-reported - * tracing event error log. - */ - errlHndl_t readTodProcDataFromFile(std::vector<TodChipData>& - o_todChipDataVector )const; - - /** * @brief This method will be used to determine if the data read from * TodSystemData file indicates at least one functional processor * diff --git a/src/usr/isteps/istep18/TodSvc.C b/src/usr/isteps/istep18/TodSvc.C index 6b03e0355..f52cc99dd 100755 --- a/src/usr/isteps/istep18/TodSvc.C +++ b/src/usr/isteps/istep18/TodSvc.C @@ -199,8 +199,7 @@ errlHndl_t TodSvc::todSetup() l_errHdl = l_Tod.writeTodProcData(TOD_PRIMARY); if(l_errHdl) { - TOD_ERR("TOD setup failure:Failed to write topology register data" - " to the file."); + TOD_ERR("TOD setup: Failed to write topology register data"); } } diff --git a/src/usr/isteps/istep18/TodTypes.H b/src/usr/isteps/istep18/TodTypes.H index e94a1d2d7..b4750ce22 100755 --- a/src/usr/isteps/istep18/TodTypes.H +++ b/src/usr/isteps/istep18/TodTypes.H @@ -64,7 +64,7 @@ namespace TOD uint32_t chipID; //Chip ID uint32_t flags; //Flags TodChipHeader(void) : chipID(0),flags(TOD_NONFUNC) {} - }; + }__attribute__ ((packed)); /** * Sub structure of TodChipData, That will contain the first 32 bits of @@ -90,7 +90,7 @@ namespace TOD mpcr(0),pcrp0(0),pcrp1(0),scrp0(0),scrp1(0), spcr(0),ipcr(0),psmscr(0),ccr(0) {} - }; + }__attribute__ ((packed)); /** * TOD Data for each chip that HDAT will communicate |

