* [PATCH v2] BaseTools: Allow multiple PciDeviceId in Fdf OptionROM override
@ 2018-10-24 11:42 Tomas Pilar (tpilar)
2018-10-25 12:11 ` Zhu, Yonghong
0 siblings, 1 reply; 2+ messages in thread
From: Tomas Pilar (tpilar) @ 2018-10-24 11:42 UTC (permalink / raw)
To: edk2-devel@lists.01.org
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Tomas Pilar <tpilar@solarflare.com>
---
BaseTools/Source/Python/GenFds/FdfParser.py | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py
index 63687e98bb..8f53fbeb55 100644
--- a/BaseTools/Source/Python/GenFds/FdfParser.py
+++ b/BaseTools/Source/Python/GenFds/FdfParser.py
@@ -1,3 +1,4 @@
+
## @file
# parse FDF file
#
@@ -4469,10 +4470,15 @@ class FdfParser:
if self.__IsKeyword( "PCI_DEVICE_ID"):
if not self.__IsToken( "="):
raise Warning("expected '='", 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"):
--
2.17.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] BaseTools: Allow multiple PciDeviceId in Fdf OptionROM override
2018-10-24 11:42 [PATCH v2] BaseTools: Allow multiple PciDeviceId in Fdf OptionROM override Tomas Pilar (tpilar)
@ 2018-10-25 12:11 ` Zhu, Yonghong
0 siblings, 0 replies; 2+ messages in thread
From: Zhu, Yonghong @ 2018-10-25 12:11 UTC (permalink / raw)
To: Tomas Pilar (tpilar), edk2-devel@lists.01.org
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Best Regards,
Zhu Yonghong
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Tomas Pilar (tpilar)
Sent: Wednesday, October 24, 2018 7:43 PM
To: edk2-devel@lists.01.org
Subject: [edk2] [PATCH v2] BaseTools: Allow multiple PciDeviceId in Fdf OptionROM override
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Tomas Pilar <tpilar@solarflare.com>
---
BaseTools/Source/Python/GenFds/FdfParser.py | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py
index 63687e98bb..8f53fbeb55 100644
--- a/BaseTools/Source/Python/GenFds/FdfParser.py
+++ b/BaseTools/Source/Python/GenFds/FdfParser.py
@@ -1,3 +1,4 @@
+
## @file
# parse FDF file
#
@@ -4469,10 +4470,15 @@ class FdfParser:
if self.__IsKeyword( "PCI_DEVICE_ID"):
if not self.__IsToken( "="):
raise Warning("expected '='", 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"):
--
2.17.2
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-25 12:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-24 11:42 [PATCH v2] BaseTools: Allow multiple PciDeviceId in Fdf OptionROM override Tomas Pilar (tpilar)
2018-10-25 12:11 ` Zhu, Yonghong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox