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.build b/meson.build
index 7ea5697..b28fc5e 100644
--- a/meson.build
+++ b/meson.build
@@ -28,6 +28,7 @@
conf_data.set_quoted('UPDATE_STATUS_FILENAME', get_option('update-status-filename'))
conf_data.set_quoted('BIOS_VERIFY_STATUS_FILENAME', get_option('bios-verify-status-filename'))
conf_data.set('MAPPED_ADDRESS', get_option('mapped-address'))
+conf_data.set('NUVOTON_PCI_DID', get_option('nuvoton-pci-did'))
conf_h = configure_file(