diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/usr/devicefw/devfwreasoncodes.H | 2 | ||||
-rw-r--r-- | src/include/usr/devicefw/userif.H | 10 | ||||
-rw-r--r-- | src/include/usr/pnor/pnor_reasoncodes.H | 9 | ||||
-rw-r--r-- | src/include/usr/pnor/pnorif.H | 32 |
4 files changed, 31 insertions, 22 deletions
diff --git a/src/include/usr/devicefw/devfwreasoncodes.H b/src/include/usr/devicefw/devfwreasoncodes.H index 0f55f063d..16493ca5b 100644 --- a/src/include/usr/devicefw/devfwreasoncodes.H +++ b/src/include/usr/devicefw/devfwreasoncodes.H @@ -7,7 +7,7 @@ namespace DeviceFW { enum DevFwModuleId { - DEVFW_MOD_ASSOCIATOR = 0x00, + DEVFW_MOD_ASSOCIATOR = 0x01, }; enum DevFwReasonCode diff --git a/src/include/usr/devicefw/userif.H b/src/include/usr/devicefw/userif.H index c1bbd864b..6c261caab 100644 --- a/src/include/usr/devicefw/userif.H +++ b/src/include/usr/devicefw/userif.H @@ -42,13 +42,13 @@ namespace DeviceFW /** * Construct a PNOR DD address * address = 0000_0000_0000_000c_aaaa_aaaa_aaaa_aaaa - * c=side, a=address - * @param[in] chip Chip Select - * @param[in] addr Offset (from zero) into selected flash chip + * c=chip, a=address + * @param[in] i_chip Chip Select + * @param[in] i_addr Offset (from zero) into selected flash chip * @return 64-bit address to pass into PNOR device commands */ - #define DEVICE_PNOR_ADDRESS( chip, addr ) \ - DeviceFW::PNOR, ((static_cast<uint64_t>(chip)<<32)|static_cast<uint64_t>(addr)) + #define DEVICE_PNOR_ADDRESS( i_chip, i_addr ) \ + DeviceFW::PNOR, ((static_cast<uint64_t>(i_chip)<<32)|static_cast<uint64_t>(i_addr)) /** diff --git a/src/include/usr/pnor/pnor_reasoncodes.H b/src/include/usr/pnor/pnor_reasoncodes.H index 48ba21c00..0e7f002e4 100644 --- a/src/include/usr/pnor/pnor_reasoncodes.H +++ b/src/include/usr/pnor/pnor_reasoncodes.H @@ -7,12 +7,17 @@ namespace PNOR { enum PNORModuleId { - PNORRP_WAITFORMESSAGE = 0x01, + MOD_PNORRP_WAITFORMESSAGE = 0x01, /**< pnorrp.C : PnorRP::waitForMessage */ + MOD_PNORRP_COMPUTEDEVICEADDR = 0x02, /**< pnorrp.C : PnorRP::computeDeviceAddr */ + MOD_PNORRP_GETSECTIONINFO = 0x03, /**< pnorrp.C : PnorRP::getSectionInfo */ + MOD_PNORRP_COMPUTESECTION = 0x04, /**< pnorrp.C : PnorRP::computeSection */ }; enum PNORReasonCode { - INVALID_MESSAGE = PNOR_COMP_ID | 0x01, + RC_INVALID_MESSAGE = PNOR_COMP_ID | 0x01, + RC_INVALID_ADDRESS = PNOR_COMP_ID | 0x02, + RC_INVALID_SECTION = PNOR_COMP_ID | 0x03, }; }; diff --git a/src/include/usr/pnor/pnorif.H b/src/include/usr/pnor/pnorif.H index 1b551d8ee..49f4e7879 100644 --- a/src/include/usr/pnor/pnorif.H +++ b/src/include/usr/pnor/pnorif.H @@ -3,6 +3,7 @@ #include <stdint.h> #include <builtins.h> +#include <errl/errlentry.H> namespace PNOR { @@ -14,7 +15,7 @@ enum SectionId { TOC, /**< Table of Contents */ GLOBAL_DATA, /**< Global Data */ - SBE_IPL, /**< Self-Boot Enginer IPL image */ + SBE_IPL, /**< Self-Boot Engine IPL image */ HB_BASE_CODE, /**< Hostboot Base Image */ HB_DATA, /**< Hostboot Data */ HB_ERRLOGS, /**< Hostboot Error log Repository */ @@ -33,26 +34,29 @@ enum SectionId }; /** + * Select a side of flash to access + */ +enum SideSelect +{ + SIDE_A, /**< A-side of flash */ + SIDE_B, /**< B-side of flash */ + SIDELESS, /**< Sideless data */ +}; + +/** * Information about a section of PNOR */ struct SectionInfo_t { SectionId id; /**< Identifier for this section */ + SideSelect side; /**< Identifier for the side of flash */ const char* name; /**< Name of the section */ + uint64_t vaddr; /**< Virtual address for the start of the section */ uint64_t size; /**< Actual size of content in bytes */ bool eccProtected; /**< Section is ECC protected */ }; -/** - * Select a side of flash to access - */ -enum SideSelect -{ - SIDE_A = 0xA, /**< A-side of flash */ - SIDE_B = 0xB, /**< B-side of flash */ - SIDELESS = 0xF, /**< Sideless data */ -}; @@ -63,11 +67,11 @@ enum SideSelect * @param[in] i_side Side select * @param[out] o_info Location and size information * - * @return size_t Offset of section in bytes + * @return errlHndl_t Error log if request was invalid */ -void getSectionInfo( SectionId i_section, - SideSelect i_side, - SectionInfo_t& o_info ); +errlHndl_t getSectionInfo( SectionId i_section, + SideSelect i_side, + SectionInfo_t& o_info ); } |