f4167536 | 14-Dec-2020 |
William A. Kennington III <wak@google.com> |
verison-handler: Cleanup extern C
We want to make sure the definition and declaration names match, and don't need to separate them. Using extern "C" for one and not the other could cause them to mis
verison-handler: Cleanup extern C
We want to make sure the definition and declaration names match, and don't need to separate them. Using extern "C" for one and not the other could cause them to mismatch otherwise.
Change-Id: I67058edec66404108e68bbb4cb3768622077e057 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
f1d9447c | 11-Dec-2020 |
William A. Kennington III <wak@google.com> |
version-handler: Remove superfluous canHandleBlob
This is a guarantee of the upper layer interface, we don't need to check for it again.
Change-Id: Ifdc52e0d64543bd45ced5dabb29639c35e0c7da9 Signed-
version-handler: Remove superfluous canHandleBlob
This is a guarantee of the upper layer interface, we don't need to check for it again.
Change-Id: Ifdc52e0d64543bd45ced5dabb29639c35e0c7da9 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
c78bfc82 | 05-Nov-2020 |
Jason Ling <jasonling@google.com> |
version-handler: add version-handler, blob handler
Implement version-handler: a blob handler for retrieving version information about a blob.
Problem: ipmi-flash(firmware-handler) provides a mechan
version-handler: add version-handler, blob handler
Implement version-handler: a blob handler for retrieving version information about a blob.
Problem: ipmi-flash(firmware-handler) provides a mechanism to transfer firmware updates, verify them and perform updates but there is no mechanism to interrogate the firmware for its version.
Solution: version-handler provides handlers for retrieving information about firmware blobs. Adding "version" syntax to "/flash/blob" entries in the json configuration file enables this feature. The mechanism to retrieve version is identical to the mechanism used by firmware-handler to perform preparation, verification and updates (kick off systemd targets).
Signed-off-by: Jason Ling <jasonling@google.com> Change-Id: I28868ca8dd76d63af668d2e46b9359401d45f0bc
show more ...
|
7af41c28 | 20-Nov-2020 |
William A. Kennington III <wak@google.com> |
README: Add span-lite install
Change-Id: I77284753d11ee7c845f4a0535a47dc70a3beed48 Signed-off-by: William A. Kennington III <wak@google.com> |
e82d7395 | 19-Nov-2020 |
Jason Ling <jasonling@google.com> |
json builder: fix error with buildHandlerConfigs
Problem: mistakenly defined the implementation of buildHandlerConfigs in a separate cpp file. This breaks calling buildHandlerConfigs from a derived
json builder: fix error with buildHandlerConfigs
Problem: mistakenly defined the implementation of buildHandlerConfigs in a separate cpp file. This breaks calling buildHandlerConfigs from a derived class.
Solution: move implementation of buildHandlerConfigs into the header.
unit tests added: firmware_json_unittest.cpp * add a test to parse json from file * add a test to parse an invalid json file
Signed-off-by: Jason Ling <jasonling@google.com> Change-Id: I5cd93ad01a329850a8ee516fae8a35339c991ae0
show more ...
|
85e54f1b | 05-Nov-2020 |
Jason Ling <jasonling@google.com> |
version-handler: implement json parser
version-handler adds the following capability
- ipmi-flash blobs can add a "version" along with the required nested properties. This enables versioning suppor
version-handler: implement json parser
version-handler adds the following capability
- ipmi-flash blobs can add a "version" along with the required nested properties. This enables versioning support for that flash blob. For instance, { "blob" : "/flash/sink_seq", "version":{ //now a /version/sink_seq blob will appear "handler": { "type: : "file", //only file type is supported "path" : "/tmp/version_info" // file contents // contain textual version. // Content returned on read }, "actions":{ "open" : { //on open launch a systemd target "type" : "systemd", "unit" : "version.target" } } } }
In the above example (pretend that the rest of the required firmware-handler fields are present) firmware handler will create the normal ipmi-flash blobs needed for updating firmware. The addition of the "version" section activates the version-handler which exposes a blob named /version/sink_seq.
Opening /version/sink_seq will kick off the action specified. In this case the systemd target version.target will be launched. This service should retrieve the version information and then place the contents in the file specified by handler - path (/tmp/version_info).
The user at this point can poll (stat) the blob until the meta-data indicates that read data is ready.
A read can be issued for /version/sink_seq. What is returned will be the contents of /tmp/version_info.
Signed-off-by: Jason Ling <jasonling@google.com> Change-Id: I7cc7bec2e08b013c6b77f8dfd2a502272ad2d3bd
show more ...
|
84bff8be | 06-Nov-2020 |
Jason Ling <jasonling@google.com> |
test: move shared mocks to common area
Move mocks that can be shared between version and firmware handler tests to parent directory (bmc/test).
This will eliminate the need to duplicate the definit
test: move shared mocks to common area
Move mocks that can be shared between version and firmware handler tests to parent directory (bmc/test).
This will eliminate the need to duplicate the definition of testing mocks.
Signed-off-by: Jason Ling <jasonling@google.com> Change-Id: Id41c56271d0bfbcb8c18da1f903c7786699508d4
show more ...
|
49dd8ce2 | 03-Nov-2020 |
Willy Tu <wltu@google.com> |
tools: remove shadow field
Rename pci for AspeedPciBridge and NuvotonPciBridge.
Parameter 'pci' shadows member inherited from type 'PciAccessBridge'
Signed-off-by: Willy Tu <wltu@google.com> Chang
tools: remove shadow field
Rename pci for AspeedPciBridge and NuvotonPciBridge.
Parameter 'pci' shadows member inherited from type 'PciAccessBridge'
Signed-off-by: Willy Tu <wltu@google.com> Change-Id: I5cb136570764962c5b985f52fe87a4e0b89e5279
show more ...
|
8a9de245 | 30-Oct-2020 |
Willy Tu <wltu@google.com> |
Add option to skip p2a bridge disable
Add a new constructor for P2aDataHandler with skipBridgeDisable bool to enable an option to skip disableBridge() in AspeedPciBridge and NuvotonPciBridge.
Signe
Add option to skip p2a bridge disable
Add a new constructor for P2aDataHandler with skipBridgeDisable bool to enable an option to skip disableBridge() in AspeedPciBridge and NuvotonPciBridge.
Signed-off-by: Willy Tu <wltu@google.com> Change-Id: I439bbaa2b7295adc54a8aa98157db60a7e820837
show more ...
|
c893f43d | 24-Oct-2020 |
Jason Ling <jasonling@google.com> |
make building handlers from json more generic
Problem: version-handler, a new feature that will be added to this repository will also parse json files from the same directory ipmi-flash does. Curren
make building handlers from json more generic
Problem: version-handler, a new feature that will be added to this repository will also parse json files from the same directory ipmi-flash does. Currently buildjson is a mix of some code that can be reused and other code that is pretty specific to firmware updates; this makes it hard to reuse the code.
Solution: factor out the generic parts and place it in bmc and then leave the specific parts in firmware-handler. Also code changes have been made to buildjson: wrap functions in a templated class that leaves feature specific parsing as a pure virtual method.
Tested: Ran the unit tests, which do test the parsing functionality.
Signed-off-by: Jason Ling <jasonling@google.com> Change-Id: I021dc829a82d1719b4cb862cdfb224eca629a44d
show more ...
|
56a2273f | 23-Oct-2020 |
Jason Ling <jasonling@google.com> |
extend file_handler to support reads
Problem: the upcomming version handler will need to read from files. Currently file hander (image handler) does not support reads.
Solution: Add read support by
extend file_handler to support reads
Problem: the upcomming version handler will need to read from files. Currently file hander (image handler) does not support reads.
Solution: Add read support by providing an optional mode parameter.
Tests added: FileHanderTest added to - Test out open for reads - Test out reading out bytes and verifying size and content - Test out trying to read beyond EOF - Test out offset reads that go beyond EOF
Tested: Existing unit tests pass New unit tests for reading all pass
Signed-off-by: Jason Ling <jasonling@google.com> Change-Id: Ie416a6b4b452d8d04fa158bd55989d07a891896f
show more ...
|
a6065507 | 26-Oct-2020 |
Patrick Venture <venture@google.com> |
bmc: firmware-handler: lpc: minor cleanup
Moves the setInitializedAndReturn method to the source file to remove the exception dependency from the header.
Signed-off-by: Patrick Venture <venture@goo
bmc: firmware-handler: lpc: minor cleanup
Moves the setInitializedAndReturn method to the source file to remove the exception dependency from the header.
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I17ad9a116f47e729dd5b12b6279ea6986529e6ca
show more ...
|
ded66d0f | 23-Oct-2020 |
Jason Ling <jasonling@google.com> |
move files around to create a common convenience library
Problem: plan is to add another blob handler into ipmi-flash (ipmi-flash-version). This new handler will re-use much of the ipmi-flash (firmw
move files around to create a common convenience library
Problem: plan is to add another blob handler into ipmi-flash (ipmi-flash-version). This new handler will re-use much of the ipmi-flash (firmware-handler) code. The common code should be presented as a convenience library to reduce code duplication.
Solution: move anticipated firmware-handler specific code into the subdirectory bmc/firmware-handler and leave common code in bmc/.
The end goal is to have version-handler re-use as much code as possible.
Tested: rebuilt everything and ran unit tests.
Signed-off-by: Jason Ling <jasonling@google.com> Change-Id: I2128da629b0ddf27b89f1faee358d1941f1dff38
show more ...
|
63902a43 | 06-Oct-2020 |
Patrick Venture <venture@google.com> |
bmc/test: cleanup remove unused declarations
Remove unused using declarations.
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: If975e789745f4c625c84fba376d85f805f38f3e0 |
4d1c687e | 05-Oct-2020 |
Patrick Venture <venture@google.com> |
tools: add missing io handler unittests
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I78dfb794969fc8b34bdd9093745bc625581069dd |
ea0e470f | 05-Oct-2020 |
Patrick Venture <venture@google.com> |
tools: io: add ppcMemFd cleanup
The destructor may try to double-close because the ppcMemFd was not being set to -1.
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I3423ae874d551b39
tools: io: add ppcMemFd cleanup
The destructor may try to double-close because the ppcMemFd was not being set to -1.
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I3423ae874d551b39f3deb761c5572078b07a0349
show more ...
|
48474bc1 | 05-Oct-2020 |
Patrick Venture <venture@google.com> |
cleanup: coverage: add missing coverage
The uninteresting blob methods did not receive unit-tests. This adds those missing unit-tests.
Signed-off-by: Patrick Venture <venture@google.com> Change-Id:
cleanup: coverage: add missing coverage
The uninteresting blob methods did not receive unit-tests. This adds those missing unit-tests.
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ib5885e3f3fa9e4e708fbf578bcaaa8bc85ff3993
show more ...
|
8cdf964d | 30-Sep-2020 |
Patrick Venture <venture@google.com> |
tools/test: add updater tests to increase coverage
Add missing unit-tests for the updater.
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ieb668561e6cc7285549406d830f1295039dec4c0 |
ede9c9f6 | 30-Sep-2020 |
Patrick Venture <venture@google.com> |
util: use constexpr string instead of string objects
This handles an initialization order issue found with address santization testing.
Signed-off-by: Patrick Venture <venture@google.com> Change-Id
util: use constexpr string instead of string objects
This handles an initialization order issue found with address santization testing.
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I7b3b6e980e378855e8bda8209dba18c20b67a000
show more ...
|
4b1b0450 | 30-Sep-2020 |
Patrick Venture <venture@google.com> |
bmc/test: add missing util header
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I384e9d34d65336c9081da88e4378a987b26c8504 |
e261ca2a | 28-Sep-2020 |
Patrick Venture <venture@google.com> |
tools/test: add missing virtual destructor
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I4eb80d77e3bea4a5b3d6e88c5eac1a19db027135 |
da4d4a43 | 28-Sep-2020 |
Patrick Venture <venture@google.com> |
bmc/test: fixups detected in bazel-type build
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Id5a2ac8ab7a59d6483a82e51ebcb25d7aaffaf50 |
794a37c1 | 25-Sep-2020 |
Patrick Venture <venture@google.com> |
bmc/test: drop unused variable
There was a variable in a test that aimed to do something but was unused.
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ieffd014d740acebbafa68d98076b
bmc/test: drop unused variable
There was a variable in a test that aimed to do something but was unused.
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ieffd014d740acebbafa68d98076bd63fd1855132
show more ...
|
43a2d165 | 24-Sep-2020 |
Patrick Venture <venture@google.com> |
bmc: move the memoryRegionSize out of the method
This information is not always used, and we need to also avoid it being re-declared.
Tested: meta-gsj was built which uses the net config Tested: me
bmc: move the memoryRegionSize out of the method
This information is not always used, and we need to also avoid it being re-declared.
Tested: meta-gsj was built which uses the net config Tested: meta-X that was built using p2a config. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Id9f355d63d78baaca1d6715367a6252636c5c4c7
show more ...
|
c6ba8ffc | 23-Sep-2020 |
Patrick Venture <venture@google.com> |
cleanup: transition to emplace_back where possible
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I41ea0bcabe0dd71111fa96b5e1baf12d3e79d129 |