summaryrefslogtreecommitdiffstats
path: root/tools/p2a.cpp
Commit message (Collapse)AuthorAgeFilesLines
* tools: p2a: enable bridge on host sidePatrick Venture2019-07-261-26/+64
| | | | | | | | | | Enable the PCI-to-AHB bridge from the host-side. Note: On my test system, this didn't seem to be required, it's possible the bit was stuck on when enabled. Tested: Not tested. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Idbea0e9d378ee108f24240d64b43b6a3c0eea799
* bugfix: tools: p2a: read returns boolPatrick Venture2019-07-261-5/+8
| | | | | | | | The read method returns bool, therefore if this returns 0, it's false, and therefore the read failed. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I365f9edf49a79ca5ea3c13090d6b8a11b9598e53
* tools: add progress implementationPatrick Venture2019-06-281-0/+10
| | | | | Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I9da1674d6cbc688efc7bab0e033788d6ee4694f7
* tools: remove phosphor-ipmi-blobs dependencyPatrick Venture2019-06-271-2/+5
| | | | | | | | | | 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
* tools: scope of the variable 'bytesRead' can be reduced.Patrick Venture2019-05-201-2/+3
| | | | | | | | | (style) The scope of the variable 'bytesRead' can be reduced. [tools/bt.cpp:21] [tools/p2a.cpp:111] Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I6b96247a02cd35d073b424501bb161e80aedf3b4
* bmc: move away from blobs namespacePatrick Venture2019-05-201-3/+3
| | | | | | | | The blobs namespace is really owned by phosphor-ipmi-blobs. Move all phosphor-ipmi-flash objects into ipmi_flash namespace. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I51b721ad4f3cdc4cc43846c942967ed2e5f16589
* bugfix: tools: use pci memberPatrick Venture2019-05-151-2/+1
| | | | | | | | | Tool worked by declaring its own pci utility object instead of using the one provided. There are not yet unit-tests associated with the P2aDataHandler that would have caught this. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I62cdeb17d298f1db51d8f513c59bfd299fc2884a
* pci: implement sending firmware image over p2aPatrick Venture2019-05-141-6/+67
| | | | | | | | | | | | | | | | | | | | | Implement sending firmware image over p2a via the aspeed-p2a-ctrl driver. Test configuration: # Image is static, uses the PCI bridge, and requires the ASPEED # PCI-to-AHB hardware implementation. EXTRA_OECONF_append_quanta-q71l = " --enable-static-layout" EXTRA_OECONF_append_quanta-q71l = " --enable-pci-bridge" EXTRA_OECONF_append_quanta-q71l = " --enable-aspeed-p2a" EXTRA_OECONF_append_quanta-q71l = " MAPPED_ADDRESS=0x47FF0000" Tested: Verified via md5sum the image-bmc file sent from the host via this tool matches the hash of /run/initramfs/bmc-image. This code can be used to send any file down, but was only tested with a "static" layout build. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I430bc7444f06f4f93a63e3bf2646bd195eaa2e52
* tools: p2a: read the PCI configurationPatrick Venture2019-05-071-0/+14
| | | | | | | | | | | Read the PCI configuration from the blob handler itself. Don't use this yet, but read it. Tested: Verified with a bugfix in ipmi-blob-tool that it was able to read back and print the value configured into the BMC image. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I49a8c93508e64a65fd37b50ec2b437f0016272f2
* bugfix: result.bars[1] may be used uninitializedPatrick Venture2019-05-071-0/+9
| | | | | | | | | | | Tools bugfix where if the result isn't assigned, it's still used. Therefore, add a proper exit condition. This was developed on a system with the device, and interestingly, this compilation warning->error wasn't hit during CI, only with bitbake. Therefore, different flags must be involved between the two. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ifca7046657b65a425b0c3bf4fe05dd42bd7a8a14
* tools: p2a: check aspeed bridgePatrick Venture2019-05-061-1/+40
| | | | | | | | | Check whether the pci-to-ahb bridge is enabled. It should be enabled because this comes after the firmware blob is opened for writing. Tested: Verified it reports the correct state of the value. Change-Id: I04bd21fdbf65938164f5845c0ec46e2231b17bd9 Signed-off-by: Patrick Venture <venture@google.com>
* p2a: add initial p2a support (empty)Patrick Venture2019-05-031-0/+42
Add initial pci-to-ahb host-side support, by just listing the aspeed pci devices. Tested: This dumped the aspeed PCI device listed on my test platform. Change-Id: I6dc4aeb3b38ec2f95bfd716bda2d8eb4786328ab Signed-off-by: Patrick Venture <venture@google.com>
OpenPOWER on IntegriCloud