summaryrefslogtreecommitdiffstats
path: root/bmc
Commit message (Collapse)AuthorAgeFilesLines
* bmc: add network bridge supportBenjamin Fair2019-11-214-0/+210
| | | | | | | This data handler listens on a TCP port for the image bytes. Signed-off-by: Benjamin Fair <benjaminfair@google.com> Change-Id: I388fdd7303c5f8bc93a8f75e97b3abf8adbb81af
* bmc: allowing packing transport flags denselyBenjamin Fair2019-11-1812-78/+39
| | | | | | | | Future transport backends can densely fill in the upper 5 bits of the transport flag bitfield. Signed-off-by: Benjamin Fair <benjaminfair@google.com> Change-Id: Ie4ee59e0581e458a9020775e18270100f9a1de4e
* bmc: add test for reserved flagsBenjamin Fair2019-11-182-0/+67
| | | | | | | | | | Test that no one adds transport backends which use the lower 3 bits of the transport flag bitfield. These bits are reserved for exclusive use with the IPMI, LPC, and P2A backends to ensure backwards compatibility with older host tools. Signed-off-by: Benjamin Fair <benjaminfair@google.com> Change-Id: I6284f2c864aeb5e20a812c0b13e9ecc61349b127
* bmc: check empty instead of zero sizePatrick Venture2019-11-071-1/+1
| | | | | | | | Minor tweak to call the empty() method on the container instead of checking the result of the size() method. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ib5ee66c724783c4a5f63d974032f107b88264375
* bmc: require at least one action pack configurationPatrick Venture2019-11-074-55/+63
| | | | | | | | | | | | | | | | In the event the phosphor-ipmi-flash package is added to an image with only a default configuration, it should not register itself as a blob handler. The default installation does not include any json configuration files. Therefore, this lack of a configuration can be checked at load time. Added validation that the firmware image list contains at least two handlers, and one is always the hash blob handler. Added validation that the action map contains at least one action pack configuration. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I0b2f6cded78121869e8a01290d29e420c555a16d
* bmc: implement pci support for NuvotonMedad CChien2019-11-053-4/+116
| | | | | | | | | | Tested: Verified this works for a Nuvoton BMC. enable-nuvoton-p2a-mbox is for PCI-MailBox enable-nuvoton-p2a-vga is for PCI-VGA Signed-off-by: Medad CChien <ctcchien@nuvoton.com> Change-Id: I15bc9cc528c285fbd015f9f2fad0913163d92db8
* bmc: Rework abortProcess and deleteBlobBrandon Kim2019-10-181-23/+23
| | | | | | | | | In order to ensure we can abortProcess upon deleteBlob during an active update, removed the fileOpen() check and abortProcess clears the lookup table. Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id: I1b6b0efcabb91b7866f83d034c06780b126953d0
* bmc: Replace fileOpen flagBrandon Kim2019-10-182-11/+9
| | | | | | | | Instead of keeping track of a fileOpen flag, keep track of fileOpen using !lookup.empty() instead. Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id: I09d16479d2a52deae5e8d63582376a27a6a39bb5
* bmc : add config-static-bmc-with-update-status.json.inBrandon Kim2019-09-172-0/+27
| | | | | | | | Add a default json file with update status (file path defined with UPDATE_STATUS_FILENAME) enabled with --enable-update-status flag. Change-Id: I62d3b547d91840451906e26cbec55dfa74934b5e Signed-off-by: Brandon Kim <brandonkim@google.com>
* bmc: merge update and prepare systemdPatrick Venture2019-08-2110-275/+108
| | | | | | | | | The update systemd and prepare systemd were effectively the same, and this makes the systemd action generic. Tested: Not tested beyond unit-tests continuing to pass. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I8070731e53bfd6cdafb1d74d9db652f20341985e
* bmc: add mode to systemd preparation actionPatrick Venture2019-08-213-8/+21
| | | | | Signed-off-by: Patrick Venture <venture@google.com> Change-Id: If29311cfa9eddecdd81781867598a73789225bc5
* bmc: use string literals instead of variablesPatrick Venture2019-08-211-3/+2
| | | | | Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Iedde0738bbe3bf77fd1b63d2d45f65acc256e45c
* bmc: require blob ids to start with /flash/Patrick Venture2019-08-152-0/+71
| | | | | Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ib6a0db91d4e2ecd7e7cc3c51ddc1953d9fd8da3c
* bmc: buildjson: provide helper for common filesystemd typePatrick Venture2019-08-061-28/+21
| | | | | Signed-off-by: Patrick Venture <venture@google.com> Change-Id: If0c106301538a6a11e199c8033cf7328f21575e6
* bmc: cleanup verification language and symbolsPatrick Venture2019-08-066-21/+22
| | | | | Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ife4d7e519e44aff60441c5909346ca6d7e2aa090
* bmc: s/SystemdVerification/SystemdWithStatusFile/gPatrick Venture2019-08-054-24/+24
| | | | | Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I5da0ca9e3ae53df957647b19446df4196248fd31
* bmc: allow update to use systemd with pathPatrick Venture2019-08-052-0/+61
| | | | | | | | | Verification provides a mechanism that has a systemd unit and mode, and also a path to check the result. This object can be used for updates, and will be renamed in a later patchset to be more generically named. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I0a995af0aefff76592247775f22fc84189d14903
* bmc: add mode json option for verification systemdPatrick Venture2019-08-052-4/+16
| | | | | Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ibe5764c4e2ad7dd938177c813c8c6706886258a2
* bmc: move verify systemd mode to parameterPatrick Venture2019-08-054-8/+24
| | | | | | | | | Move the mode for the trigger service to a parameter instead of hard-coding it. This isn't yet a json configuration option, that'll be next. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I59564320015c22be1ec3a4701479d0ee93b9f1f7
* bmc: json configuration: update: add mode parameterPatrick Venture2019-08-054-1/+61
| | | | | | | | | Add the mode parameter as an optional configuration option for the update systemd approach. Previously this was hard-coded as "replace" but now the user can specify something else. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I2bcb61bd9ac5733df6da70f901516d26bd31e2a9
* bugfix: bmc: update service requires modePatrick Venture2019-08-053-8/+3
| | | | | | | | | Systemd startunit requires a job-mode. Default it to "replace." In a later patchset, the update systemd and verify system will collapse into one object, but this fix applies to the current implementation. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ia6465abac9979501ea7149933394d8c452b2f315
* bmc: use json for configurationPatrick Venture2019-07-191-79/+10
| | | | | | | | Use a json file for configuration of the flash image. Tested: Verified that /flash/image worked as expected. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I205978203360140870f0e68208912a894e00a6fc
* bmc: implement search for json filesPatrick Venture2019-07-196-0/+129
| | | | | | Tested: Verified it prints out the blobs expected. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I1ba6af8b2ca066e6eb1699cb4214ce32f148005d
* bmc: consolidate action pack code slightlyPatrick Venture2019-07-191-35/+44
| | | | | | | | Consolidate the code slightly as part of moving towards using the json configuration. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ic24e02973101b9b0d6cd120e761a7e25e1203fd9
* bmc: move from data section objs to ownedPatrick Venture2019-07-1919-137/+237
| | | | | | | | Move from objects created ahead of purpose to owned objects. This is a step towards integrating with the json support. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I738a5edd40724f17245911af1080c350f029fef1
* bmc: provide disabled json supportPatrick Venture2019-07-188-1/+714
| | | | | | | | Provide support such that a json configuration file can define a firmware handler and its behavior. This is not yet enabled. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: If21f4e97951b3bb91a8afc53bee493d8600a04b7
* build: add option --enable-host-biosPatrick Venture2019-07-036-10/+47
| | | | | | | Add option to enable building in support for the host bios. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I324fc071f07cd364fd39c7df1ccfd9f0fd509a46
* bmc: add ActionPack notion to bundle actionsPatrick Venture2019-07-0315-62/+390
| | | | | | | | Each firmware type will provide its own set of action implementations for each step, preparation, verification, and update. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Id6409ac356a74e9094272b37709861e2a33d9862
* bmc: only add verifyBlobId if data sent for imagePatrick Venture2019-07-033-4/+19
| | | | | | | | If data was sent to the hash only, don't add verify until they've at least opened the image blob id. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ifc03ac7090e7edbceeac414e908bc5aedb7ad1c3
* build: install three targets to handle bmc updatesPatrick Venture2019-07-034-0/+13
| | | | | | | | | | | | | | | | | | | | | | Transition from three service files to three targets installed by the BMC library: - phosphor-ipmi-flash-bmc-prepare.target - phosphor-ipmi-flash-bmc-verify.target - phosphor-ipmi-flash-bmc-update.target The prepare target is started each time the firmware update state machine changes from notYetStarted to uploadInProgress and can be leveraged to free memory (flush caches) or anything else required. The verify target is started when the verify blob is committed. The implementation of services within this target are such that they are expected to output a status value that's readable (typically via a file). The update target is started when the update blob is committed. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I1e838de954a3cf8956ff4b72d090e253b832efe7
* build: drop --enable-lpc-bridge optionPatrick Venture2019-07-031-4/+3
| | | | | | Tested: Not tested beyond build verification. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I56581665b5f12b2c00dd1debca42a75758a46d94
* build: drop --enable-pci-bridge optionPatrick Venture2019-07-031-2/+0
| | | | | | | | Now if you enable aspeed-p2a it'll enable that for you. Tested: Only build verified, did not perform testing. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I5d9bbd3ac62a9260efaec8035aaed9fd747e9f99
* bmc: split out service objectsPatrick Venture2019-07-021-9/+12
| | | | | | | | | Split out the service objects from being declaring inline as parameters into objects created and then moved. This is a step towards supporting adding another firmware type of bios. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I4e41c0fa1376d364251ea2aebc17a7eb4db37b51
* build: use a common library for shared piecesPatrick Venture2019-06-271-2/+1
| | | | | Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ic4b645091c71f270ba3b2f290f7206ebe3222f1d
* tools: remove phosphor-ipmi-blobs dependencyPatrick Venture2019-06-2724-70/+54
| | | | | | | | | | The host tool depended on the BMC header: firmware_handler.hpp because it defined the flags. This header depends on phosphor-ipmi-blobs, therefore the host-tool depends on this. Move the flags into a separate common header file and snip this dependency. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Id2ad33a1611c02605a1ed5c695429d0451eb98d4
* move bmc code into bmc folderPatrick Venture2019-06-2750-0/+6072
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I2407359461a1a2f0e733ff8cd0cb1744b6304c32
OpenPOWER on IntegriCloud