commit | da2cf0d2b0f4cd56bc93575a435a5ee1c848f7b0 | [log] [tgz] |
---|---|---|
author | Avenash Asai Thambi <avenash.thambi@fii-usa.com> | Thu Aug 26 15:51:47 2021 -0500 |
committer | Avenash Asai Thambi <avenash.thambi@fii-usa.com> | Thu Nov 18 21:27:13 2021 +0000 |
tree | 43f519338e7178eb529f97405a248957d39a5897 | |
parent | 35c1ac40e476caa19c84a546d4f85ba96cb5dbbd [diff] |
Add boot count into motherboard eeprom and clear command The bmc boot count which was previously stored into the file /etc/conf/bios.cnt, is now stored into the motherboard FRU eeprom/sys/bus/i2c/devices/4-0050/eeprom starting from offset of 4 bytes from 0x1000. The reading and writing to the FRU eeprom is handled by using the helper functions. Added the new IPMI clear command which sets the eeprom to the default value of ff ff ff ff. Use of 4 bytes from 0x1000 location to check if the boot counter is at the max value or at the default value which server as a header to the boot count. All corner cases such as invalid command and invalid command length have been added Tested: ipmitool raw 0x34 0x71 0x00 - read current boot count. ipmitool raw 0x34 0x71 0x01 - increment the boot count by 1. ipmitool raw 0x34 0x71 0x02 - set the boot_count to all ff which is its default value of eeprom location where the boot count is stored. ipmitool raw 0x34 0x71 0x03 byte1 byte2 byte3 byte4 - set the boot count to desired value provided by the request parameter. Reboot,powercyle,flashing bmc - performed to see if the value retains. Signed-off-by: Avenash Asai Thambi <avenash.thambi@fii-usa.com> Change-Id: I99dd5e6ba1d943e558e984d948bd63552cd5278f
There are and will be a variety of sys specific commands.
The PCIe bifurcation command checks the type of pcei adapter instailled in each slot.
Request
Byte(s) | Value | Data |
---|---|---|
0x00 | 0x03 | Subcommand |
Response
Byte(s) | Value | Data |
---|---|---|
0x00 | 0x03 | Subcommand |
0x01 | 0x-- | Bifurcation each bit identified the slot support x16(1b) or x8(0b) |
0x02 | 0x-- | Present bit each bit identified PCIe adapter installed(0b) or not(1b) |
Example |# |Command |Example |--------|-------|---- |1|Read the information|ipmitool 0x34 0x03
This is a 32 bits register that provides bios pushs the boot counter to BMC, or get the boot counter from BMC.
Request |Byte(s) |Value|Description |--------|-----|---- |0x00|0x71|Subcommand |0x01|Op value|Operation to be performed |0x02-0x05|byte0 byte1 byte2 byte3|32-bit Count value for set operation
Op value | Operation to be performed |
---|---|
0x00 | Read boot count value |
0x01 | Increment boot count value |
0x02 | Clear boot count value |
0x03 | Set the boot count with given 4 byte value |
Response |Byte(s) |Value |Description |--------|-------|---- |0x00|CC|Completion code returned |0x01|--|Byte 0 of boot count |0x02|--|Byte 1 of boot count |0x03|--|Byte 2 of boot count |0x04|--|Byte 3 of boot count
Completion Codes (CC) |CC |Description |-----|-----------| |0xC1|Invalid Command |0x00|Command Success |0xC7|Data length Invalid
Example |# |Command |Example |--------|-------|---- |1|Read the boot count|ipmitool raw 0x34 0x71 0x00 |2|Increment the boot count by 1|ipmitool raw 0x34 0x71 0x01 |3|Clear the boot count to all 0's|ipmitool raw 0x34 0x71 0x02 |4|Set the boot count to given value|ipmitool raw 0x34 0x71 0x03 byte0 byte1 byte2 byte3