From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=67.231.154.164; helo=dispatch1-us1.ppe-hosted.com; envelope-from=tpilar@solarflare.com; receiver=edk2-devel@lists.01.org Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D02ED2194D3B3 for ; Wed, 24 Oct 2018 04:42:41 -0700 (PDT) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (webmail.solarflare.com [12.187.104.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us3.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id C5CE66C0071 for ; Wed, 24 Oct 2018 11:42:40 +0000 (UTC) Received: from tp-desktop.uk.solarflarecom.com (10.17.20.51) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 24 Oct 2018 04:42:38 -0700 From: "Tomas Pilar (tpilar)" To: "edk2-devel@lists.01.org" Message-ID: Date: Wed, 24 Oct 2018 12:42:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 X-Originating-IP: [10.17.20.51] X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24176.005 X-TM-AS-Result: No-2.752000-4.000000-10 X-TMASE-MatchedRID: XUwBTc2XSO4vebl6MJ1oUQPZZctd3P4Bm/y00tE9StZ+YesuCgkiXKOY kPCgi2F6zmy+RYEtL0kN9ErsocDsQP/8zeX9WucyngIgpj8eDcC063Wh9WVqgt063cjuGtrt+gt Hj7OwNO3sx2WE3wdflY8Z8PVd5SgO1H9dHF07ClyRISkUUKscucO/9QfXFsVRp5QrpckS37JEow 9joYuxqtMnfUJYeJnNkSZz5P3Fslh2oJiigNspYp2KgpP+8x4acCbTU5GcrAGveZAKPQu/KQdiT OaBfValwL6SxPpr1/I= X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--2.752000-4.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24176.005 X-MDID: 1540381361-HRRBvtgySgcx Subject: [PATCH v2] BaseTools: Allow multiple PciDeviceId in Fdf OptionROM override X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2018 11:42:42 -0000 Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Tomas Pilar --- 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