summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/GenFds/FdfParser.py
diff options
context:
space:
mode:
authorTomas Pilar <tpilar@solarflare.com>2018-10-24 19:42:36 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-10-26 20:47:54 +0800
commitf157f97301cc2c573977e624f859db93442ff2d5 (patch)
treeffc9e8cde3aaa3895e22c60b04171cb7e1f97f34 /BaseTools/Source/Python/GenFds/FdfParser.py
parentb28d406b5a3b1506ce75fa71c74b489b68a2c11a (diff)
downloadedk2-f157f97301cc2c573977e624f859db93442ff2d5.tar.gz
edk2-f157f97301cc2c573977e624f859db93442ff2d5.tar.bz2
edk2-f157f97301cc2c573977e624f859db93442ff2d5.zip
BaseTools: Allow multiple PciDeviceId in Fdf OptionROM override
Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Tomas Pilar <tpilar@solarflare.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/GenFds/FdfParser.py')
-rw-r--r--BaseTools/Source/Python/GenFds/FdfParser.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py
index bf6e0bd228..1c9a5130bf 100644
--- a/BaseTools/Source/Python/GenFds/FdfParser.py
+++ b/BaseTools/Source/Python/GenFds/FdfParser.py
@@ -4394,10 +4394,12 @@ class FdfParser:
if self._IsKeyword("PCI_DEVICE_ID"):
if not self._IsToken(TAB_EQUAL_SPLIT):
raise Warning.ExpectedEquals(self.FileName, self.CurrentLineNumber)
- if not self._GetNextHexNumber():
- raise Warning.Expected("Hex device id", self.FileName, self.CurrentLineNumber)
-
- Overrides.PciDeviceId = self._Token
+ # Get a list of PCI IDs
+ Overrides.PciDeviceId = ""
+ while (self.__GetNextHexNumber()):
+ Overrides.PciDeviceId = "{} {}".format(Overrides.PciDeviceId, self.__Token)
+ if not Overrides.PciDeviceId:
+ raise Warning.Expected("one or more Hex device ids", self.FileName, self.CurrentLineNumber)
continue
if self._IsKeyword("PCI_REVISION"):