diff options
author | Dan Crowell <dcrowell@us.ibm.com> | 2011-09-27 09:51:50 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2011-10-14 13:33:32 -0500 |
commit | d6ce3b30395982623494ad75c50e75c56fadcaca (patch) | |
tree | 82a38e66e28e7f824f597875f994c6b60efa6281 /src/include/usr | |
parent | 17f630f5c2fabea998708dc2b2cb33120c388079 (diff) | |
download | blackbird-hostboot-d6ce3b30395982623494ad75c50e75c56fadcaca.tar.gz blackbird-hostboot-d6ce3b30395982623494ad75c50e75c56fadcaca.zip |
Pull FSI data from real attributes (Task 3909).
There are a group of attributes defined for FSI now.
-ATTR_FSI_MASTER_CHIP
-ATTR_FSI_MASTER_TYPE
-ATTR_FSI_MASTER_PORT
-ATTR_FSI_SLAVE_CASCADE
-ATTR_FSI_OPTION_FLAGS
Also includes work for Story 3996. The attributes are now broken
into 3 distinct pieces:
- attribute_types.xml : defines hostboot attributes
- target_types.xml : defines different types of targets
- XXX.system.xml : system-specific information, equivalent to what
we'll get from system workbook
These are then used to generic system-specific binaries, currently
for 3 platforms:
- simics_SALERNO_targeting.bin
- simics_VENICE_targeting.bin
- vbu_targeting.bin
Change-Id: I2bf920cc62cceb761ab44a07df433da44249d0e0
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/426
Tested-by: Jenkins Server
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr')
-rw-r--r-- | src/include/usr/devicefw/devfwreasoncodes.H | 1 | ||||
-rw-r--r-- | src/include/usr/devicefw/driverif.H | 1 | ||||
-rw-r--r-- | src/include/usr/devicefw/userif.H | 6 | ||||
-rw-r--r-- | src/include/usr/fsi/fsi_reasoncodes.H | 8 | ||||
-rw-r--r-- | src/include/usr/fsi/fsiif.H | 46 | ||||
-rw-r--r-- | src/include/usr/pnor/pnor_reasoncodes.H | 3 | ||||
-rw-r--r-- | src/include/usr/targeting/entitypath.H | 16 |
7 files changed, 50 insertions, 31 deletions
diff --git a/src/include/usr/devicefw/devfwreasoncodes.H b/src/include/usr/devicefw/devfwreasoncodes.H index 29cfce28e..2f471eeb5 100644 --- a/src/include/usr/devicefw/devfwreasoncodes.H +++ b/src/include/usr/devicefw/devfwreasoncodes.H @@ -36,6 +36,7 @@ namespace DeviceFW { DEVFW_RC_INVALID_REGISTRATION = DEVFW_COMP_ID | 0x01, DEVFW_RC_NO_ROUTE_FOUND = DEVFW_COMP_ID | 0x02, + DEVFW_RC_NULL_TARGET = DEVFW_COMP_ID | 0x03, }; }; diff --git a/src/include/usr/devicefw/driverif.H b/src/include/usr/devicefw/driverif.H index dd8cd8ae8..4b721cb63 100644 --- a/src/include/usr/devicefw/driverif.H +++ b/src/include/usr/devicefw/driverif.H @@ -83,6 +83,7 @@ namespace DeviceFW #define DEVICE_I2C_ADDRESS( i_address )\ DeviceFW::I2C, static_cast<uint64_t>(( i_address )) + /** @class InvalidParameterType * @brief Unused type to cause compiler fails for invalid template types. * diff --git a/src/include/usr/devicefw/userif.H b/src/include/usr/devicefw/userif.H index 0e9955898..836e468ca 100644 --- a/src/include/usr/devicefw/userif.H +++ b/src/include/usr/devicefw/userif.H @@ -79,6 +79,12 @@ namespace DeviceFW #define DEVICE_PNOR_ADDRESS( i_chip, i_addr ) \ DeviceFW::PNOR, ((static_cast<uint64_t>(i_chip)<<32)|static_cast<uint64_t>(i_addr)) + /** Construct the device addressing parameters for FSI device ops. + * @param[in] i_address - FSI address to operate on. + */ + #define DEVICE_FSI_ADDRESS(i_address) \ + DeviceFW::FSI, static_cast<uint64_t>((i_address)) + /** * @brief Perform a hardware read operation. diff --git a/src/include/usr/fsi/fsi_reasoncodes.H b/src/include/usr/fsi/fsi_reasoncodes.H index 24442062e..80539c691 100644 --- a/src/include/usr/fsi/fsi_reasoncodes.H +++ b/src/include/usr/fsi/fsi_reasoncodes.H @@ -34,10 +34,9 @@ namespace FSI MOD_FSIDD_READ = 0x02, /**< fsidd.C : FsiDD::read */ MOD_FSIDD_VERIFYADDRESSRANGE = 0x03, /**< fsidd.C : FsiDD::verifyAddressRange */ MOD_FSIDD_HANDLEOPBERRORS = 0x04, /**< fsidd.C : FsiDD::handleOpbErrors */ - MOD_FSIDD_DDREAD = 0x05, /**< fsidd.C : ddRead */ - MOD_FSIDD_DDWRITE = 0x06, /**< fsidd.C : ddWrite */ + MOD_FSIDD_DDOP = 0x05, /**< fsidd.C : ddOp */ + MOD_FSIDD_POLLFORCOMPLETE = 0x06, /**< fsidd.C : FsiDD::pollForComplete */ MOD_FSIDD_INITPORT = 0x07, /**< fsidd.C : FsiDD::initPort */ - MOD_FSIDD_POLLFORCOMPLETE = 0x08, /**< fsidd.C : FsiDD::pollForComplete */ }; enum FSIReasonCode @@ -49,6 +48,9 @@ namespace FSI RC_INVALID_TARGET = FSI_COMP_ID | 0x05, RC_OPB_NO_READ_VALID = FSI_COMP_ID | 0x06, RC_ERROR_ENABLING_SLAVE = FSI_COMP_ID | 0x07, + RC_INVALID_OPERATION = FSI_COMP_ID | 0x08, + RC_NULL_TARGET = FSI_COMP_ID | 0x09, + RC_MASTER_TARGET = FSI_COMP_ID | 0x0A, }; }; diff --git a/src/include/usr/fsi/fsiif.H b/src/include/usr/fsi/fsiif.H index 3c366fd9d..183267249 100644 --- a/src/include/usr/fsi/fsiif.H +++ b/src/include/usr/fsi/fsiif.H @@ -32,41 +32,33 @@ namespace FSI { /** - * Master or Cascaded Master + * @brief Initialize the FSI hardware + * + * @return errlHndl_t NULL on success */ -enum MasterType { - MFSI_TYPE = 0, - CMFSI_TYPE = 1, - NO_MASTER = 2 -}; +errlHndl_t initializeHardware(); -//@todo - move this into attributes /** - * @brief Structure which defines info necessary to access a chip via FSI - * - * Structure which defines info necessary for FSI access. Only applicable - * for chip targets. Structure is read-only. Each chip will have 2 copies - * of this data, depending on which chip we boot from. + * FSI Slave Registers for P8 + * These registers are repeated for every master+port+cascade combo */ -struct FsiChipInfo_t +enum SlaveRegistersP8 { - TARGETING::Target* master; ///< FSI Master @fixme - convert to EntityPath - MasterType type; ///< Master or Cascaded Master - uint8_t port; ///< Which port is this chip hanging off of - uint8_t cascade; ///< Slave cascade position - uint64_t attributes; ///< Reserved for any special flags we might need + // Local FSI Space + SLAVE_CFG_TABLE = 0x000000, /**< Configuration Table of CFAM */ + SLAVE_PEEK_TABLE = 0x000400, /**< Peek Table */ + + SLAVE_REGS = 0x000800, /**< FSI Slave Register */ + SLAVE_MODE_00 = SLAVE_REGS|0x00, + + FSI_SHIFT_ENGINE = 0x000C00, /**< FSI Shift Engine (SCAN) */ + FSI2PIB_ENGINE = 0x001000, /**< FSI2PIB Engine (SCOM) */ + FSI_SCRATCHPAD = 0x001400, /**< FSI Scratchpad */ + FSI_I2C_MASTER = 0x001800, /**< FSI I2C-Master */ + FSI_GEMINI_MBOX = 0x002800, /**< FSI Gemini Mailbox with FSI GPx Registers */ }; -/** - * @brief Initialize the FSI hardware - * - * @param[out] o_numPorts Number of FSI ports that were - * successfully initialized - * - * @return errlHndl_t NULL on success - */ -errlHndl_t initializeHardware( uint64_t& o_numPorts ); } diff --git a/src/include/usr/pnor/pnor_reasoncodes.H b/src/include/usr/pnor/pnor_reasoncodes.H index 3aa558821..d16c6d7f1 100644 --- a/src/include/usr/pnor/pnor_reasoncodes.H +++ b/src/include/usr/pnor/pnor_reasoncodes.H @@ -43,11 +43,12 @@ namespace PNOR enum PNORReasonCode { - RC_INVALID_MESSAGE = PNOR_COMP_ID | 0x01, + RC_INVALID_MESSAGE_TYPE = PNOR_COMP_ID | 0x01, RC_INVALID_ADDRESS = PNOR_COMP_ID | 0x02, RC_INVALID_SECTION = PNOR_COMP_ID | 0x03, RC_EXTERNAL_ERROR = PNOR_COMP_ID | 0x04, RC_STARTUP_FAIL = PNOR_COMP_ID | 0x05, + RC_INVALID_ASYNC_MESSAGE = PNOR_COMP_ID | 0x06, }; }; diff --git a/src/include/usr/targeting/entitypath.H b/src/include/usr/targeting/entitypath.H index 4efad5e1f..52d9dce35 100644 --- a/src/include/usr/targeting/entitypath.H +++ b/src/include/usr/targeting/entitypath.H @@ -305,6 +305,22 @@ class EntityPath uint32_t i_index) const; /** + * @brief Returns the first path element of the given type + * + * Returns the first occurrence of a path element that matches the + * selected type. Will return a PathElement with type=TYPE_NA if + * no match is found. + * + * @param[in] i_type Element type to return + * + * @pre N/A + * + * @return PathElement of the given type else invalid PathElement + */ + const PathElement pathElementOfType( + const TYPE i_type) const; + + /** * @brief Returns the number of path elements * * Returns the number of path elements for the entity path. |