diff options
author | Dean Sanner <dsanner@us.ibm.com> | 2015-02-19 14:26:02 -0600 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-03-30 13:54:41 -0400 |
commit | 10b4a480645ebe9ac9bf612afc1c0f1dd4309cdb (patch) | |
tree | d86e3918c1331d7b3e9470c84c64eb2c8ac26904 /src/include/usr/initservice | |
parent | c8f7434b35f7c309b549893ba5923875f58385bc (diff) | |
download | talos-hostboot-10b4a480645ebe9ac9bf612afc1c0f1dd4309cdb.tar.gz talos-hostboot-10b4a480645ebe9ac9bf612afc1c0f1dd4309cdb.zip |
BMC istep control
Change-Id: Ic334bfa82a47f9b754afc39a7d3f884a92f578c0
RTC: 118753
ForwardPort: yes
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/1350
Tested-by: Jenkins Server
Tested-by: FSP CI Jenkins
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr/initservice')
-rw-r--r-- | src/include/usr/initservice/bootconfigif.H | 70 | ||||
-rw-r--r-- | src/include/usr/initservice/mboxRegs.H | 4 |
2 files changed, 71 insertions, 3 deletions
diff --git a/src/include/usr/initservice/bootconfigif.H b/src/include/usr/initservice/bootconfigif.H index a255c1852..b69c0cb64 100644 --- a/src/include/usr/initservice/bootconfigif.H +++ b/src/include/usr/initservice/bootconfigif.H @@ -41,12 +41,78 @@ namespace BOOTCONFIG extern uint8_t CURRENT_CONFIG_VERSION; - typedef struct + /* Protocol to use + * Boot flags (SIO 0x29, or ATTR override) + * SIO bit 0 indicates istep mode when 0b1 + * Istep control (SIO 0x2a, CFAM 283B) + * bit 0 -- ready bit + * bit 1 -- go bit + * bit 2 -- running bit + * bit 3:7 -- key + * Istep major Number (SIO 0x2b, CFAM 283B) + * Istep minor Number (SIO 0x2c, CFAM 283B) + * Istep status from Hostboot (SIO 0x26, CFAM 283B) + * bit 0-7 -- return code after istep is done -- 0 is good + * Istep control response from Hostboot (SIO 0x27, CFAM 283B) + * bit 0 -- ready bit + * bit 1 -- go bit + * bit 2 -- running bit + * bit 3:7 -- key + * + * + * NOTE: when using the CFAM mechanism all communication is done in 283B + * and the byte fields correspond: + * byte 0: SIO 0x2a(read), 0x26 (write) + * byte 1: SIO 0x27 + * byte 2: SIO 0x2b + * byte 3: SIO 0x2c + *********************************************************************** + *Protocol definition -- it is a little odd since hostboot can't + *write the normal control register (0x2a) so 0x27 acts as hostboot's + *writable register + * + * 1) prior to powering on set the SIO registers into istep mode + *ipmitool -H <BMC IP> -I lan -U ADMIN -P admin raw 0x3a 0x06 0x01 + * 0x28 0x42 0x29 0x80 0x2d 0x40 + * 2) Power on + *ipmitool -H <BMC IP> -I lan -U admin -P admin chassis power on + * + * 3) Wait for Hostboot to turn on the ready bit and key -- SIO 0x27 + *bit 0 on, save away bits 3:7 + *ipmitool -H <BMC IP> -I lan -U ADMIN -P admin raw 0x3a 0x06 0x00 0x27 + * bit 0 -> ready + * bit 3:7 -> key + * + * 4) Start istep where 0x2b is major, 0x2c is minor and 0x2a is + *copy of 0x27 plus bit 1 is on. It is CRITICAL that go bit and key + *from 0x27 are set + *ipmitool -H <BMC IP> -I lan -U ADMIN -P admin raw 0x3a 0x06 0x01 + * 0x2b 0xMM 0x2c 0xmm 0x2a <0x40 | key> #6.2 + * + * 5) Hostboot will set the running bit (bit 2) in 0x27 and clear the + * ready/go/key bits. Poll until ready bit comes back on + * + *ipmitool -H <BMC IP> -I lan -U ADMIN -P admin raw 0x3a 0x06 0x00 0x27 0x26 + * 0x27:bit 2 -> indicates istep is running + * 0x27:bit 0 -> ready indicates done + * 0x27:bit 3:7 -> next key to use (valid if ready bit is on) + * 0x26:bit 0:7 -> status of last command (valid when ready bit is on + * and running bit is off) + * + * 6) Repeat + * + */ + + typedef struct istepCtl { uint8_t istepControl; + uint8_t istepStatus; uint8_t istepMajorNumber; uint8_t istepMinorNumber; + // init struct to 0 + istepCtl() :istepControl(0), istepStatus(0), + istepMajorNumber(0), istepMinorNumber(0) {}; }istepControl_t; // This function will call the actual config class created, or the base @@ -59,7 +125,7 @@ namespace BOOTCONFIG // Calls the actual subclass or base class if no config class has been // created - errlHndl_t writeIstepControl( BOOTCONFIG::istepControl_t & i_info ); + errlHndl_t writeIstepControl( BOOTCONFIG::istepControl_t i_info ); }; };// end namespace diff --git a/src/include/usr/initservice/mboxRegs.H b/src/include/usr/initservice/mboxRegs.H index cabb4f050..da8bcdf53 100644 --- a/src/include/usr/initservice/mboxRegs.H +++ b/src/include/usr/initservice/mboxRegs.H @@ -25,6 +25,8 @@ #ifndef MBOXREGS_H_ #define MBOXREGS_H_ +namespace INITSERVICE +{ namespace SPLESS { const uint32_t MBOX_SCRATCH_REG0 = 0x00050038; @@ -32,5 +34,5 @@ namespace SPLESS const uint32_t MBOX_SCRATCH_REG2 = 0x0005003a; const uint32_t MBOX_SCRATCH_REG3 = 0x0005003b; }; - +}; #endif |