From f38ca7d5412ba8fb077403d043889a64ff97cff9 Mon Sep 17 00:00:00 2001 From: Roland Veloz Date: Tue, 28 May 2019 17:47:56 -0500 Subject: Added new GenericFspMboxMessage_t interface to save NVDIMM keys * Added struct AttributeSetter_t to be sent as a GenericFspMboxMessage_t message via a firmware request. * Created 'sendAttributes(const vector&)' to pack the attribute data into the message to be sent. * Moved AttributeTank::Attribute from the private area to the public area so it can be used outside of class AttributeTank. * Added more documentation on how the process of adding and creating messages is done. Change-Id: Id592b6460a6f1f12a75c01b5a131bcf492480d8b RTC:208343 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/77951 Reviewed-by: Nicholas E. Bofferding Reviewed-by: Matthew Raybuck Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: FSP CI Jenkins Tested-by: Jenkins OP HW Reviewed-by: Daniel M. Crowell --- src/include/usr/mbox/mbox_queues.H | 2 ++ src/include/usr/runtime/runtime_reasoncodes.H | 4 ++- src/include/usr/targeting/common/attributeTank.H | 46 ++++++++++++------------ 3 files changed, 28 insertions(+), 24 deletions(-) (limited to 'src/include/usr') diff --git a/src/include/usr/mbox/mbox_queues.H b/src/include/usr/mbox/mbox_queues.H index aa2b9a4a8..19c5eeabc 100644 --- a/src/include/usr/mbox/mbox_queues.H +++ b/src/include/usr/mbox/mbox_queues.H @@ -82,6 +82,8 @@ namespace MBOX FSP_TARG_DECONFIG_MSGQ = 0x80000010, FSP_SCOM_OPS_MSGQ = 0x80000011, FSP_OCC_MSGQ_ID = 0x80000012, + FSP_NVDIMM_KEYS_MSGQ_ID = 0x80000013, // Attribute write request, equivalent + // to HWSV's ATTR_WRITE_OP_QUEUE_ID FSP_LID_MSGQ = FSP_ATTR_SYNC_MSGQ, diff --git a/src/include/usr/runtime/runtime_reasoncodes.H b/src/include/usr/runtime/runtime_reasoncodes.H index 6b77d621a..735a4ec6c 100644 --- a/src/include/usr/runtime/runtime_reasoncodes.H +++ b/src/include/usr/runtime/runtime_reasoncodes.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2018 */ +/* Contributors Listed Below - COPYRIGHT 2012,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -66,6 +66,7 @@ namespace RUNTIME MOD_CHECK_HB_RES_MEM_LIMIT = 0x26, /**< populate_hbruntime.C */ MOD_INIT_RT_RES_MEM_TRACE_BUF = 0x27, /**< rt_rsvdtracebuffer.C */ MOD_OPEN_UNTRUSTED_SP_AREAS = 0x28, /**< populate_hbruntime.C */ + MOD_SEND_ATTRIBUTES_TO_FSP = 0x29, /**< hbrt_utilities.H */ }; enum RuntimeReasonCode @@ -139,6 +140,7 @@ namespace RUNTIME RC_SP_ATTN_AREA_OVERFLOW = RUNTIME_COMP_ID | 0x42, RC_SP_ATTN_AREA1_SIZE_OVERFLOW = RUNTIME_COMP_ID | 0x43, RC_UNKNOWN_LABEL = RUNTIME_COMP_ID | 0x44, + RC_NULL_FIRMWARE_MSG_PTR = RUNTIME_COMP_ID | 0x45, }; enum UserDetailsTypes diff --git a/src/include/usr/targeting/common/attributeTank.H b/src/include/usr/targeting/common/attributeTank.H index a3f9afeab..ccb568889 100644 --- a/src/include/usr/targeting/common/attributeTank.H +++ b/src/include/usr/targeting/common/attributeTank.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2013,2017 */ +/* Contributors Listed Below - COPYRIGHT 2013,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -145,6 +145,28 @@ namespace AttributeTank }; #ifndef STANDALONE_COMPILE + /** + * @struct Attribute + * + * This structure defines a single attribute. + */ + struct Attribute + { + /** + * @brief Constructor + */ + Attribute(); + + /** + * @brief Destructor. Frees memory + */ + ~Attribute(); + + // Public data + AttributeHeader iv_hdr; + uint8_t * iv_pVal; // Pointer to attribute value + }; + /** * @struct AttributeSerializedChunk * @@ -397,28 +419,6 @@ private: AttributeTank(const AttributeTank & i_right); AttributeTank & operator=(const AttributeTank & i_right); - /** - * @struct Attribute - * - * This structure defines a single attribute. - */ - struct Attribute - { - /** - * @brief Constructor - */ - Attribute(); - - /** - * @brief Destructor. Frees memory - */ - ~Attribute(); - - // Public data - AttributeHeader iv_hdr; - uint8_t * iv_pVal; // Pointer to attribute value - }; - // The attributes // Note: A possible performance boost could be to store the elements in a // map, the key could be a sub-structure. -- cgit v1.2.3