#
e8929699 |
| 19-Aug-2024 |
Brandon Kim <brandonkim@google.com> |
bios_setting: Add a write handler
Tested: ``` // Test that it writes a new file if it doesn't exist ~# rm /run/oem_bios_setting
// Invalid command (no size / payload) ~# ipmitool raw 0x2e 0x32 0x79
bios_setting: Add a write handler
Tested: ``` // Test that it writes a new file if it doesn't exist ~# rm /run/oem_bios_setting
// Invalid command (no size / payload) ~# ipmitool raw 0x2e 0x32 0x79 0x2b 0x00 0x19 Unable to send RAW command (channel=0x0 netfn=0x2e lun=0x0 cmd=0x32 rsp=0xc7): Request data length invalid
// Invalid command (size doesn't match) ~# ipmitool raw 0x2e 0x32 0x79 0x2b 0x00 0x19 0x01 0x30 0x31 Unable to send RAW command (channel=0x0 netfn=0x2e lun=0x0 cmd=0x32 rsp=0xc7): Request data length invalid
// Command success ~# ipmitool raw 0x2e 0x32 0x79 0x2b 0x00 0x19 0x02 0x30 0x31 79 2b 00 19 02
// Read back ~# ipmitool raw 0x2e 0x32 0x79 0x2b 0x00 0x18 79 2b 00 18 02 30 31 ~# cat /run/oem_bios_setting 01~#
// Verify overwrite works (truncates the previous bytes) ~# ipmitool raw 0x2e 0x32 0x79 0x2b 0x00 0x19 0x01 0x33 79 2b 00 19 01 ~# cat /run/oem_bios_setting 3~# ~# ipmitool raw 0x2e 0x32 0x79 0x2b 0x00 0x18 79 2b 00 18 01 33 ```
Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id: I84db782da9b2f121c0a81a855692b5ca25ffda54
show more ...
|
#
93a4c0ab |
| 16-Aug-2024 |
Brandon Kim <brandonkim@google.com> |
bios_setting: Add a read handler
Tested: ``` ~# echo -n "01234567" > /run/oem_bios_setting ~# ipmitool raw 0x2e 0x32 0x79 0x2b 0x00 0x18 79 2b 00 18 08 30 31 32 33 34 35 36 37 ~# rm /run/oem_bios_s
bios_setting: Add a read handler
Tested: ``` ~# echo -n "01234567" > /run/oem_bios_setting ~# ipmitool raw 0x2e 0x32 0x79 0x2b 0x00 0x18 79 2b 00 18 08 30 31 32 33 34 35 36 37 ~# rm /run/oem_bios_setting ~# ipmitool raw 0x2e 0x32 0x79 0x2b 0x00 0x18 Unable to send RAW command (channel=0x0 netfn=0x2e lun=0x0 cmd=0x32 rsp=0xca): Cannot return number of requested data bytes ```
Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id: Icde2de4799a751634f56a580351bf10254dd7e4f
show more ...
|
#
11a5bb6b |
| 17-Jun-2024 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Fix spelling mistakes using codespell
This commit corrects various spelling mistakes throughout the repository. The corrections were made automatically using `codespell`[1] tool.
[1]: https://githu
Fix spelling mistakes using codespell
This commit corrects various spelling mistakes throughout the repository. The corrections were made automatically using `codespell`[1] tool.
[1]: https://github.com/codespell-project/codespell
Change-Id: Id21d7e92aa899635af034ff1ddeefabedd08660e Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
show more ...
|
#
559cb011 |
| 03-May-2024 |
Brandon Kim <brandonkim@google.com> |
bm_instance: Create a new handler
This OEM handler will get properties from tmpfs to serve over IPMI.
Tested: ~# cat /run/bm-instance/asset-tag 12345 ~# ipmitool raw 0x2e 0x32 0x79 0x2b 0x00 0x17 0
bm_instance: Create a new handler
This OEM handler will get properties from tmpfs to serve over IPMI.
Tested: ~# cat /run/bm-instance/asset-tag 12345 ~# ipmitool raw 0x2e 0x32 0x79 0x2b 0x00 0x17 0x00 79 2b 00 17 05 31 32 33 34 35 ... ... (Verified this works for all 7 sub commands)
Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id: I191b6f4994d91ada49a3332a8e93a3a305561904
show more ...
|
#
9846023c |
| 03-Mar-2024 |
Gaurav Gandhi <gauravgandhi@google.com> |
Update accel setting name from power_break to power_brake
Change-Id: I09465b488eac355c1e1ae847fe350a82e7ad4729 Signed-off-by: Gaurav Gandhi <gauravgandhi@google.com>
|
#
8ef49716 |
| 04-Feb-2024 |
Willy Tu <wltu@google.com> |
Reserve boot-time-monitor cmd on 18-20
The implementation is delayed and still work in progress. It is being used for testing internally and needs to be reserved to make sure it doesn't break later
Reserve boot-time-monitor cmd on 18-20
The implementation is delayed and still work in progress. It is being used for testing internally and needs to be reserved to make sure it doesn't break later on.
Change-Id: I7145fc9299e06b129d5a22381d520bbfad674499 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
#
d455bfd6 |
| 30-Jan-2024 |
Gaurav Gandhi <gauravgandhi@google.com> |
Add new oem command to set accel power mode
Signed-off-by: Gaurav Gandhi <gauravgandhi@google.com> Change-Id: Ie0b47477b7ae9e8ae206ac0645571a7a79dbda40
|
#
a92d0e6b |
| 29-Jun-2023 |
John Wedig <johnwedig@google.com> |
Add IPMI OEM command LinuxBootDone
Add a new OEM command for LinuxBoot to notify the BMC when it is about to kexec into the OS. This is intended to give the BMC a chance to prepare for an untrusted
Add IPMI OEM command LinuxBootDone
Add a new OEM command for LinuxBoot to notify the BMC when it is about to kexec into the OS. This is intended to give the BMC a chance to prepare for an untrusted OS, e.g. disable any interfaces it doesn't want the OS to have access to.
Tested: Exercised the new OEM command using ipmitool $ ipmitool raw 0x2e 0x32 0x79 0x2b 0x00 0x11 79 2b 00 11
Change-Id: Ica76d77cdde48cebfbced32d8e7e860b559074e8 Signed-off-by: John Wedig <johnwedig@google.com>
show more ...
|
#
b3af83db |
| 28-Mar-2023 |
Brandon Kim <brandonkim@google.com> |
Fix presubmit failures with "prettier"
Ran `prettier` on README.md after failing on unrelated presubmit failure.
Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id: Id36ad868538cdef5b4c24
Fix presubmit failures with "prettier"
Ran `prettier` on README.md after failing on unrelated presubmit failure.
Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id: Id36ad868538cdef5b4c24502d0aaa7395a2b02bd
show more ...
|
#
5e70dc8c |
| 15-Sep-2022 |
Nikhil Namjoshi <nikhilnamjoshi@google.com> |
Add ipmi OEM handler to get the BMC mode
The response can indicate one of the BMC mode below 0 -> Non Bare Metal Mode 1 -> Bare Metal Mode 2 -> Bare Metal Cleaning Mode
The Bare Metal Cleaning Mode
Add ipmi OEM handler to get the BMC mode
The response can indicate one of the BMC mode below 0 -> Non Bare Metal Mode 1 -> Bare Metal Mode 2 -> Bare Metal Cleaning Mode
The Bare Metal Cleaning Mode is not yet supported
Tested:
Response in BM Mode
ipmitool raw 0x2e 0x32 0x79 0x2b 0x00 0x10 79 2b 00 14 01
Response in Non-BM Mode
ipmitool raw 0x2e 0x32 0x79 0x2b 0x00 0x10 79 2b 00 14 00
Signed-off-by: Nikhil Namjoshi <nikhilnamjoshi@google.com> Change-Id: I34474fd04f9aed35bd71725805ed52a5df8ab8c9
show more ...
|
#
6c71b0f9 |
| 10-Oct-2021 |
Willy Tu <wltu@google.com> |
pcie_bifurcation: Fetch bifurcation at a PCIe slot with hardcoded values
This will read a json config and return the bifurcation based on that. It will read the configure file in a persistent file t
pcie_bifurcation: Fetch bifurcation at a PCIe slot with hardcoded values
This will read a json config and return the bifurcation based on that. It will read the configure file in a persistent file to see if it is valid machine config and return the bifurcation information accordingly.
For example, If it is valid config, it will return 8x8 for PE1,3,4,6.
Tested: Unit tests passed.
Physical Tests.
PE0 -> no bifurcation PE1 -> x8x8
``` $ ipmitool raw 0x2e 0x32 0x79 0x2b 0x00 0x0f 0 79 2b 00 0b 00
$ ipmitool raw 0x2e 0x32 0x79 0x2b 0x00 0x0f 1 79 2b 00 0b 02 08 08 ```
Change-Id: I44aefbfb26372f8bc0069343c8a6d07d3cf6f42d Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
#
4f0d1de6 |
| 20-Sep-2021 |
Steve Foreman <foremans@google.com> |
Add IPMI interface for CustomAccel service
Change-Id: I28a8976e382b457233ac521e9ab71f75abe029d1 Signed-off-by: Steve Foreman <foremans@google.com>
|
#
b69209b4 |
| 13-Jul-2021 |
William A. Kennington III <wak@google.com> |
eth: Support looking up alternate interace channels
This makes it possible to use the GetEthDevice command to look up interfaces other than the default NCSI interface.
Change-Id: I3a5563743a28b39ad
eth: Support looking up alternate interace channels
This makes it possible to use the GetEthDevice command to look up interfaces other than the default NCSI interface.
Change-Id: I3a5563743a28b39adc753d8957f68f0bc330cf3a Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
#
8cfa4c44 |
| 16-Jun-2021 |
linyuny <linyuny@google.com> |
Add new google ipmi sys command: SysHostPowerOff
New google ipmi sys command to let the BMC knows host shutdown, allow host to gracefully shutdown and disable the watchdog with given time delay.
Si
Add new google ipmi sys command: SysHostPowerOff
New google ipmi sys command to let the BMC knows host shutdown, allow host to gracefully shutdown and disable the watchdog with given time delay.
Signed-off-by: Yunyun Lin <linyuny@google.com> Change-Id: I02171c9cfed57ae5d10d66b515e4ab7ee8856466
show more ...
|
#
3b1b427c |
| 02-Mar-2021 |
Willy Tu <wltu@google.com> |
Add OEM command to request flash size
The BMC flash is `/dev/mtd0` and the size can found in `/sys/class/mtd/mtd0/size`. This OEM command will request that information with MTDINFO.
Tested: Success
Add OEM command to request flash size
The BMC flash is `/dev/mtd0` and the size can found in `/sys/class/mtd/mtd0/size`. This OEM command will request that information with MTDINFO.
Tested: Successfully requested the flash size information with ipmitool.
``` cat /sys/class/mtd/mtd0/size 67108864 ``` 67108864 / 1024 / 1024 = 64MB flash
``` ipmitool raw 0x2e 0x32 0x79 0x2b 0x00 0x09 79 2b 00 09 00 00 00 04 ``` Output in little endian. 0x04000000 -> 67108864
Change-Id: Iec1b33503d1166a42ceef4b8491e5c19c3a077fe Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
#
ac4a16f7 |
| 02-Feb-2021 |
Shounak Mitra <shounak@google.com> |
Add sys command for powercycle on host shutdown.
The new command will trigger a power cycle the next time the host shuts down. This can exist in parallel with the existing mechanism to trigger a pow
Add sys command for powercycle on host shutdown.
The new command will trigger a power cycle the next time the host shuts down. This can exist in parallel with the existing mechanism to trigger a power cycle after a specified time interval.
The implementation of host state detection and power cycling is platfrom specific; the new command will just add a temporary file that marks the system ready to powercycle on the next shutdown. Usually, a systemd unit would be enabled by the presence of this file to handle the power cycling process.
Signed-off-by: Shounak Mitra <shounak@google.com> Change-Id: I0cc40307748fb996be3f6062d8cba1a4b5049683
show more ...
|
#
29f35bce |
| 04-Nov-2020 |
William A. Kennington III <wak@google.com> |
Add suppport for retrieving machine name
This adds support for reading /etc/os-release, parsing out OPENBMC_TARGET_MACHINE and returning this to the caller.
Change-Id: If2a419b9a77597686f5137efce97
Add suppport for retrieving machine name
This adds support for reading /etc/os-release, parsing out OPENBMC_TARGET_MACHINE and returning this to the caller.
Change-Id: If2a419b9a77597686f5137efce97b1150142f181 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
#
a289fa2e |
| 15-Feb-2019 |
Jaghathiswari Rankappagounder Natarajan <jaghu@google.com> |
Add support for some more entity types
We support an OEM command so that the system can query the BMC for an Entity name given the Entity ID and Entity Instance. This patch adds support for some mor
Add support for some more entity types
We support an OEM command so that the system can query the BMC for an Entity name given the Entity ID and Entity Instance. This patch adds support for some more entity types.
Change-Id: Id8b8019122044e11f195184ad8c5612dd60f044c Signed-off-by: Jaghathiswari Rankappagounder Natarajan <jaghu@google.com>
show more ...
|
#
fd0f1cf9 |
| 18-Jan-2019 |
Jaghathiswari Rankappagounder Natarajan <jaghu@google.com> |
google-ipmi-sys: Add "Entity Id:Entity Instance" mapping to Entity name
Say the system has a JSON file like : { "cpu": [ {"instance": 1, "name": "CPU0"}, {"instance": 2, "name":
google-ipmi-sys: Add "Entity Id:Entity Instance" mapping to Entity name
Say the system has a JSON file like : { "cpu": [ {"instance": 1, "name": "CPU0"}, {"instance": 2, "name": "CPU1"} ], "memory_module": [ {"instance": 1, "name": "DIMM_A1"}, {"instance": 2, "name": "DIMM_A2"}, {"instance": 3, "name": "DIMM_B1"}, {"instance": 4, "name": "DIMM_B2"}, {"instance": 5, "name": "DIMM_C1"}, {"instance": 6, "name": "DIMM_C2"}, {"instance": 7, "name": "DIMM_D1"}, {"instance": 8, "name": "DIMM_D2"}, {"instance": 9, "name": "DIMM_E1"}, {"instance": 10, "name": "DIMM_E2"}, {"instance": 11, "name": "DIMM_F1"}, ], "add_in_card": [ {"instance": 1, "name": "slot1"}, {"instance": 2, "name": "slot2"}, {"instance": 3, "name": "slot3"}, {"instance": 4, "name": "slot5"} ], "storage_device": [ {"instance": 1, "name": "SATA0"}, {"instance": 2, "name": "SATA1"}, {"instance": 3, "name": "SATA2"}, {"instance": 4, "name": "SATA3"} ] }
The system can query the BMC for an Entity name given the Entity ID and Entity Instance.
Tested: Yes; 1) Sending GetEntityName command; Expecting error since entity ID and entity instance are not specified. root@adler:~# ipmitool -I dbus raw 0x2e 0x32 0x79 0x2b 0x00 0x06 Unable to send RAW command (channel=0x0 netfn=0x2e lun=0x0 cmd=0x32 rsp=0xc7): Request data length invalid
2) Sending GetEntityName command; Expecting error since entity instance is not specified. root@adler:~# ipmitool -I dbus raw 0x2e 0x32 0x79 0x2b 0x00 0x06 0x01 Unable to send RAW command (channel=0x0 netfn=0x2e lun=0x0 cmd=0x32 rsp=0xc7): Request data length invalid
3) Sending GetEntityName command; Expecting error since Entity Id = 0x07 is not supported. root@adler:~# ipmitool -I dbus raw 0x2e 0x32 0x79 0x2b 0x00 0x06 0x07 0x01 Unable to send RAW command (channel=0x0 netfn=0x2e lun=0x0 cmd=0x32 rsp=0xcc): Invalid data field in request
4) Sending GetEntityName command; Expecting error since Entity Instance = 0x06 is not added in the JSON file. root@adler:~# ipmitool -I dbus raw 0x2e 0x32 0x79 0x2b 0x00 0x06 0x3 0x06 Unable to send RAW command (channel=0x0 netfn=0x2e lun=0x0 cmd=0x32 rsp=0xcc): Invalid data field in request
5) Sending GetEntityName command; Expecting success. root@adler:~# ipmitool -I dbus raw 0x2e 0x32 0x79 0x2b 0x00 0x06 0x3 0x01 79 2b 00 06 04 43 50 55 30 root@adler:~# ipmitool -I dbus raw 0x2e 0x32 0x79 0x2b 0x00 0x06 0x0B 0x01 79 2b 00 06 05 73 6c 6f 74 31 root@adler:~#
Change-Id: Idf6caae863acacd62460cbb7f73bf56fc927bcff Signed-off-by: Jaghathiswari Rankappagounder Natarajan <jaghu@google.com>
show more ...
|
#
33deb17e |
| 30-Nov-2018 |
Patrick Venture <venture@google.com> |
README: cleanup extra anchors
The anchors used in g3doc aren't in normal markdown or at least how github renders it. Remove them.
Also, split lines at 80 column width.
Change-Id: I94b36a739a0c3ca
README: cleanup extra anchors
The anchors used in g3doc aren't in normal markdown or at least how github renders it. Remove them.
Also, split lines at 80 column width.
Change-Id: I94b36a739a0c3ca6eb00c951bb6ab2d98c33933a Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
#
2d4836db |
| 29-Nov-2018 |
Jaghathiswari Rankappagounder Natarajan <jaghu@google.com> |
google-ipmi-sys: Add support for PCIE slot to I2C bus mapping
Say the bmc has the following information: root@xyz:/sys/bus/i2c/devices# ls 0-0070 10-0048 4-0049 5-0062 5-0066 5-0074 i2c-1
google-ipmi-sys: Add support for PCIE slot to I2C bus mapping
Say the bmc has the following information: root@xyz:/sys/bus/i2c/devices# ls 0-0070 10-0048 4-0049 5-0062 5-0066 5-0074 i2c-1 i2c-15 i2c-18 i2c-20 i2c-4 i2c-7 1-004e 3-0054 4-004d 5-0063 5-0067 9-004c i2c-10 i2c-16 i2c-19 i2c-21 i2c-5 i2c-8 1-004f 4-0048 5-0061 5-0065 5-0072 i2c-0 i2c-14 i2c-17 i2c-2 i2c-3 i2c-6 i2c-9 root@xyz:/sys/bus/i2c/devices# cd i2c-18 root@xyz:/sys/bus/i2c/devices/i2c-18# ls delete_device i2c-dev mux_device name new_device of_node power subsystem uevent root@xyz:/sys/bus/i2c/devices/i2c-18# cd of_node root@xyz:/sys/bus/i2c/devices/i2c-18/of_node# ls root@xyz:/sys/bus/i2c/devices/i2c-18/of_node# cat pcie-slot /pcie-slot/pcie@4root@xyz:/sys/bus/i2c/devices/i2c-18/of_node# cd root@xyz:~# cd /sys/firmware/devicetree/base root@xyz:/sys/firmware/devicetree/base# ls root@xyz:/sys/firmware/devicetree/base# cd pcie-slot/ root@xyz:/sys/firmware/devicetree/base/pcie-slot# ls name pcie@1a pcie@2a pcie@4 pcie@6 root@xyz:/sys/firmware/devicetree/base/pcie-slot# cd pcie\@4 root@xyz:/sys/firmware/devicetree/base/pcie-slot/pcie@4# ls name slot-name root@xyz:/sys/firmware/devicetree/base/pcie-slot/pcie@4# cat slot-name slot4root@xyz:/sys/firmware/devicetree/base/pcie-slot/pcie@4#
Then the system can send commands to 1) Get the number of pcie slots. 2) Get information about which i2c bus is routed to which pcie slot.
Tested: Yes; 1) Sending GetPCIeSlotsCount command; Getting pcie slots count as 4. root@xyz:~# ipmitool -I dbus raw 0x2e 0x32 0x79 0x2b 0x00 0x04 79 2b 00 04 04
3) Sending GetPCIeSlotI2cBusMapping command with entry ID 0; expecting success; received "slot5". root@xyz:~# ipmitool -I dbus raw 0x2e 0x32 0x79 0x2b 0x00 0x05 0x00 79 2b 00 05 14 05 73 6c 6f 74 35
4) Sending GetPCIeSlotI2cBusMapping command with entry ID 1; expecting success; received "slot1". root@xyz:~# ipmitool -I dbus raw 0x2e 0x32 0x79 0x2b 0x00 0x05 0x01 79 2b 00 05 0e 05 73 6c 6f 74 31
5) Sending GetPCIeSlotI2cBusMapping command with entry ID 2; expecting success; received "slot3". root@xyz:~# ipmitool -I dbus raw 0x2e 0x32 0x79 0x2b 0x00 0x05 0x02 79 2b 00 05 12 05 73 6c 6f 74 33
6) Sending GetPCIeSlotI2cBusMapping command with entry ID 3; expecting success; received "slot2". root@xyz:~# ipmitool -I dbus raw 0x2e 0x32 0x79 0x2b 0x00 0x05 0x03 79 2b 00 05 10 05 73 6c 6f 74 32
7) Sending GetPCIeSlotI2cBusMapping command with entry ID 4; expecting failure root@xyz:~# ipmitool -I dbus raw 0x2e 0x32 0x79 0x2b 0x00 0x05 0x04 Unable to send RAW command (channel=0x0 netfn=0x2e lun=0x0 cmd=0x32 rsp=0xc1): Invalid command root@xyz:~#
Change-Id: Id6e514bb11e8d4a00c615cffea6c2fdb6f5df03e Signed-off-by: Jaghathiswari Rankappagounder Natarajan <jaghu@google.com>
show more ...
|
#
3ebf2dd5 |
| 19-Oct-2018 |
Patrick Venture <venture@google.com> |
README: cleanup
Cleaned up the spacing and dropped unrelated material accidentally copied in.
Change-Id: If3c5826996e3d6c0387d866bad63b6dbd20a7af3 Signed-off-by: Patrick Venture <venture@google.com>
|
#
cf63cd27 |
| 17-Sep-2018 |
Patrick Venture <venture@google.com> |
google-ipmi-sys: add README
Adds a README describing the command byte sequences.
Change-Id: I46bd38625ccdfca2d9cb6d5420edfca1e6b50d5c Signed-off-by: Patrick Venture <venture@google.com>
|