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 ...
|
0dea6fa8 | 20-Oct-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-17 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-17 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: I35d3ba19f100c4f2f0a924af86454a5fabeae03c Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
7509f4e1 | 23-Aug-2023 |
Willy Tu <wltu@google.com> |
test: Return from validateReply if no reply
Return early if actualReply doesn't have value instead of getting the data even after has_value() failed.
Change-Id: I339324d76a704f8b7bce98cfdf881225e46
test: Return from validateReply if no reply
Return early if actualReply doesn't have value instead of getting the data even after has_value() failed.
Change-Id: I339324d76a704f8b7bce98cfdf881225e46c5aca Signed-off-by: Willy Tu <wltu@google.com>
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 ...
|
752ff5d6 | 09-Dec-2022 |
Willy Tu <wltu@google.com> |
test: Remove unneeded header
Signed-off-by: Willy Tu <wltu@google.com> Change-Id: I1a6f6fdd4de59a8f6682a0c7609d380c4bc493e1 |
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 ...
|
f39e668c | 16-Jun-2021 |
William A. Kennington III <wak@google.com> |
build: Remove autotools
No longer needed with meson being adopted.
Change-Id: Ia9e86fa29ece20dadce854d4c3f06b894af13f96 Signed-off-by: William A. Kennington III <wak@google.com> |
d963adb5 | 15-Jun-2021 |
William A. Kennington III <wak@google.com> |
build: Add meson
Change-Id: I9b6bf99113a4fbfb92b0b8b6c4e3feff0c070421 Signed-off-by: William A. Kennington III <wak@google.com> |
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> |
3ccee07b | 15-Jun-2021 |
William A. Kennington III <wak@google.com> |
utils: Make loader more lenient
Loaded modules tend to be unversioned, so we shouldn't enforce that they have a version suffix.
Change-Id: I9e7a02ea841b7c0634c84718c46707f087ee86ae Signed-off-by: W
utils: Make loader more lenient
Loaded modules tend to be unversioned, so we shouldn't enforce that they have a version suffix.
Change-Id: I9e7a02ea841b7c0634c84718c46707f087ee86ae Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
52b75fb3 | 24-Apr-2021 |
Willy Tu <wltu@google.com> |
test: Replace the C++ MOCK_METHOD<n> macros with the new MOCK_METHOD
Change-Id: I1667c6edd37447dbb6e868e853eb5ac05f348f89 Signed-off-by: Willy Tu <wltu@google.com> |
99f25beb | 28-Sep-2020 |
Patrick Venture <venture@google.com> |
test/utils: stop using local variable with global return
Removes warnings about returning a local variable's address. The code was "safe" because it was always returned before the stack was returne
test/utils: stop using local variable with global return
Removes warnings about returning a local variable's address. The code was "safe" because it was always returned before the stack was returned from, but this change makes it "safer."
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I675dfd1ae348dcf6a3bc47b9c1ca904da11238af
show more ...
|
b6ed5626 | 28-Sep-2020 |
Patrick Venture <venture@google.com> |
test: flexible array member cannot go into lambda
The flexible array member cannot be captured in a lambda expression.
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ia2a8942d6e9c0c
test: flexible array member cannot go into lambda
The flexible array member cannot be captured in a lambda expression.
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ia2a8942d6e9c0c3f58a9bf966a0100785a8b6c91
show more ...
|
cd833aa1 | 22-Nov-2019 |
Kun Yi <kunyi731@gmail.com> |
Fix openFiles refcount
The old code deletes session from the session map before doing a lookup of the path. Fix the order and add a unit test to catch the error case. (The unit test would fail witho
Fix openFiles refcount
The old code deletes session from the session map before doing a lookup of the path. Fix the order and add a unit test to catch the error case. (The unit test would fail without this fix).
Signed-off-by: Kun Yi <kunyi731@gmail.com> Change-Id: If043d6aad7bbaafa19ae3b63a6d9cc7a836d25b5
show more ...
|
aa17bdaf | 14-Nov-2019 |
Kun Yi <kunyi731@gmail.com> |
test: Add unit tests for session expiration
Add simple tests to ensure the session expire method is called when the timeout is set to zero.
Signed-off-by: Kun Yi <kunyi731@gmail.com> Change-Id: Ic6
test: Add unit tests for session expiration
Add simple tests to ensure the session expire method is called when the timeout is set to zero.
Signed-off-by: Kun Yi <kunyi731@gmail.com> Change-Id: Ic6e973ede760a6a6f15726d5b6c93a892d858c8b
show more ...
|
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 packed still have "
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 ...
|
00d5f0de | 17-May-2019 |
Patrick Venture <venture@google.com> |
blobs-ipmid: use enum class for BlobOEMCommands
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ic5aa3e38b4df33a2cfa29c575f17097e38d06605 |
924bc380 | 19-Mar-2019 |
Patrick Venture <venture@google.com> |
build: split object to enable coverage
Split the object into two pieces so we can pass part of it to the unit-tests.
Tested: Verified the coverage output processed the files. Change-Id: Idf1bdf9d21
build: split object to enable coverage
Split the object into two pieces so we can pass part of it to the unit-tests.
Tested: Verified the coverage output processed the files. Change-Id: Idf1bdf9d21eb1324395eb9a2c09ff8f1b4ecad6b Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
374350d7 | 15-Mar-2019 |
William A. Kennington III <wak@google.com> |
autotools: Fix for autoconf-archive 2019.01.19
The code coverage macros from the archive changed in a backward incompatible way. This adds a workaround to autodetect either version and do the right
autotools: Fix for autoconf-archive 2019.01.19
The code coverage macros from the archive changed in a backward incompatible way. This adds a workaround to autodetect either version and do the right thing.
Change-Id: I09b88e6b4792c99140a73a4ceb11d2896ee13562 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
de8a16e2 | 07-Mar-2019 |
Patrick Venture <venture@google.com> |
use ipmiblob library from ipmi-blob-tool
Drop all code that is now handled by the ipmiblob library provided by the new ipmi-blob-tool. This is a library that can be included on the BMC if necessary
use ipmiblob library from ipmi-blob-tool
Drop all code that is now handled by the ipmiblob library provided by the new ipmi-blob-tool. This is a library that can be included on the BMC if necessary, but relies on nothing that is strictly meant for the BMC.
Change-Id: I2b02ae0d432e84c08e598d27eef85b57c06a70fc Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|