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 ...
|
3c7037a7 | 21-Nov-2018 |
Patrick Venture <venture@google.com> |
build: cleanup configure script PKG_CHECK_MODULES
Cleanup the configure script package include lines. There isn't a set style for this yet, but this is an attempt to improve readability whereas it'
build: cleanup configure script PKG_CHECK_MODULES
Cleanup the configure script package include lines. There isn't a set style for this yet, but this is an attempt to improve readability whereas it's often one long line per library. The CI will fail if there aren't backslashes on lines for the AC_CHECK_HEADER.
Change-Id: I6933ae13699f749a57825eb2f011e80625c5a15c Signed-off-by: Patrick Venture <venture@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 ...
|
23ef59b7 | 26-Nov-2018 |
Patrick Venture <venture@google.com> |
build: set version to 0.1 to match recipe
Set the version specified in the configure_ac to match the recipe in meta-google.
Change-Id: I42de6806951cb8227691b5e1bb4a1290be8d0946 Signed-off-by: Patri
build: set version to 0.1 to match recipe
Set the version specified in the configure_ac to match the recipe in meta-google.
Change-Id: I42de6806951cb8227691b5e1bb4a1290be8d0946 Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
fff98617 | 12-Nov-2018 |
Patrick Venture <venture@google.com> |
Use more specific ipmi error codes
Most errors in the handler were returning an unsupported code and not a more specific code articulating the failure. Update the code to use more specific errors.
Use more specific ipmi error codes
Most errors in the handler were returning an unsupported code and not a more specific code articulating the failure. Update the code to use more specific errors.
Change-Id: I7f517d094245e8e1a6169f43582522889bb895d0 Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
96b088a7 | 13-Nov-2018 |
Patrick Venture <venture@google.com> |
s/setupGlobalOemCableCheck/setupGoogleOemSysCommands/g
Rename the library constructor to reflect its true purpose.
Change-Id: I40e43b6c658494fd08086bd371432ba5a8198277 Signed-off-by: Patrick Ventur
s/setupGlobalOemCableCheck/setupGoogleOemSysCommands/g
Rename the library constructor to reflect its true purpose.
Change-Id: I40e43b6c658494fd08086bd371432ba5a8198277 Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
ff40f273 | 09-Nov-2018 |
Patrick Venture <venture@google.com> |
build: Add -flto to CXXFLAGS
Add -flto to CXXFLAGS to allow build optimization.
Change-Id: Id80576cc9928de46cf85c0b39da0d54ff8fb3d40 Signed-off-by: Patrick Venture <venture@google.com> |
a313c408 | 09-Nov-2018 |
Patrick Venture <venture@google.com> |
build: cleanup Makefile
Cleanup spaces from the Makefile. Automake is ok with spaces, but for a cleaner file, use tabs.
Change-Id: I2228ded60960cf0ec47950631a729d80ea0830f8 Signed-off-by: Patrick
build: cleanup Makefile
Cleanup spaces from the Makefile. Automake is ok with spaces, but for a cleaner file, use tabs.
Change-Id: I2228ded60960cf0ec47950631a729d80ea0830f8 Signed-off-by: Patrick Venture <venture@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> |
acd5423a | 16-Oct-2018 |
Patrick Venture <venture@google.com> |
cleanup: use memcpy with fixed-size structures
Use std::memcpy with fixed-size structures.
Change-Id: I569be29fc7d1dc058b67936d030afbbbbad4bd0c Signed-off-by: Patrick Venture <venture@google.com> |
216108f1 | 12-Oct-2018 |
Patrick Venture <venture@google.com> |
cable: drop unused assignment
Drop unused reply.value assignment.
Change-Id: I58d3bac0a9e2132a1f2fe82427d195dce3811c16 Signed-off-by: Patrick Venture <venture@google.com> |
28557a1f | 28-Sep-2018 |
Patrick Venture <venture@google.com> |
main: drop unused headers
Dropped headers that were added during development. These headers are no longer required.
Change-Id: Ib725e642dfb33dfaf55eb10d36f7ffe32f3a6789 Signed-off-by: Patrick Vent
main: drop unused headers
Dropped headers that were added during development. These headers are no longer required.
Change-Id: Ib725e642dfb33dfaf55eb10d36f7ffe32f3a6789 Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
ef45005c | 21-Sep-2018 |
Patrick Venture <venture@google.com> |
build: clean up requirements
Drop unused phosphor-dbus-interfaces. Fixup experimental/any to be more specifically experimental/filesystem
Change-Id: I8161a7c971f2546469459639252a007e65831e03 Signed
build: clean up requirements
Drop unused phosphor-dbus-interfaces. Fixup experimental/any to be more specifically experimental/filesystem
Change-Id: I8161a7c971f2546469459639252a007e65831e03 Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
ce07ee0a | 19-Sep-2018 |
Patrick Venture <venture@google.com> |
wrap stdlib calls into cpp namespace
Wrap the stdlib calls into the cpp namespace.
Change-Id: I7ae16d0d18312f3d4118b1d5345df07e28773484 Signed-off-by: Patrick Venture <venture@google.com> |
f9a19b80 | 18-Sep-2018 |
Patrick Venture <venture@google.com> |
build: enable systemd system units
Enable the systemd system unit for the psu reset target in the configuration and Makefile for this daemon instead of storing it in the recipe, per the daemon(7) ma
build: enable systemd system units
Enable the systemd system unit for the psu reset target in the configuration and Makefile for this daemon instead of storing it in the recipe, per the daemon(7) manpage guidelines.
Change-Id: I565b10619ae0250845b6a10f6fce73b018b494f7 Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
90246e26 | 17-Sep-2018 |
Patrick Venture <venture@google.com> |
main: fixup log message to fixed type
By statically casting to a fixed-size type we can ensure the code compiles the same for 64-bit and 32-bit environments (for the most part w.r.t this).
Change-I
main: fixup log message to fixed type
By statically casting to a fixed-size type we can ensure the code compiles the same for 64-bit and 32-bit environments (for the most part w.r.t this).
Change-Id: If4989c7d3d0879e08be89dfa2a7846cf06dee883 Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
0dede335 | 17-Sep-2018 |
Patrick Venture <venture@google.com> |
fixup: CI is x86-64, build is 32, cast down for debug
The fprintfs were promoted to %lu to make CI work, which then broke the ARM build. Therefore need to cast to make it happy in both environments
fixup: CI is x86-64, build is 32, cast down for debug
The fprintfs were promoted to %lu to make CI work, which then broke the ARM build. Therefore need to cast to make it happy in both environments.
Change-Id: Ibba14d8aa19aca44c9ce9b65b66dd79659ce126e Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
c7d5026c | 17-Sep-2018 |
Patrick Venture <venture@google.com> |
gbmc...target: drop target file
Droppping the target file and adding to recipe.
Change-Id: Id4be6ba9872f025845fc0e8bcb72fa8695ebb276 Signed-off-by: Patrick Venture <venture@google.com>
|
c25a3df2 | 17-Sep-2018 |
Patrick Venture <venture@google.com> |
google-ipmi-sys: Build as c++17
Enables building as c++17 in the configuration. This follows the current guidelines to use this in OpenBMC moving forward.
Change-Id: I67495c60ae4831267f8e2ec48f63f
google-ipmi-sys: Build as c++17
Enables building as c++17 in the configuration. This follows the current guidelines to use this in OpenBMC moving forward.
Change-Id: I67495c60ae4831267f8e2ec48f63f7f6718c9426 Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
4d49ae65 | 17-Sep-2018 |
Patrick Venture <venture@google.com> |
google-ipmi-sys: initial commit: OEM IPMI handler
This implements a set of OEM IPMI commands built as sub-commands under one OEM IPMI command registered in the Google OEM Namespace.
Change-Id: I65f
google-ipmi-sys: initial commit: OEM IPMI handler
This implements a set of OEM IPMI commands built as sub-commands under one OEM IPMI command registered in the Google OEM Namespace.
Change-Id: I65ff6f35838b501ac6ac67f7765bbc474b808660 Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
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> |
bfcbc964 | 17-Sep-2018 |
Brad Bishop <radsquirrel@gmail.com> |
Initial commit |