From e860d319c4e54ca061283fcd2342e4deb38c467d Mon Sep 17 00:00:00 2001 From: Brian Stegmiller Date: Mon, 22 Feb 2016 16:20:20 -0600 Subject: Support HB runtime data for adjunct partition Change-Id: I7249f2b195dd02a0ab5a88b53d63cc4a1663cf9d RTC: 138638 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/25373 Tested-by: Jenkins Server Tested-by: FSP CI Jenkins Reviewed-by: Elizabeth K. Liner Reviewed-by: Brian J. Stegmiller Reviewed-by: Daniel M. Crowell --- src/include/usr/runtime/runtime.H | 34 +++++++++++++++++++++++++++++----- src/include/usr/targeting/attrrp.H | 14 +++++++++++++- 2 files changed, 42 insertions(+), 6 deletions(-) (limited to 'src/include') diff --git a/src/include/usr/runtime/runtime.H b/src/include/usr/runtime/runtime.H index 73633cb00..286e649e5 100644 --- a/src/include/usr/runtime/runtime.H +++ b/src/include/usr/runtime/runtime.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2015 */ +/* Contributors Listed Below - COPYRIGHT 2012,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -61,6 +61,28 @@ errlHndl_t populate_node_attributes( uint64_t i_nodeNum ); */ errlHndl_t load_host_data( void ); +/** + * @brief Populate HB runtime data in mainstore + * + * @return errlHndl_t NULL on Success + */ +errlHndl_t populate_hbRuntimeData( void ); + +/** + * @brief Fills in HBRT for given NODE + * + * @param[in] iNodeId : Node number from 0 to 7 ..etc... + * + * @return errlHndl_t NULL on Success + */ +errlHndl_t populate_RtDataByNode(uint64_t iNodeId); + +// How many pointers/sections there are in HB runtime data +#define HBRT_NUM_PTRS 2 +// sections defined by above literal +#define HBRT_VPD_SECTION 0 +#define HBRT_ATTRIB_SECTION 1 + /** * HDAT Sections */ @@ -77,7 +99,9 @@ enum SectionId SPIRA_H, //< SPIRA-H SPIRA_L, //< Legacy SPIRA NACA, //< NACA - LAST_SECTION = NACA //< Placeholder for arrays + HBRT, //< Hostboot Runtime + HBRT_DATA, //< Hostboot Runtime Data + LAST_SECTION = HBRT_DATA //< Placeholder for arrays }; /** @@ -85,7 +109,7 @@ enum SectionId * the host data memory. * * @description The returned pointer will not include any header hdat header - * information. + * information. * * @param[in] i_section Chunk of data to find * @param[in] i_instance Instance of section when there are multiple entries @@ -101,7 +125,7 @@ errlHndl_t get_host_data_section( SectionId i_section, const size_t DATA_SIZE_UNKNOWN = 0xFFFFFFFFFFFFFFFF; /** - * @brief Store the actual count of a section in local memory. + * @brief Store the actual count of a section in local memory. * * @param[in] i_section Chunk of data to update * @param[in] i_count Actual number of entries @@ -145,4 +169,4 @@ void rediscover_hdat( void ); } -#endif +#endif diff --git a/src/include/usr/targeting/attrrp.H b/src/include/usr/targeting/attrrp.H index cdbb79319..99b9800ff 100644 --- a/src/include/usr/targeting/attrrp.H +++ b/src/include/usr/targeting/attrrp.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2016 */ +/* [+] 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. */ @@ -169,6 +171,16 @@ class AttrRP * @return Virtual address to the region. */ static void* save(uint64_t& io_addr); + + /** + * @brief Returns size needed to save all attributes + * + * HDAT requires up front knowledge of largest section + * + * + * @return Size of all attribute sections + */ + static uint64_t maxSize( ); #endif protected: -- cgit v1.2.3