tools: p2a: check aspeed bridge
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>
diff --git a/tools/pci.cpp b/tools/pci.cpp
index 2f283e6..b502a34 100644
--- a/tools/pci.cpp
+++ b/tools/pci.cpp
@@ -20,6 +20,7 @@
#include <pci/pci.h>
} // extern "C"
+#include <cstring>
#include <optional>
#include <vector>
@@ -53,6 +54,7 @@
item.func = dev->func;
item.vid = dev->vendor_id;
item.did = dev->device_id;
+ std::memcpy(item.bars, dev->base_addr, sizeof(dev->base_addr));
if (check)
{