tools/pci: refactor did variable for NuvotonPciBridge
Symptom:
Host tool "burn_my_bmc" for in-band firmware update didn't work
and exception is about PCI device cannot find in NPCM8xx platform.
root@localhost:~#
burn_my_bmc --command update --interface ipmipci --image test.sig
--sig test.sig --type dummy
Sending over the firmware image.
Opening the cleanup blob
Committing to the cleanup blob
Closing cleanup blob
Exception received: Couldn't find supported PCI device
Root cause:
There are new Nuvoton PCI device-id in NPCM8xx platform.
The previous device-id 0x0750 is hardcode for NPCM7xx platform.
However, NPCM8xx PCI device is using new device-id 0x0850.
Thus, host tool will throw the exception from NotFoundException().
Solution:
We need to refactor this "did" variable to make host tool
"burn_my_bmc" can work well for these two kinds of PCI devices.
Tested:
In-band firmware update can work well in NPCM8xx with did change to 0x0850.
Here is the result of "lspci" from host side for refer it.
root@localhost:~# lspci -v | grep d7:
d7:01.0 Unassigned class [ff00]: Winbond Electronics Corp Device 0850 (rev 08)
d7:02.0 Unassigned class [ff00]: Winbond Electronics Corp Device 0850 (rev 08)
Change-Id: I2917298f13b0bcd7de3b2ff71173c546ea3cb02b
Signed-off-by: Tim Lee <timlee660101@gmail.com>
diff --git a/meson.options b/meson.options
index c348409..f1dd4f8 100644
--- a/meson.options
+++ b/meson.options
@@ -18,6 +18,8 @@
# Host Tool Options
option('ppc', type: 'boolean', value: false, description: 'Enable ppc host memory access')
+# Default value 1872 is 0x0750 below
+option('nuvoton-pci-did', type : 'integer', value : 1872, description : 'The device-id for Nuvoton PCI bridge')
# Configuration Details