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 9011B211799E3 for ; Wed, 24 Oct 2018 03:15:17 -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-us1.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id E2788140098; Wed, 24 Oct 2018 10:15:15 +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 03:15:12 -0700 To: "Zhu, Yonghong" , "Carsey, Jaben" , "Gao, Liming" , "edk2-devel@lists.01.org" References: <436c51f1-3ca0-9efa-c79d-b12f46be10ff@solarflare.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E331FCA@SHSMSX104.ccr.corp.intel.com> From: "Tomas Pilar (tpilar)" Message-ID: Date: Wed, 24 Oct 2018 11:15:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: 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-22.820200-4.000000-10 X-TMASE-MatchedRID: u7Yf2n7Ca/0DJrf2+hNOhemc4/pDEQa2jLOy13Cgb4+qvcIF1TcLYKIe zaDoNJgUrZqX9okZ7jD+w331TsHWu++c5IL6OTgOwCZxkTHxcck6En2bnefhoDnKpbGL4ChVrhO hST9pKbVw1hJR+1oZQuTb/OmIigVgb3gilrWi3Gg00dkxYNMRtwrefVId6fzVdHKVzba1Q/1SUt G/M//UwRt6HjYRA02fUOHKsjMU3GJF9oq0S8wOxsu00lnG8+PWLdLfmiFS7fvJ2i9a4v4pV1PWu s3yxQNWt+odoSua73aRk6XtYogiau9c69BWUTGwUJTJpQXryEW2s0ar5ZAS9Hzw+XD1ifTXC24o EZ6SpSkj80Za3RRg8BPo82e2zbLkJ4ZrJQjcQojlbLOvNuSriW9V5AhkogdXB9KyKa03xSY= X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--22.820200-4.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24176.005 X-MDID: 1540376116-8kLgMHt2AA4v Subject: Re: [PATCH] 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 10:15:17 -0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Language: en-US Sorry, was travelling to plugfest. Respinning patches now. Cheers, Tom On 12/10/2018 06:53, Zhu, Yonghong wrote: > Hi Pilar, > > Will you update a V2 to cover Jaben's comment ? > > Best Regards, > Zhu Yonghong > > > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Carsey, Jaben > Sent: Monday, October 8, 2018 11:00 PM > To: Gao, Liming ; Tomas Pilar (tpilar) ; edk2-devel@lists.01.org > Subject: Re: [edk2] [PATCH] BaseTools: Allow multiple PciDeviceId in Fdf OptionROM override > > > >> -----Original Message----- >> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of >> Gao, Liming >> Sent: Sunday, October 07, 2018 6:42 PM >> To: Tomas Pilar (tpilar) ; >> edk2-devel@lists.01.org >> Subject: Re: [edk2] [PATCH] BaseTools: Allow multiple PciDeviceId in >> Fdf OptionROM override >> >> Pilar: >> The change is good. Could you also update INF and FDF spec for this usage? >> If you don't know how to update INF and FDF spec, please submit BZ. I >> will provide the spec patch. >> >> Reviewed-by: Liming Gao >> >> Thanks >> Liming >>> -----Original Message----- >>> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf >>> Of Tomas Pilar (tpilar) >>> Sent: Tuesday, October 02, 2018 10:46 PM >>> To: edk2-devel@lists.01.org >>> Subject: [edk2] [PATCH] BaseTools: Allow multiple PciDeviceId in Fdf >>> OptionROM override >>> >>> Contributed-under: TianoCore Contribution Agreement 1.1 >>> Signed-off-by: Tomas Pilar >>> --- >>> BaseTools/Source/Python/GenFds/FdfParser.py | 11 ++++++++--- >>> 1 file changed, 8 insertions(+), 3 deletions(-) >>> >>> diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py >>> b/BaseTools/Source/Python/GenFds/FdfParser.py >>> index 63687e98bb..a65f2cfd2d 100644 >>> --- a/BaseTools/Source/Python/GenFds/FdfParser.py >>> +++ b/BaseTools/Source/Python/GenFds/FdfParser.py >>> @@ -4469,10 +4469,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 += " " + self.__Token > Can we change to minimize looping string concatenation here? This in a loop will cause lots of memory allocation/deallocation and slow things down. > > Maybe : > 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.1 >>> >>> _______________________________________________ >>> edk2-devel mailing list >>> edk2-devel@lists.01.org >>> https://lists.01.org/mailman/listinfo/edk2-devel >> _______________________________________________ >> edk2-devel mailing list >> edk2-devel@lists.01.org >> https://lists.01.org/mailman/listinfo/edk2-devel > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel