diff options
author | Dan Crowell <dcrowell@us.ibm.com> | 2015-02-11 11:04:51 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2015-02-18 15:06:42 -0600 |
commit | 79ea7abf6d31c146c680d39b9f3ae007e434a573 (patch) | |
tree | 359506a770bde98bb88930c71723b17371ec5937 /src/usr/pnor | |
parent | 84023756531d9c48d2e4939326f4048f2dadbe28 (diff) | |
download | talos-hostboot-79ea7abf6d31c146c680d39b9f3ae007e434a573.tar.gz talos-hostboot-79ea7abf6d31c146c680d39b9f3ae007e434a573.zip |
New interfaces to get FSI and PNOR info for Xstop code
Added new external interfaces to retrieve information
about the FSI topology and the PNOR characteristics
in order to enable the checkstop analysis code that
runs on the OCC.
RTC: 108820
Change-Id: Ibbe9bca8eee4c8ac86006b1ad881bd8b2c3b8280
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/15726
Tested-by: Jenkins Server
Reviewed-by: Zane Shelley <zshelle@us.ibm.com>
Reviewed-by: William H. Schwartz <whs@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/pnor')
-rw-r--r-- | src/usr/pnor/pnordd.C | 33 | ||||
-rw-r--r-- | src/usr/pnor/pnordd.H | 16 | ||||
-rw-r--r-- | src/usr/pnor/sfcdd.H | 11 |
3 files changed, 58 insertions, 2 deletions
diff --git a/src/usr/pnor/pnordd.C b/src/usr/pnor/pnordd.C index 0d4789869..13667ce3a 100644 --- a/src/usr/pnor/pnordd.C +++ b/src/usr/pnor/pnordd.C @@ -191,6 +191,19 @@ bool usingL3Cache() return Singleton<PnorDD>::instance().usingL3Cache(); } +/** + * @brief Retrieve some information about the PNOR/SFC hardware + */ +void getPnorInfo( PnorInfo_t& o_pnorInfo ) +{ + o_pnorInfo.mmioOffset = 0; //LPC_SFC_MMIO_OFFSET;//@fixme-need Prachi's code for this + o_pnorInfo.norWorkarounds = + Singleton<PnorDD>::instance().getNorWorkarounds(); + o_pnorInfo.flashSize = + Singleton<PnorDD>::instance().getNorSize(); +} + + // Register PNORDD access functions to DD framework DEVICE_REGISTER_ROUTE(DeviceFW::READ, @@ -865,3 +878,23 @@ errlHndl_t PnorDD::_eraseFlash( uint32_t i_addr ) return l_err; } + +/** + * @brief Retrieve bitstring of NOR workarounds + */ +uint32_t PnorDD::getNorWorkarounds( void ) +{ + return iv_sfc->getNorWorkarounds(); +} + +/** + * @brief Retrieve size of NOR flash + */ +uint32_t PnorDD::getNorSize( void ) +{ +#ifdef CONFIG_PNOR_IS_32MB + return (32*MEGABYTE); +#else //default to 64MB + return (64*MEGABYTE); +#endif +} diff --git a/src/usr/pnor/pnordd.H b/src/usr/pnor/pnordd.H index 589f60e27..94c393b76 100644 --- a/src/usr/pnor/pnordd.H +++ b/src/usr/pnor/pnordd.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2011,2014 */ +/* Contributors Listed Below - COPYRIGHT 2011,2015 */ /* [+] Google Inc. */ /* [+] International Business Machines Corp. */ /* */ @@ -82,6 +82,19 @@ class PnorDD bool usingL3Cache( ); + /** + * @brief Retrieve bitstring of NOR workarounds + * @return NOR workarounds (see VendorWorkarounds in norflash.H) + */ + uint32_t getNorWorkarounds( void ); + + /** + * @brief Retrieve size of NOR flash + * @return Size of PNOR in bytes + */ + uint32_t getNorSize( void ); + + // Enumeration values must match those in debug framework. enum PnorMode_t { MODEL_UNKNOWN, /**< Invalid */ @@ -340,6 +353,7 @@ class PnorDD */ errlHndl_t _eraseFlash( uint32_t i_address ); + private: // Variables /** diff --git a/src/usr/pnor/sfcdd.H b/src/usr/pnor/sfcdd.H index 7c27a1e00..72285f5e0 100644 --- a/src/usr/pnor/sfcdd.H +++ b/src/usr/pnor/sfcdd.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014 */ +/* Contributors Listed Below - COPYRIGHT 2014,2015 */ /* [+] Google Inc. */ /* [+] International Business Machines Corp. */ /* */ @@ -149,6 +149,15 @@ class SfcDD }; /** + * @brief Retrieve bitstring of NOR workarounds + * @return NOR workarounds (see VendorWorkarounds in norflash.H) + */ + uint32_t getNorWorkarounds( void ) + { + return iv_flashWorkarounds; + }; + + /** * @brief Destructor */ virtual ~SfcDD(); |