History log of /openbmc/phosphor-ipmi-blobs/ipmi.cpp (Results 1 – 14 of 14)
Revision Date Author Comments
# 97e69ca1 16-Aug-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda forma

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.

See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.

Change-Id: I7c1a903d0b8fe5df2da9a73bda2d84113e9d854d
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 52509572 10-May-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: I86d194886a4dcd325364041d4c7745f4ea22fd65
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 83f9992c 22-Jun-2022 Willy Tu <wltu@google.com>

Recover Add ipmi response buffer size check for all commands

Use the ipmi::Context channel to get the max transfer size to make sure
that we select the right size.

Also remove maximumReadSize since

Recover Add ipmi response buffer size check for all commands

Use the ipmi::Context channel to get the max transfer size to make sure
that we select the right size.

Also remove maximumReadSize since the max reply size is checked instead

We already check the max reply size so maximumReadSize is not needed
anymore. This will result in a bit of a different behavior when the size
exceed the max. It will not fail - instead, it will return up to the
max size.

Tested:
Work with ipmi config that doesn't support the default interface (13).
```
cat /usr/share/ipmi-providers/channel_config.json
{
"0": {
"name": "usb0",
"is_valid": true,
"active_sessions": 0,
"channel_info": {
"medium_type": "lan-802.3",
"protocol_type": "ipmb-1.0",
"session_supported": "multi-session",
"is_ipmi": true
}
},
"8": {
"name": "INTRABMC",
"is_valid": true,
"active_sessions": 0,
"channel_info": {
"medium_type": "oem",
"protocol_type": "oem",
"session_supported": "session-less",
"is_ipmi": true
}
},
"11": {
"name": "gbmcbr",
"is_valid": true,
"active_sessions": 0,
"channel_info": {
"medium_type": "lan-802.3",
"protocol_type": "ipmb-1.0",
"session_supported": "multi-session",
"is_ipmi": true
}
}
}
```

This read the blob count and always works now since it uses the right
interface to get the max transfer size.
```
ipmitool raw 46 128 207 194 0 0
cf c2 00 4a ac 0e 00 00 00
```

Change-Id: Ia65f80719a819e7d642eb7425463a56c179935ac
Signed-off-by: Willy Tu <wltu@google.com>

show more ...


# 067ece15 16-Jun-2022 Willy Tu <wltu@google.com>

Refactor to use new version of OEM IPMI Handler

Using the new version of ipmi handler provide a higher level wrapper
over the same functionalities. It helps us parse the input and output to
have mor

Refactor to use new version of OEM IPMI Handler

Using the new version of ipmi handler provide a higher level wrapper
over the same functionalities. It helps us parse the input and output to
have more control of the input/output we see.

Changes to note,
- All cmd are removed from the request data. That is automatically
extracted now.

Tested:
Unit Test Passed.

All IPMI OEM command still works the same as before this change.

```
$ burn_my_bmc -command stage -image /tmp/test.txt -interface ipmipci
Set up ipmi flash updater with /flash/dummy
Received failure on delete: Received IPMI_CC: 255
Sending over the firmware image.
Find [0x1050 0x750]
bar0[0x94000000]
Upload to BMC 100% |Goooooooooooooooooooooooooooooooooooooooooooooooooooooooogle| Time: 00:00:00
Opening the verification file
Committing to /flash/verify to trigger service
Calling stat on /flash/verify session to check status
success
succeeded
```

Also tested gBMC Update workflow which worked fine.

Change-Id: Ib2bfeab0c2ec5aa72ede1ff457ef5f90e488053c
Signed-off-by: Willy Tu <wltu@google.com>

show more ...


# d92aee4d 27-Jun-2022 Willy Tu <wltu@google.com>

Revert "Add ipmi response buffer size check for all commands"

This reverts commit 88ca532a74375cc99bd979fbb037d07e5ee76cce.

Reason for revert: ipmi::getChannelMaxTransferSize is only using the
defa

Revert "Add ipmi response buffer size check for all commands"

This reverts commit 88ca532a74375cc99bd979fbb037d07e5ee76cce.

Reason for revert: ipmi::getChannelMaxTransferSize is only using the
default channel and may fail when using a different channel.

Change-Id: Ic080de6f51c05f86807b81dfd3dd38a87fc2dbf5
Signed-off-by: Willy Tu <wltu@google.com>

show more ...


# 88ca532a 14-Jun-2022 Willy Tu <wltu@google.com>

Add ipmi response buffer size check for all commands

Add a response size check for all Blob command using the max transfer
buffer size for the default ipmi channel.

The max size is fetched at the b

Add ipmi response buffer size check for all commands

Add a response size check for all Blob command using the max transfer
buffer size for the default ipmi channel.

The max size is fetched at the beginning and assumed that it won't
change. This is done instead of fetching it for all request to limit the
amount of refactoring needed to make it work with existing codebase.

Change-Id: I66c506cab9c92a120e9fc75da4b6b74d5677120b
Signed-off-by: Willy Tu <wltu@google.com>

show more ...


# 3d1fdfaa 08-Feb-2022 Willy Tu <wltu@google.com>

phosphor-ipmi-blobs: Code Health Cleanup

Removed the following errors.
- the 'empty' method should be used to check for emptiness instead of
comparing to an empty object
- using decl '*' is unus

phosphor-ipmi-blobs: Code Health Cleanup

Removed the following errors.
- the 'empty' method should be used to check for emptiness instead of
comparing to an empty object
- using decl '*' is unused
- redundant return statement at the end of a function with a void return
type
- variable 'managerReturned' defined in a header file; variable
definitions in header files can lead to ODR violations
- function 'getBlobManager' defined in a header file; function
definitions in header files can lead to ODR violations

Change-Id: I70c3db92c81b1f1b2468814605e0b2dfd358b401
Signed-off-by: Willy Tu <wltu@google.com>

show more ...


# 117912d2 15-Jun-2021 William A. Kennington III <wak@google.com>

ipmi: Remove non-standard c++ array syntax

Change-Id: I1c62222ab8584ffc5af6d99c80b93f5e93b4e26f
Signed-off-by: William A. Kennington III <wak@google.com>


# 993f5419 15-Jun-2021 William A. Kennington III <wak@google.com>

treewide: Remove unused variables

Change-Id: I946716e87ff95c3775d2802b83de565b6b2ac0a3
Signed-off-by: William A. Kennington III <wak@google.com>


# 8bc11779 04-Jun-2019 Patrick Venture <venture@google.com>

blobs: s/struct BlobMeta/BlobMeta/g

Because this structure is not anything special, simply use the cpp
idiomatic way of referencing the object.

Consistently, structures that are

blobs: s/struct BlobMeta/BlobMeta/g

Because this structure is not anything special, simply use the cpp
idiomatic way of referencing the object.

Consistently, structures that are packed still have "struct" used in
declarations. However, this distinction is only clear through its usage
and nothing in the language. Perhaps a better approach would be
notational naming struct PackedXYZ {};. However, that can get out of
control quickly.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I3b7e48e4b6687ef2e15e9d07c0eeba96eb5d2552

show more ...


# 50539d36 03-Dec-2018 Patrick Venture <venture@google.com>

bugfix: ipmi: set dataLen to zero when appropriate

On failures (or some silent success), set the return
buffer length to 0.

Change-Id: I118788ffddd2bfc031b3392db4cf13ab04b49287

bugfix: ipmi: set dataLen to zero when appropriate

On failures (or some silent success), set the return
buffer length to 0.

Change-Id: I118788ffddd2bfc031b3392db4cf13ab04b49287
Signed-off-by: Patrick Venture <venture@google.com>

show more ...


# 41258800 12-Nov-2018 Patrick Venture <venture@google.com>

process: add IPMI error return mechanism and update errors

The IPMI packet validation code must return specific IPMI errors
corresponding to what error has occurred instead of the invali

process: add IPMI error return mechanism and update errors

The IPMI packet validation code must return specific IPMI errors
corresponding to what error has occurred instead of the invalid command
error.

Update all IPMI handler pieces to return more specific errors.

Change-Id: I8d21e92015d84cc0880e3b83991aed7288e19eab
Signed-off-by: Patrick Venture <venture@google.com>

show more ...


# 5c4b17b2 04-Oct-2018 Patrick Venture <venture@google.com>

new command: BmcBlobWriteMeta

Implement new command BmcBlobWriteMeta.

Change-Id: I2e148f4bde4ef5d24db7e30bb02bdde024d9166a
Signed-off-by: Patrick Venture <venture@google.com>


# ef3aeadc 12-Sep-2018 Patrick Venture <venture@google.com>

initial drop of phosphor-ipmi-blobs

This implements a majority of the OEM IPMI BLOBS protocol. The only
piece missing from this is the timed expiration of sessions.

Change-Id:

initial drop of phosphor-ipmi-blobs

This implements a majority of the OEM IPMI BLOBS protocol. The only
piece missing from this is the timed expiration of sessions.

Change-Id: I82c9d17b625c94fc3340edcfabbbf1ffeb5ad7ac
Signed-off-by: Patrick Venture <venture@google.com>

show more ...