From c96efe7a05d16170dd57cc0c367d5f5692bec68b Mon Sep 17 00:00:00 2001 From: Mike Jones Date: Tue, 20 Nov 2012 14:56:20 -0600 Subject: HWPF: Add FAPI Attr Sync Functionality and enable FSP-HB Attr Overrides Change-Id: I64939aa0655659e48400bca0c4aa09afe333889c RTC: 46992 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2397 Tested-by: Jenkins Server Reviewed-by: Van H. Lee Reviewed-by: Brian H. Horton Reviewed-by: A. Patrick Williams III --- src/include/usr/hwpf/fapi/fapiAttributeOverride.H | 207 ------ src/include/usr/hwpf/fapi/fapiAttributeService.H | 61 +- src/include/usr/hwpf/fapi/fapiAttributeTank.H | 713 +++++++++++++++++++++ src/include/usr/hwpf/hwp/fapiTestHwpAttr.H | 49 +- .../usr/hwpf/plat/fapiPlatAttrOverrideSync.H | 94 +++ .../usr/hwpf/plat/fapiPlatAttributeService.H | 273 +------- src/include/usr/mbox/mbox_queues.H | 19 +- 7 files changed, 877 insertions(+), 539 deletions(-) delete mode 100644 src/include/usr/hwpf/fapi/fapiAttributeOverride.H create mode 100644 src/include/usr/hwpf/fapi/fapiAttributeTank.H create mode 100755 src/include/usr/hwpf/plat/fapiPlatAttrOverrideSync.H (limited to 'src/include') diff --git a/src/include/usr/hwpf/fapi/fapiAttributeOverride.H b/src/include/usr/hwpf/fapi/fapiAttributeOverride.H deleted file mode 100644 index 2a125a5ec..000000000 --- a/src/include/usr/hwpf/fapi/fapiAttributeOverride.H +++ /dev/null @@ -1,207 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/include/usr/hwpf/fapi/fapiAttributeOverride.H $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 2012 - * - * 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_TAG - */ -/** - * @file fapiAttributeOverride.H - * - * @brief Defines the AttributeOverrides and AttributeOverride classes. A - * platform can choose to use an AttributeOverrides object to store - * Attribute Overrides. - */ - -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * mjjones 06/07/2012 Created - */ - -#ifndef FAPIATTROVERRIDE_H_ -#define FAPIATTROVERRIDE_H_ - -#include -#include -#include -#include - -namespace fapi -{ - -/** - * @enum AttributeOverrideType - * - * Enumeration of the possible attribute override types - */ -enum AttributeOverrideType -{ - ATTR_OVERRIDE_CONST = 1, // Not cleared by a FAPI_ATTR_SET - ATTR_OVERRIDE_NON_CONST = 2, // Cleared by a FAPI_ATTR_SET - ATTR_OVERRIDE_CLEAR_ALL = 3, // Clear all overrides -}; - -// Constants for various fields in AttributeOverrides -const uint16_t ATTR_POS_NA = 0xffff; // iv_pos not applicable -const uint8_t ATTR_UNIT_POS_NA = 0xff; // iv_unitPos not applicable -const uint8_t ATTR_ARRAYD_NA = 0xff; // iv_arayX not applicable - -/** - * @struct AttributeOverride - * - * This structure defines a single attribute override. In the case of an array - * attribute, it is an override for a single element - */ -struct AttributeOverride -{ - uint64_t iv_overrideVal; // Large enough to hold the biggest attribute size - uint32_t iv_attrId; // fapi::AttributeId enum value - uint32_t iv_targetType; // fapi::TargetType enum value - uint16_t iv_pos; // For chips/dimms the position - // For chiplets the parent chip position - uint8_t iv_unitPos; // For chiplets the position - uint8_t iv_overrideType; // fapi::AttributeOverrideType enum value - uint8_t iv_arrayD1; // Applies to element D1 in 1D or more array atts - uint8_t iv_arrayD2; // Applies to element D2 in 2D or more array atts - uint8_t iv_arrayD3; // Applies to element D3 in 3D or more array atts - uint8_t iv_arrayD4; // Applies to element D4 in 4D array atts -}; - -/** - * @class AttributeOverrides - * - * This class can be used to set and query attribute overrides - */ -class AttributeOverrides -{ -public: - /** - * @brief Default constructor - */ - AttributeOverrides(); - - /** - * @brief Destructor - */ - ~AttributeOverrides(); - - /** - * @brief Clear all overrides - */ - void clearOverrides(); - - /** - * @brief Clear any non-const override for a specified ID and Target - * - * @param[in] i_attrId Attribute ID - * @param[in] i_pTarget Pointer to Target (NULL if system) - */ - void clearNonConstOverride(const fapi::AttributeId i_attrId, - const fapi::Target * const i_pTarget); - - /** - * @brief Set an override - * - * Note that no checking is done for duplicate overrides (an override on an - * attribute that already has an override) for performance. If a duplicate - * override is done then getOverride will return the first one. - * - * @param[in] i_override Reference to override structure, this is copied - */ - void setOverride(const AttributeOverride & i_override); - - /** - * @brief Get an override - * - * Note that for array attributes, this must be called repeatedly, to query - * an override for each element of the array - * - * @param[in] i_attrId Attribute ID - * @param[in] i_pTarget Pointer to Target (NULL if system) - * @param[out] o_overrideVal Reference that is filled in with the override - * @param[in] i_arrayD1 Array dimension 1 if applicable - * @param[in] i_arrayD2 Array dimension 2 if applicable - * @param[in] i_arrayD3 Array dimension 3 if applicable - * @param[in] i_arrayD4 Array dimension 4 if applicable - * - * return true if override exists and was returned. - */ - bool getOverride(const fapi::AttributeId i_attrId, - const fapi::Target * const i_pTarget, - uint64_t & o_overrideVal, - const uint8_t i_arrayD1 = ATTR_ARRAYD_NA, - const uint8_t i_arrayD2 = ATTR_ARRAYD_NA, - const uint8_t i_arrayD3 = ATTR_ARRAYD_NA, - const uint8_t i_arrayD4 = ATTR_ARRAYD_NA); - - /** - * @brief Returns if any overrides exist - * - * This is only expected to be called by unit test - * - * return true if any overrides exist - */ - bool overridesExist(); - -private: - // Copy constructor and assignment operator disabled - AttributeOverrides(const AttributeOverrides & i_right); - AttributeOverrides & operator=(const AttributeOverrides & i_right); - - /** - * @brief Returns if the specified override is for the specified - * attribute ID and Target - * - * @param[in] i_attrId Attribute ID - * @param[in] i_pTarget Pointer to Target (NULL if system) - * @param[in] i_candidate Reference to AttributeOverride - * - * @return true if the AttributeOverride matches - */ - static bool overrideMatch(const fapi::AttributeId i_attrId, - const fapi::Target * const i_pTarget, - const AttributeOverride & i_candidate); - - /** - * @brief Locks the AttributeOverrides object - * - * Implemented by the platform - */ - static void platLock(); - - /** - * @brief Unlocks the AttributeOverrides object - * - * Implemented by the platform - */ - static void platUnlock(); - - // The attribute overrides - bool iv_overridesExist; - std::list iv_overrides; - typedef std::list::iterator OverridesItr_t; - typedef std::list::const_iterator OverridesCItr_t; - -}; - -} - -#endif // FAPIATTROVERRIDE_H_ diff --git a/src/include/usr/hwpf/fapi/fapiAttributeService.H b/src/include/usr/hwpf/fapi/fapiAttributeService.H index 1744d11a6..186a43222 100644 --- a/src/include/usr/hwpf/fapi/fapiAttributeService.H +++ b/src/include/usr/hwpf/fapi/fapiAttributeService.H @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/include/usr/hwpf/fapi/fapiAttributeService.H $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 2011-2012 - * - * 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_TAG - */ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/hwpf/fapi/fapiAttributeService.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* */ +/* 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 */ /** * @file fapiAttributeService.H * @@ -86,12 +85,12 @@ * _GETMACRO PLAT macro is called to get the attribute, platforms must * define a _GETMACRO for each attribute. * - * The SET macro calls the _SETMACRO PLAT macro to set the attribute, - * platforms must define a _SETMACRO for each attribute. It then calls the - * FAPI_PLAT_CLEAR_NON_CONST_ATTR_OVERRIDE to clear any non-const attribute - * overrides (platforms can set this to NULL if they do not support - * attribute override or if they handle it in the standard _SETMACRO - * path). + * The SET macro calls the FAPI_PLAT_ATTR_SET_ACTIONS PLAT macro to perform + * any necessary platform actions on an attribute set, this includes + * clearing any non-const attribute override and storing the attribute for + * synchronization (platforms can set this to NULL if they do not need to + * take any actions). It then calls the _SETMACRO PLAT macro to set the + * attribute, platforms must define a _SETMACRO for each attribute * * Note that a const attribute override is one that is always returned on a * FAPI_ATTR_GET even if a subsequent FAPI_ATTR_SET is done. A non-const @@ -107,7 +106,7 @@ #define FAPI_ATTR_SET(ID, PTARGET, VAL) \ (fapi::fapiFailIfPrivileged(), \ fapi::fapiCheckIdType(fapi::ID, VAL), \ - FAPI_PLAT_CLEAR_NON_CONST_ATTR_OVERRIDE(fapi::ID, PTARGET), \ + FAPI_PLAT_ATTR_SET_ACTIONS(fapi::ID, PTARGET, VAL), \ ID##_SETMACRO(ID, PTARGET, VAL)) #define FAPI_ATTR_GET_PRIVILEGED(ID, PTARGET, VAL) \ @@ -118,7 +117,7 @@ #define FAPI_ATTR_SET_PRIVILEGED(ID, PTARGET, VAL) \ (fapi::fapiCheckIdType(fapi::ID, VAL), \ - FAPI_PLAT_CLEAR_NON_CONST_ATTR_OVERRIDE(fapi::ID, PTARGET), \ + FAPI_PLAT_ATTR_SET_ACTIONS(fapi::ID, PTARGET, VAL), \ ID##_SETMACRO(ID, PTARGET, VAL)) namespace fapi diff --git a/src/include/usr/hwpf/fapi/fapiAttributeTank.H b/src/include/usr/hwpf/fapi/fapiAttributeTank.H new file mode 100644 index 000000000..1a666e8cf --- /dev/null +++ b/src/include/usr/hwpf/fapi/fapiAttributeTank.H @@ -0,0 +1,713 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/hwpf/fapi/fapiAttributeTank.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012 */ +/* */ +/* 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 */ +/** + * @file fapiAttributeTank.H + * + * @brief Defines the AttributeTank and Attribute classes. A platform can + * choose to use these classes to store attributes for Attribute + * Overriding and Synchronization + */ + +/* + * Change Log ****************************************************************** + * Flag Defect/Feature User Date Description + * ------ -------------- ---------- ----------- ---------------------------- + * mjjones 06/07/2012 Created + * mjjones 10/15/2012 Moved to general AttributeTank. + */ + +#ifndef FAPIATTRTANK_H_ +#define FAPIATTRTANK_H_ + +#include +#include +#include +#include + +namespace fapi +{ + +class Target; // Forward Reference + +/** + * @enum AttributeFlags + * + * Enumeration of the possible attribute flags. This is a bitmap + */ +enum AttributeFlags +{ + ATTR_FLAG_CONST = 1, // Not cleared by clearNonConstAttribute + // Use-case is a constant Attribute Override +}; + +// Constants for various fields in Attribute +const uint16_t ATTR_POS_NA = 0xffff; // iv_pos not applicable +const uint8_t ATTR_UNIT_POS_NA = 0xff; // iv_unitPos not applicable +const uint8_t ATTR_ARRAYD_NA = 0xff; // iv_arrayDX not applicable + +/** + * @struct Attribute + * + * This structure defines a single attribute value. In the case of an array + * attribute, it is the value of one specific element + */ +struct Attribute +{ + uint64_t iv_val; // Value of attribute. + uint32_t iv_attrId; // fapi::AttributeId enum value + uint32_t iv_targetType; // fapi::TargetType enum value + uint16_t iv_pos; // For chips/dimms the position + // For chiplets the parent chip position + uint8_t iv_unitPos; // For chiplets the position + uint8_t iv_flags; // fapi::AttributeFlags enum value + uint8_t iv_arrayD1; // Applies to element D1 in 1D or more array atts + uint8_t iv_arrayD2; // Applies to element D2 in 2D or more array atts + uint8_t iv_arrayD3; // Applies to element D3 in 3D or more array atts + uint8_t iv_arrayD4; // Applies to element D4 in 4D array atts +}; + +/** + * @struct AttributeChunk + * + * This structure defines a chunk of memory containing Attributes. The max chunk + * size is chosen to be reasonable to send over a mailbox type interface + * between subsystems + */ +struct AttributeChunk +{ + static const size_t MAX_CHUNK_SIZE_BYTES = 4096; + static const size_t MAX_ATTRS_PER_CHUNK = + MAX_CHUNK_SIZE_BYTES / sizeof(Attribute); + size_t iv_numAttributes; // Number of Attributes in chunk + uint8_t * iv_pAttributes; // Pointer to chunk of memory +}; + +/** + * @class AttributeTank + * + * This class can be used to store Attributes + */ +class AttributeTank +{ +public: + /** + * @brief Allocation types + */ + enum AllocType + { + ALLOC_TYPE_MALLOC = 1, + ALLOC_TYPE_NEW = 2, + }; + + /** + * @brief Default constructor + */ + AttributeTank(); + + /** + * @brief Destructor + */ + virtual ~AttributeTank(); + + /** + * @brief Clear all attributes + */ + virtual void clearAllAttributes(); + + /** + * @brief Clear any non-const attribute for a specified ID and Target + * + * Note that for array attributes, this clears all values of the array + * + * This is called on an OverrideAttributeTank to clear a non-const + * Attribute Override during FAPI_ATTR_SET + * + * @param[in] i_attrId Attribute ID + * @param[in] i_pTarget Pointer to Target (NULL if system) + */ + virtual void clearNonConstAttribute(const fapi::AttributeId i_attrId, + const fapi::Target * const i_pTarget); + + /** + * @brief Set an Attribute + * + * Note that for array attributes, this must be called repeatedly, to set + * the attribute value for each element of the array + * + * If the attribute already exists then it is replaced with the new one + * + * This is called on a SyncAttributeTank to save an Attribute for syncing + * during FAPI_ATTR_SET + * + * @param[in] i_attrId Attribute ID + * @param[in] i_pTarget Pointer to Target (NULL if system) + * @param[in] i_val Value + * @param[in] i_arrayD1 Array dimension 1 if applicable + * @param[in] i_arrayD2 Array dimension 2 if applicable + * @param[in] i_arrayD3 Array dimension 3 if applicable + * @param[in] i_arrayD4 Array dimension 4 if applicable + */ + virtual void setAttribute(const fapi::AttributeId i_attrId, + const fapi::Target * const i_pTarget, + const uint64_t i_val, + const uint8_t i_arrayD1 = ATTR_ARRAYD_NA, + const uint8_t i_arrayD2 = ATTR_ARRAYD_NA, + const uint8_t i_arrayD3 = ATTR_ARRAYD_NA, + const uint8_t i_arrayD4 = ATTR_ARRAYD_NA); + + /** + * @brief Set an attribute + * + * Note that for array attributes, this must be called repeatedly, to set + * the attribute value for each element of the array + * + * If the attribute already exists then it is replaced with the new one + * + * @param[in] i_attribute Reference to Attribute structure, this is copied + */ + virtual void setAttribute(const Attribute & i_attribute); + + /** + * @brief Get a copy of an Attribute + * + * Note that for array attributes, this must be called repeatedly, to query + * the attribute value for each element of the array + * + * This is called on an OverrideAttributeTank to query/get an Attribute + * Override during FAPI_ATTR_GET + * + * @param[in] i_attrId Attribute ID + * @param[in] i_pTarget Pointer to Target (NULL if system) + * @param[out] o_val Reference that is filled in with the attr value + * @param[in] i_arrayD1 Array dimension 1 if applicable + * @param[in] i_arrayD2 Array dimension 2 if applicable + * @param[in] i_arrayD3 Array dimension 3 if applicable + * @param[in] i_arrayD4 Array dimension 4 if applicable + * + * return true if attribute exists and a copy was returned. + */ + virtual bool getAttribute(const fapi::AttributeId i_attrId, + const fapi::Target * const i_pTarget, + uint64_t & o_val, + const uint8_t i_arrayD1 = ATTR_ARRAYD_NA, + const uint8_t i_arrayD2 = ATTR_ARRAYD_NA, + const uint8_t i_arrayD3 = ATTR_ARRAYD_NA, + const uint8_t i_arrayD4 = ATTR_ARRAYD_NA) const; + + /** + * @brief Get a copy of all Attributes into newly allocated memory chunks + * + * The use case is for getting the attributes to send across the FSP/ + * Hostboot mailbox. Mailbox frees the data memory using free on Hostboot + * and delete[] on FSP. + * + * @param[in] i_allocType Which allocation is used to allocated memory + * @param[out] o_attributes Reference to vector that AttributeChunk structs + * are added to. The caller must free (if MALLOC) + * or delete[] (if NEW) each chunk's memory + */ + virtual void getAllAttributes( + AllocType i_allocType, + std::vector & o_attributes) const; + + /** + * @brief Returns if any attributes exist in the tank + * + * This is only expected to be called by unit test + * + * return true if any attributes exist + */ + virtual bool attributesExist(); + +protected: + // The name of the Tank used in traces, a derived class can set + const char * iv_pName; + +private: + // Copy constructor and assignment operator disabled + AttributeTank(const AttributeTank & i_right); + AttributeTank & operator=(const AttributeTank & i_right); + + /** + * @brief Returns the Attribute::iv_targetType of the specified Target + * + * @param[in] i_pTarget Pointer to Target + * + * @return uint32_t target-type + */ + static uint32_t getTargetType(const fapi::Target * const i_pTarget); + + /** + * @brief Returns the Attribute::iv_pos of the specified Target + * + * @param[in] i_pTarget Pointer to Target + * + * @return uint16_t position + */ + static uint16_t getTargetPos(const fapi::Target * const i_pTarget); + + /** + * @brief Returns the Attribute::iv_unitPos of the specified Target + * + * @param[in] i_pTarget Pointer to Target + * + * @return uint8_t unit-position + */ + static uint8_t getTargetUnitPos(const fapi::Target * const i_pTarget); + + /** + * @brief Locks the AttributeTank object + * + * Pure virtual function that must be overridden by a concrete derived class + * and implemented by the platform + */ + virtual void platLock() const = 0 ; + + /** + * @brief Unlocks the AttributeTank object + * + * Pure virtual function that must be overridden by a concrete derived class + * and implemented by the platform + */ + virtual void platUnlock() const = 0; + + // The attributes + // Note: A possible performance boost could be to store the elements in a + // map, the key could be a sub-structure. + bool iv_attributesExist; + std::list iv_attributes; + typedef std::list::iterator AttributesItr_t; + typedef std::list::const_iterator AttributesCItr_t; + +}; + +/** + * @class OverrideAttributeTank + * + * This class can be used to store a set of attribute overrides. It is provided + * to allow a platform to create a singleton Tank for holding overrides + */ +class OverrideAttributeTank : public AttributeTank +{ +public: + OverrideAttributeTank(); + +private: + // Copy constructor and assignment operator disabled + OverrideAttributeTank(const OverrideAttributeTank & i_right); + OverrideAttributeTank & operator=(const OverrideAttributeTank & i_right); + + /** + * @brief Locks the OverrideAttributeTank object + * + * Must be implemented by the platform + */ + virtual void platLock() const; + + /** + * @brief Unlocks the AttributeTank object + * + * Must be implemented by the platform + */ + virtual void platUnlock() const; +}; + +/** + * @class SyncAttributeTank + * + * This class can be used to store a set of attributes to sync. It is provided + * to allow a platform to create a singleton Tank for holding attributes to sync + */ +class SyncAttributeTank : public AttributeTank +{ +public: + SyncAttributeTank(); + + /** + * @brief Set an Attribute + * + * This overrides the AttributeTank function, it checks if the platform + * has enabled synchronization before saving the attribute in the tank + * + * @param[in] i_attrId Attribute ID + * @param[in] i_pTarget Pointer to Target (NULL if system) + * @param[in] i_val Value + * @param[in] i_arrayD1 Array dimension 1 if applicable + * @param[in] i_arrayD2 Array dimension 2 if applicable + * @param[in] i_arrayD3 Array dimension 3 if applicable + * @param[in] i_arrayD4 Array dimension 4 if applicable + */ + virtual void setAttribute(const fapi::AttributeId i_attrId, + const fapi::Target * const i_pTarget, + const uint64_t i_val, + const uint8_t i_arrayD1 = ATTR_ARRAYD_NA, + const uint8_t i_arrayD2 = ATTR_ARRAYD_NA, + const uint8_t i_arrayD3 = ATTR_ARRAYD_NA, + const uint8_t i_arrayD4 = ATTR_ARRAYD_NA); + + /** + * @brief Set an attribute + * + * This overrides the AttributeTank function, it simply calls the base class + * function (needed because the other version of setAttribute was + * overridden) + * + * @param[in] i_attribute Reference to Attribute structure, this is copied + */ + virtual void setAttribute(const Attribute & i_attribute) + { + AttributeTank::setAttribute(i_attribute); + } + +private: + // Copy constructor and assignment operator disabled + SyncAttributeTank(const SyncAttributeTank & i_right); + SyncAttributeTank & operator=(const SyncAttributeTank & i_right); + + /** + * @brief Checks if the platform has enabled synchronization + * + * Must be implemented by the platform + */ + static bool platSyncEnabled(); + + /** + * @brief Locks the OverrideAttributeTank object + * + * Must be implemented by the platform + */ + virtual void platLock() const; + + /** + * @brief Unlocks the AttributeTank object + * + * Must be implemented by the platform + */ + virtual void platUnlock() const; +}; + +/** + * @brief This template function gets a 1D array attribute from an AttributeTank + * + * @param[in] i_attrId Attribute ID + * @param[in] i_pTarget Pointer to Target the attribute is for (NULL if system) + * @param[in] i_tank Reference to AttributeTank + * @param[out] o_1dArray Reference to 1D array where attribute will be copied to + * @return bool True if override was returned + */ +template +bool getAttributeT(const fapi::AttributeId i_attrId, + const fapi::Target * const i_pTarget, + fapi::AttributeTank & i_tank, + T(&o_1dArray)[SZ1]) +{ + uint64_t l_val = 0; + + for (uint8_t d1 = 0; d1 < SZ1; d1++) + { + if (!(i_tank.getAttribute(i_attrId, i_pTarget, l_val, d1))) + { + // For array attributes, all elements must be overridden + return false; + } + else + { + // Standard conversion converts uint64_t to attribute type + o_1dArray[d1] = l_val; + } + } + + return true; +} + +/** + * @brief This template function gets a 2D array attribute from an AttributeTank + * + * @param[in] i_attrId Attribute ID + * @param[in] i_pTarget Pointer to Target the attribute is for (NULL if system) + * @param[in] i_tank Reference to AttributeTank + * @param[out] o_2dArray Reference to 2D array where attribute will be copied to + * @return bool True if override was returned + */ +template +bool getAttributeT(const fapi::AttributeId i_attrId, + const fapi::Target * const i_pTarget, + fapi::AttributeTank & i_tank, + T(&o_2dArray)[SZ1][SZ2]) +{ + uint64_t l_val = 0; + + for (uint8_t d1 = 0; d1 < SZ1; d1++) + { + for (uint8_t d2 = 0; d2 < SZ2; d2++) + { + if (!(i_tank.getAttribute(i_attrId, i_pTarget, l_val, d1, d2))) + { + // For array attributes, all elements must be overridden + return false; + } + else + { + // Standard conversion converts uint64_t to attribute type + o_2dArray[d1][d2] = l_val; + } + } + } + + return true; +} + +/** + * @brief This template function gets a 3D array attribute from an AttributeTank + * + * @param[in] i_attrId Attribute ID + * @param[in] i_pTarget Pointer to Target the attribute is for (NULL if system) + * @param[in] i_tank Reference to AttributeTank + * @param[out] o_3dArray Reference to 3D array where attribute will be copied to + * @return bool True if override was returned + */ +template +bool getAttributeT(const fapi::AttributeId i_attrId, + const fapi::Target * const i_pTarget, + fapi::AttributeTank & i_tank, + T(&o_3dArray)[SZ1][SZ2][SZ3]) +{ + uint64_t l_val = 0; + + for (uint8_t d1 = 0; d1 < SZ1; d1++) + { + for (uint8_t d2 = 0; d2 < SZ2; d2++) + { + for (uint8_t d3 = 0; d3 < SZ3; d3++) + { + if (!(i_tank.getAttribute(i_attrId, i_pTarget, l_val, d1, d2, + d3))) + { + // For array attributes, all elements must be overridden + return false; + } + else + { + // Standard conversion converts uint64_t to attribute type + o_3dArray[d1][d2][d3] = l_val; + } + } + } + } + + return true; +} + +/** + * @brief This template function gets a 4D array attribute from an AttributeTank + * + * @param[in] i_attrId Attribute ID + * @param[in] i_pTarget Pointer to Target the attribute is for (NULL if system) + * @param[in] i_tank Reference to AttributeTank + * @param[out] o_4dArray Reference to 4D array where attribute will be copied to + * @return bool True if override was returned + */ +template +bool getAttributeT(const fapi::AttributeId i_attrId, + const fapi::Target * const i_pTarget, + fapi::AttributeTank & i_tank, + T(&o_4dArray)[SZ1][SZ2][SZ3][SZ4]) +{ + uint64_t l_val = 0; + + for (uint8_t d1 = 0; d1 < SZ1; d1++) + { + for (uint8_t d2 = 0; d2 < SZ2; d2++) + { + for (uint8_t d3 = 0; d3 < SZ3; d3++) + { + for (uint8_t d4 = 0; d4 < SZ4; d4++) + { + if (!(i_tank.getAttribute(i_attrId, i_pTarget, l_val, d1, d2, + d3, d4))) + { + // For array attributes, all elements must be overridden + return false; + } + else + { + // Standard conversion converts uint64_t to attribute + // type + o_4dArray[d1][d2][d3][d4] = l_val; + } + } + } + } + } + + return true; +} + +/** + * @brief This template function gets a non-array attribute from an + * AttributeTank + * + * @param[in] i_attrId Attribute ID + * @param[in] i_pTarget Pointer to Target the attribute is for (NULL if system) + * @param[in] i_tank Reference to AttributeTank + * @param[out] o_val Reference to variable where attribute will be copied to + * @return bool True if override was returned + */ +template +bool getAttributeT(const fapi::AttributeId i_attrId, + const fapi::Target * const i_pTarget, + fapi::AttributeTank & i_tank, + T & o_val) +{ + uint64_t l_val = 0; + + if (!(i_tank.getAttribute(i_attrId, i_pTarget, l_val))) + { + return false; + } + + o_val = static_cast(l_val); + return true; +} + +/** + * @brief This template function sets a 1D array attribute into an AttributeTank + * + * @param[in] i_attrId Attribute ID + * @param[in] i_pTarget Pointer to Target the attribute is for (NULL if system) + * @param[in] i_tank Reference to AttributeTank + * @param[in] i_1dArray Reference to 1D array containing attribute + */ +template +void setAttributeT(const fapi::AttributeId i_attrId, + const fapi::Target * const i_pTarget, + fapi::AttributeTank & i_tank, + const T(&i_1dArray)[SZ1]) +{ + for (uint8_t d1 = 0; d1 < SZ1; d1++) + { + i_tank.setAttribute(i_attrId, i_pTarget, i_1dArray[d1], d1); + } +} + +/** + * @brief This template function sets a 2D array attribute into an AttributeTank + * + * @param[in] i_attrId Attribute ID + * @param[in] i_pTarget Pointer to Target the attribute is for (NULL if system) + * @param[in] i_tank Reference to AttributeTank + * @param[in] i_2dArray Reference to 2D array containing attribute + */ +template +void setAttributeT(const fapi::AttributeId i_attrId, + const fapi::Target * const i_pTarget, + fapi::AttributeTank & i_tank, + const T(&i_2dArray)[SZ1][SZ2]) +{ + for (uint8_t d1 = 0; d1 < SZ1; d1++) + { + for (uint8_t d2 = 0; d2 < SZ2; d2++) + { + i_tank.setAttribute(i_attrId, i_pTarget, i_2dArray[d1][d2], d1, d2); + } + } +} + +/** + * @brief This template function sets a 3D array attribute into an AttributeTank + * + * @param[in] i_attrId Attribute ID + * @param[in] i_pTarget Pointer to Target the attribute is for (NULL if system) + * @param[in] i_tank Reference to AttributeTank + * @param[in] i_3dArray Reference to 3D array containing attribute + */ +template +void setAttributeT(const fapi::AttributeId i_attrId, + const fapi::Target * const i_pTarget, + fapi::AttributeTank & i_tank, + const T(&i_3dArray)[SZ1][SZ2][SZ3]) +{ + for (uint8_t d1 = 0; d1 < SZ1; d1++) + { + for (uint8_t d2 = 0; d2 < SZ2; d2++) + { + for (uint8_t d3 = 0; d3 < SZ3; d3++) + { + i_tank.setAttribute(i_attrId, i_pTarget, i_3dArray[d1][d2][d3], + d1, d2, d3); + } + } + } +} + +/** + * @brief This template function sets a 4D array attribute into an AttributeTank + * + * @param[in] i_attrId Attribute ID + * @param[in] i_pTarget Pointer to Target the attribute is for (NULL if system) + * @param[in] i_tank Reference to AttributeTank + * @param[in] i_4dArray Reference to 4D array containing attribute + */ +template +void setAttributeT(const fapi::AttributeId i_attrId, + const fapi::Target * const i_pTarget, + fapi::AttributeTank & i_tank, + const T(&i_4dArray)[SZ1][SZ2][SZ3][SZ4]) +{ + for (uint8_t d1 = 0; d1 < SZ1; d1++) + { + for (uint8_t d2 = 0; d2 < SZ2; d2++) + { + for (uint8_t d3 = 0; d3 < SZ3; d3++) + { + for (uint8_t d4 = 0; d4 < SZ4; d4++) + { + i_tank.setAttribute(i_attrId, i_pTarget, + i_4dArray[d1][d2][d3][d4], d1, d2, d3, d4); + } + } + } + } +} + +/** + * @brief This template function sets a non-array attribute into an + * AttributeTank + * + * @param[in] i_attrId Attribute ID + * @param[in] i_pTarget Pointer to Target the attribute is for (NULL if system) + * @param[in] i_tank Reference to AttributeTank + * @param[in] i_val Reference to variable containing attribute + */ +template +void setAttributeT(const fapi::AttributeId i_attrId, + const fapi::Target * const i_pTarget, + fapi::AttributeTank & i_tank, + const T & i_val) +{ + i_tank.setAttribute(i_attrId, i_pTarget, i_val); +} + +} // namespace fapi + +#endif // FAPIATTRTANK_H_ diff --git a/src/include/usr/hwpf/hwp/fapiTestHwpAttr.H b/src/include/usr/hwpf/hwp/fapiTestHwpAttr.H index 1bb9481b6..ba28e440e 100755 --- a/src/include/usr/hwpf/hwp/fapiTestHwpAttr.H +++ b/src/include/usr/hwpf/hwp/fapiTestHwpAttr.H @@ -1,25 +1,25 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/usr/hwpf/hwp/fapiTestHwpAttr.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/hwpf/hwp/fapiTestHwpAttr.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* */ +/* 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 */ /** * @file fapiTestHwpAttr.H * @@ -48,9 +48,12 @@ extern "C" /** * @brief HWP that exercises attributes * + * @param[in] i_mbaTarget Reference to MBA chiplet target + * @param[in] i_procTarget Reference to processor chip target * @return ReturnCode */ -fapi::ReturnCode hwpTestAttributes(); +fapi::ReturnCode hwpTestAttributes(fapi::Target & i_mbaTarget, + fapi::Target & i_procTarget); } diff --git a/src/include/usr/hwpf/plat/fapiPlatAttrOverrideSync.H b/src/include/usr/hwpf/plat/fapiPlatAttrOverrideSync.H new file mode 100755 index 000000000..ab2a5ee3d --- /dev/null +++ b/src/include/usr/hwpf/plat/fapiPlatAttrOverrideSync.H @@ -0,0 +1,94 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/hwpf/plat/fapiPlatAttrOverrideSync.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012 */ +/* */ +/* 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 */ +/** + * @file fapiPlatAttrOverrdieSync.H + * + * @brief Defines the functions for Attribute Override and Sync + */ + +#ifndef FAPIPLATATTROVERRIDESYNC_H_ +#define FAPIPLATATTROVERRIDESYNC_H_ + +//****************************************************************************** +// Includes +//****************************************************************************** +#include +#include + +//****************************************************************************** +// Interface +//****************************************************************************** +namespace fapi +{ + +namespace attrOverrideSync +{ + +/** + * @brief Monitors for incoming messages from the FSP. This must be called + * by a task specifically started to monitor for these messages + */ +void monitorForFspMessages(); + +/** + * @brief Sends Attribute Overrides and Syncs to the FSP + * + * This is called at the end of an IStep. It: + * - Clears the FSP Attribute Overrides + * - Sends the Hostboot Attribute Overrides to the FSP + * - Sends the Hostboot Attribute Syncs to the FSP + */ +void sendAttrOverridesAndSyncsToFsp(); + +/** + * @brief This function returns the OverrideAttributeTank singleton. Other + * modules must call this rather than using Singleton<> + */ +AttributeTank & theOverrideAttrTank(); + +/** + * @brief This function returns the SyncAttributeTank singleton. Other + * modules must call this rather than using Singleton<> + */ +AttributeTank & theSyncAttrTank(); + +} // namespace attrOverrideSync + +} // namespace fapi + +/** + * @brief Macro that is called on a FAPI_ATTR_GET that returns any Attribute + * Override + */ +#define FAPI_PLAT_GET_ATTR_OVERRIDE(ID, PTARGET, VAL) \ + fapi::getAttributeT(ID, PTARGET, fapi::attrOverrideSync::theOverrideAttrTank(), VAL) + +/** + * @brief Macro that is called on a FAPI_ATTR_SET that clears any non-const + * Attribute Override and saves the Attribute to Sync + */ +#define FAPI_PLAT_ATTR_SET_ACTIONS(ID, PTARGET, VAL) \ + fapi::attrOverrideSync::theOverrideAttrTank().clearNonConstAttribute(ID, PTARGET), \ + fapi::setAttributeT(ID, PTARGET, fapi::attrOverrideSync::theSyncAttrTank(), VAL) + +#endif // FAPIPLATATTROVERRIDESYNC_H_ diff --git a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H index ec91f615d..bbd926656 100755 --- a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H +++ b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H @@ -23,8 +23,8 @@ /** * @file fapiPlatAttributeService.H * - * @brief Defines the PLAT attribute access macros and defines which macro - * handles each attribute. + * @brief Defines the PLAT attribute access macros and the functions that + * access attributes * * Note that platform code must provide the code. */ @@ -51,7 +51,8 @@ #include #include #include -#include +#include +#include #include #include #include @@ -201,260 +202,6 @@ fapi::ReturnCode fapiPlatGetFunctional(const fapi::Target * i_pTarget, fapi::ReturnCode fapiPlatGetTargetPos(const fapi::Target * i_pFapiTarget, uint32_t & o_pos); -/** - * @brief This wrapper function is called by the getAttrOverride function - * templates (which are called by FAPI_PLAT_GET_ATTR_OVERRIDE) to get an - * attribute override value - * - * This wrapper just invokes getAttrOverride on the AttributeOverrides singleton - * in the local (plat) module, it is needed because Singletons cannot be - * accessed outside of a module (this results in a duplicate singleton) - * - * @param[in] i_attrId Attribute ID - * @param[in] i_pTarget Pointer to Target (NULL if system) - * @param[out] o_overrideVal Reference to value filled in with the override - * @param[in] i_arrayD1 Array dimension 1 if applicable - * @param[in] i_arrayD2 Array dimension 2 if applicable - * @param[in] i_arrayD3 Array dimension 3 if applicable - * @param[in] i_arrayD4 Array dimension 4 if applicable - * @return bool True if override value was returned - */ -bool getOverrideWrap(const fapi::AttributeId i_attrId, - const fapi::Target * const i_pTarget, - uint64_t & o_overrideVal, - const uint8_t i_arrayD1 = ATTR_ARRAYD_NA, - const uint8_t i_arrayD2 = ATTR_ARRAYD_NA, - const uint8_t i_arrayD3 = ATTR_ARRAYD_NA, - const uint8_t i_arrayD4 = ATTR_ARRAYD_NA); - -/** - * @brief This wrapper function is called by - * FAPI_PLAT_CLEAR_NON_CONST_ATTR_OVERRIDE to clear a non-const attribute - * override. - * - * This wrapper just invokes clearNonConstOverride on the AttributeOverrides - * singleton in the local (plat) module, it is needed because Singletons cannot - * be accessed outside of a module (this results in a duplicate singleton) - * - * @param[in] i_attrId Attribute ID - * @param[in] i_pTarget Pointer to Target (NULL if system) - */ -void clearNonConstOverrideWrap(const fapi::AttributeId i_attrId, - const fapi::Target * const i_pTarget); - -/** - * @brief This wrapper function is called by HWP unit test to set an attribute - * override. It is not called by production code (outside of unit test, - * attribute overrides are set by the FSP or by a debug tool) - * - * This wrapper just invokes setOverride on the AttributeOverrides singleton in - * the local (plat) module, it is needed because Singletons cannot be accessed - * outside of a module (this results in a duplicate singleton) - * - * @param[in] i_override Reference to override - */ -void setOverrideWrap(const AttributeOverride & i_override); - -/** - * @brief This wrapper function is called by HWP unit test to clear all - * attribute overrides. It is not called by production code (outside of - * unit test, attribute overrides are cleared by the FSP or by a debug - * tool) - * - * This wrapper just invokes clearOverrides on the AttributeOverrides singleton - * in the local (plat) module, it is needed because Singletons cannot be - * accessed outside of a module (this results in a duplicate singleton) - */ -void clearOverridesWrap(); - -/** - * @brief This wrapper function is called by HWP unit test to test if any - * attribute overrides exist. It is not called by production code. - * - * This wrapper just invokes overridesExist on the AttributeOverrides singleton - * in the local (plat) module, it is needed because Singletons cannot be - * accessed outside of a module (this results in a duplicate singleton) - */ -bool overridesExistWrap(); - -/** - * @brief This function template is called by the FAPI_PLAT_GET_ATTR_OVERRIDE - * macro to get any override for a 1D array attribute - * - * @param[in] i_attrId Attribute ID - * @param[in] i_pTarget Pointer to Target (NULL if system) - * @param[out] o_1dArray Reference to 1D array where override will be copied to - * @return bool True if override was returned - */ -template -bool getOverrideT(const fapi::AttributeId i_attrId, - const fapi::Target * const i_pTarget, - T(&o_1dArray)[SZ1]) -{ - uint64_t l_overrideVal = 0; - - for (uint8_t d1 = 0; d1 < SZ1; d1++) - { - if (!(getOverrideWrap(i_attrId, i_pTarget, l_overrideVal, d1))) - { - // For array attributes, all elements must be overridden - return false; - } - else - { - // Standard conversion converts uint64_t to attribute type - o_1dArray[d1] = l_overrideVal; - } - } - - return true; -} - -/** - * @brief This function template is called by the FAPI_PLAT_GET_ATTR_OVERRIDE - * macro to get any override for a 2D array attribute - * - * @param[in] i_attrId Attribute ID - * @param[in] i_pTarget Pointer to Target (NULL if system) - * @param[out] o_2dArray Reference to 2D array where override will be copied to - * @return bool True if override was returned - */ -template -bool getOverrideT(const fapi::AttributeId i_attrId, - const fapi::Target * const i_pTarget, - T(&o_2dArray)[SZ1][SZ2]) -{ - uint64_t l_overrideVal = 0; - - for (uint8_t d1 = 0; d1 < SZ1; d1++) - { - for (uint8_t d2 = 0; d2 < SZ2; d2++) - { - if (!(getOverrideWrap(i_attrId, i_pTarget, l_overrideVal, d1, d2))) - { - // For array attributes, all elements must be overridden - return false; - } - else - { - // Standard conversion converts uint64_t to attribute type - o_2dArray[d1][d2] = l_overrideVal; - } - } - } - - return true; -} - -/** - * @brief This function template is called by the FAPI_PLAT_GET_ATTR_OVERRIDE - * macro to get any override for a 3D array attribute - * - * @param[in] i_attrId Attribute ID - * @param[in] i_pTarget Pointer to Target (NULL if system) - * @param[out] o_3dArray Reference to 3D array where override will be copied to - * @return bool True if override was returned - */ -template -bool getOverrideT(const fapi::AttributeId i_attrId, - const fapi::Target * const i_pTarget, - T(&o_3dArray)[SZ1][SZ2][SZ3]) -{ - uint64_t l_overrideVal = 0; - - for (uint8_t d1 = 0; d1 < SZ1; d1++) - { - for (uint8_t d2 = 0; d2 < SZ2; d2++) - { - for (uint8_t d3 = 0; d3 < SZ3; d3++) - { - if (!(getOverrideWrap(i_attrId, i_pTarget, l_overrideVal, d1, - d2, d3))) - { - // For array attributes, all elements must be overridden - return false; - } - else - { - // Standard conversion converts uint64_t to attribute type - o_3dArray[d1][d2][d3] = l_overrideVal; - } - } - } - } - - return true; -} - -/** - * @brief This function template is called by the FAPI_PLAT_GET_ATTR_OVERRIDE - * macro to get any override for a 4D array attribute - * - * @param[in] i_attrId Attribute ID - * @param[in] i_pTarget Pointer to Target (NULL if system) - * @param[out] o_4dArray Reference to 4D array where override will be copied to - * @return bool True if override was returned - */ -template -bool getOverrideT(const fapi::AttributeId i_attrId, - const fapi::Target * const i_pTarget, - T(&o_4dArray)[SZ1][SZ2][SZ3][SZ4]) -{ - uint64_t l_overrideVal = 0; - - for (uint8_t d1 = 0; d1 < SZ1; d1++) - { - for (uint8_t d2 = 0; d2 < SZ2; d2++) - { - for (uint8_t d3 = 0; d3 < SZ3; d3++) - { - for (uint8_t d4 = 0; d4 < SZ4; d4++) - { - if (!(getOverrideWrap(i_attrId, i_pTarget, l_overrideVal, - d1, d2, d3, d4))) - { - // For array attributes, all elements must be overridden - return false; - } - else - { - // Standard conversion converts uint64_t to attribute - // type - o_4dArray[d1][d2][d3][d4] = l_overrideVal; - } - } - } - } - } - - return true; -} - -/** - * @brief This function template is called by the FAPI_PLAT_GET_ATTR_OVERRIDE - * macro to get any override for a non-array attribute - * - * @param[in] i_attrId Attribute ID - * @param[in] i_pTarget Pointer to Target (NULL if system) - * @param[out] o_val Reference to variable where override will be copied to - * @return bool True if override was returned - */ -template -bool getOverrideT(const fapi::AttributeId i_attrId, - const fapi::Target * const i_pTarget, - T & o_val) -{ - uint64_t l_overrideVal = 0; - - if (!(getOverrideWrap(i_attrId, i_pTarget, l_overrideVal))) - { - return false; - } - - o_val = static_cast(l_overrideVal); - return true; -} - //------------------------------------------------------------------------------ // Prototypes to support proc_setup_bars_memory_attributes // See proc_setup_bars_memory_attributes.xml for detailed descriptions @@ -655,18 +402,6 @@ fapi::ReturnCode fapiPlatGetProcPcieBarSize ( } // namespace fapi -/** - * @brief Macro that returns any attribute override - */ -#define FAPI_PLAT_GET_ATTR_OVERRIDE(ID, PTARGET, VAL) \ - fapi::platAttrSvc::getOverrideT(ID, PTARGET, VAL) - -/** - * @brief Macro that clears any non-const attribute override - */ -#define FAPI_PLAT_CLEAR_NON_CONST_ATTR_OVERRIDE(ID, PTARGET) \ - fapi::platAttrSvc::clearNonConstOverrideWrap(ID, PTARGET) - /** * @brief Macro which directly maps a FAPI request to get a platform * attribute to the equivalent host boot request diff --git a/src/include/usr/mbox/mbox_queues.H b/src/include/usr/mbox/mbox_queues.H index 0fba7ca30..65c5265d5 100644 --- a/src/include/usr/mbox/mbox_queues.H +++ b/src/include/usr/mbox/mbox_queues.H @@ -40,23 +40,24 @@ namespace MBOX enum queue_id_t { NOT_FOUND = 0, - HB_MAILBOX_MSGQ, - HB_ISTEP_MSGQ, - HB_ATTR_SYNC_MSGQ, - HB_ERROR_MSGQ, + HB_MAILBOX_MSGQ = 1, + HB_ISTEP_MSGQ = 2, + HB_ATTR_SYNC_MSGQ = 3, + HB_ERROR_MSGQ = 4, + HB_HWPF_ATTR_MSGQ = 5, // HWPF Attribute override/sync // Add HB services here: HB_TEST_MSGQ = 0x7FFFFFFF, // FSP mailboxes FSP_FIRST_MSGQ = 0x80000000, - FSP_MAILBOX_MSGQ, - FSP_PROGRESS_CODES_MSGQ, - FSP_TRACE_MSGQ, + FSP_MAILBOX_MSGQ = 0x80000001, + FSP_PROGRESS_CODES_MSGQ = 0x80000002, + FSP_TRACE_MSGQ = 0x80000003, FSP_ERROR_MSGQ = 0x80000004, - IPL_SERVICE_QUEUE = 0x80000008, // Defined by Fsp team + IPL_SERVICE_QUEUE = 0x80000008, // Defined by Fsp team FSP_ATTR_SYNC_MSGQ = 0x80000009, - + FSP_HWPF_ATTR_MSGQ = 0x8000000a, // HWPF Attribute override/sync // Add FSP services here: FSP_ECHO_MSGQ = 0xFFFFFFFF, // Fake FSP for test }; -- cgit v1.2.1