From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f67.google.com (mail-ot1-f67.google.com [209.85.210.67]) by mx.groups.io with SMTP id smtpd.web09.28954.1605020523347566964 for ; Tue, 10 Nov 2020 07:02:03 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@9elements.com header.s=google header.b=bz5+9lFV; spf=pass (domain: 9elements.com, ip: 209.85.210.67, mailfrom: marcello.bauer@9elements.com) Received: by mail-ot1-f67.google.com with SMTP id g19so12747676otp.13 for ; Tue, 10 Nov 2020 07:02:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=9elements.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5MKFroTgOsqDioJNV+24+Pkyu6CMPE9SiTlkL0eAmaw=; b=bz5+9lFVVlX1DQW2JEhVN53410OB4W2IKTCsVoqDw0dqTbwoeP5BGuGKWy5ycnpADz GyxAtcUpqPUSiN6VlUcuGFPCMDsgfhbyBpJZs5LOdAcHrQWBDks4g6OOVG25jUEz6uZR 0NGyEP/o7qPP1BqO6v2NhRBNGN0VMBti8yeJZtUYmLToqUDNxqRd4DvIwLTTafSuB6w4 bWwT2HN3TlFy6Hv65/4+p8pDrNg1QJaFXtZJqAzCwONNnYSiwgejrpjifgJx9cOkV0sQ 7SrDPijsImzMY2/HULf2+IYCj1oNwvj2+0STTQK4PNHLkFl/nqzhexuBv2B13GSyHhJ6 jREw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5MKFroTgOsqDioJNV+24+Pkyu6CMPE9SiTlkL0eAmaw=; b=eVOgjHB3deqsava6n80ABHg4Wj6bKBvpqGBdu+Z0+mO3I6cYd3+cJSDf6s3yE189A7 j5O7VSWQlGIsFvw8bohYIH4pnzlAoZh0L+GmdFvUqh/K+5N212X29fc+YBvvbAoPcWGo RPu9K9XhVL6u4J42JxZjRSHvjjyqNuQ7yGl17lh+QRBqHn8uWg/c8RdaVCCBEJqreKl4 bPWRCUBKGxdWf/eO1/eDZeoK3exYs71EhaugKCe3fIOHygamt9w/gLDL0JAdIIqpnpVx MgP/PpV/IE6BEsasAiPzH5zfhrgCf09OaHGK9tBuB9jCJ/0lU+zuQPoER2X31/h1Hz7p eZ+w== X-Gm-Message-State: AOAM533LQEDBFMjq8ij5vQcaq1q/toB0F7M+KB+HD11ZIwhmDCpVZ5Eo HEi6KVAhjZFcWgKZ/vOEmAfjXpAqWny0Fu1nW1CoWkFJ+rURVk0X X-Google-Smtp-Source: ABdhPJwlIJQzUMCdLNWJq93vXkUyEEQ089mQ2vraNiHFDOUP26BbyA9vEUaHdlI5ETZtVhFrBbJq/jL+knLKQ4QvmbU= X-Received: by 2002:a9d:1b4f:: with SMTP id l73mr13980191otl.178.1605020522574; Tue, 10 Nov 2020 07:02:02 -0800 (PST) MIME-Version: 1.0 References: <20200915122616.17196-1-marcello.bauer@9elements.com> In-Reply-To: From: "Marcello Sylvester Bauer" Date: Tue, 10 Nov 2020 16:01:51 +0100 Message-ID: Subject: Re: [edk2-devel] [PATCH v2 0/2] Add support for scanning Option ROMs To: "Kinney, Michael D" Cc: "devel@edk2.groups.io" , "Ni, Ray" Content-Type: multipart/alternative; boundary="0000000000001b089805b3c1f6cc" --0000000000001b089805b3c1f6cc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, > If the assumption in this env is that PCI enumeration has already been done, would it make more sense for the component that performed PCI enumeration to collect the PCI Option ROM contents and pass them into the UefiPayLoadPkg in memory buffers and have the PCI Platform Protocol provide the PCI Option ROM images from these memory buffers? We did not plan to add extra memory buffers to pass PCI Option ROMs. Is there any benefit to creating it? > In your UefiPayloadPkg change, you have an assumption that the option RO= M BAR still contain the correct base address. Is it always true in real world? D= o you think maybe the boot loader should supply a MMIO space range so UeifPayloadPkg can use for option rom decoding? We could update UefiPayloadPkg/BuildAndIntegrationInstructions.txt and mak= e this a requirement for the boot loader to make all option ROM BARs contain a valid base address. Thanks, Marcello On Wed, Sep 23, 2020 at 1:58 AM Kinney, Michael D < michael.d.kinney@intel.com> wrote: > Marcello, > > > > If the assumption in this env is that PCI enumeration has already been > done, would it make > > more sense for the component that performed PCI enumeration to collect t= he > PCI Option ROM > > contents and pass them into the UefiPayLoadPkg in memory buffers and hav= e > the PCI Platform Protocol > > provide the PCI Option ROM images from these memory buffers? > > > > Thanks, > > > > Mike > > > > *From:* devel@edk2.groups.io *On Behalf Of *Marce= llo > Sylvester Bauer > *Sent:* Monday, September 21, 2020 6:25 AM > *To:* Ni, Ray > *Cc:* devel@edk2.groups.io > *Subject:* Re: [edk2-devel] [PATCH v2 0/2] Add support for scanning > Option ROMs > > > > hi Ray, > > > I guess it is because the PciIoDevice->AllOpRomProcessed is set which > causes GetPciRom() is skipped. > > exactly. Therefore we need this for the gPciPlatformProtocol > implementation to work. > I will add this information as a code comment. > > > In your UefiPayloadPkg change, you have an assumption that the option > ROM BAR still contain the correct base address. > > Is it always true in real world? Do you think maybe the boot loader > should supply a MMIO space range so UeifPayloadPkg > > can use for option rom decoding? > > Every option ROM in coreboot does have it's own memory space and can not > be provided as MMIO space range. Probably we could > add some kind of validation to verify the validity of the base address. > > thanks, > Marcello > > > > On Wed, Sep 16, 2020 at 10:28 AM Ni, Ray wrote: > > Why running it will disable the ability of PciPlatform code to scan for > ROMs? > > I guess it is because the PciIoDevice->AllOpRomProcessed is set which > causes GetPciRom() is skipped. > > Can you explain more in the code comment? > > > -----Original Message----- > > From: devel@edk2.groups.io On Behalf Of Marcell= o > > Sylvester Bauer > > Sent: Tuesday, September 15, 2020 8:26 PM > > To: devel@edk2.groups.io > > Subject: [edk2-devel] [PATCH v2 0/2] Add support for scanning Option R= OMs > > > > Fix Option ROM enumeration and support scanning. > > > > v2: > > * add correct Maintainer and Reviewer to Cc > > * PciPlatformDxe: > > - Update description > > - add function description > > > > Branch: https://github.com/9elements/edk2-1/tree/UefiPayloadPkg- > > Option_ROMs > > PR: https://github.com/tianocore/edk2/pull/926 > > > > Patrick Rudolph (2): > > MdeModulePkg: Fix OptionROM scanning > > UefiPayloadPkg: Scan for Option ROMs > > > > UefiPayloadPkg/UefiPayloadPkgIa32.dsc | 1 + > > UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc | 1 + > > UefiPayloadPkg/UefiPayloadPkg.fdf | 1 + > > UefiPayloadPkg/PciPlatformDxe/PciPlatformDxe.inf | 46 +++ > > UefiPayloadPkg/PciPlatformDxe/PciPlatformDxe.h | 19 + > > MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c | 10 +- > > UefiPayloadPkg/PciPlatformDxe/PciPlatformDxe.c | 426 > > ++++++++++++++++++++ > > 7 files changed, 500 insertions(+), 4 deletions(-) > > create mode 100644 UefiPayloadPkg/PciPlatformDxe/PciPlatformDxe.inf > > create mode 100644 UefiPayloadPkg/PciPlatformDxe/PciPlatformDxe.h > > create mode 100644 UefiPayloadPkg/PciPlatformDxe/PciPlatformDxe.c > > > > -- > > 2.28.0 > > > > > > > > > > > -- > > *[Marcello Sylvester Bauer]* > > > > 9elements Agency GmbH, Kortumstra=C3=9Fe 19-21, 44787 Bochum, Germany > > Email: [DEINE EMAIL ADDRESSE] > > > Phone: *+49 234 68 94 188 <+492346894188>* > > Mobile: *+49 1722847618 <+491722847618>* > > > > Sitz der Gesellschaft: Bochum > > Handelsregister: Amtsgericht Bochum, HRB 17519 > > Gesch=C3=A4ftsf=C3=BChrung: Sebastian Deutsch, Eray Basar > > > Datenschutzhinweise nach Art. 13 DSGVO > >=20 > --=20 *[Marcello Sylvester Bauer]* 9elements Agency GmbH, Kortumstra=C3=9Fe 19-21, 44787 Bochum, Germany Email: [DEINE EMAIL ADDRESSE] Phone: *+49 234 68 94 188 <+492346894188>* Mobile: *+49 1722847618 <+491722847618>* Sitz der Gesellschaft: Bochum Handelsregister: Amtsgericht Bochum, HRB 17519 Gesch=C3=A4ftsf=C3=BChrung: Sebastian Deutsch, Eray Basar Datenschutzhinweise nach Art. 13 DSGVO --0000000000001b089805b3c1f6cc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

> If the assumption in this env = is that PCI enumeration has already been done, would it make

more sense for the compon= ent that performed PCI enumeration to collect the PCI=C2=A0Option=C2=A0ROM

contents and pass them into the=C2=A0UefiPayLoadPkg=C2=A0in memo= ry buffers and have the PCI Platform Protocol provide the PCI=C2=A0<= span class=3D"gmail-il">Option=C2=A0ROM=C2=A0images from these memory buffers?


We did not plan to add extra memory buffers = to pass PCI Option ROMs.=C2=A0Is there any benefit to creating it?= =C2=A0

> In your UefiPayloadPkg change, you have an = assumption that the=C2=A0option=C2=A0ROM=C2=A0BAR still contain the correct base addre= ss. Is it always true in real world? Do you think maybe the boot loader sho= uld supply a MMIO space range so UeifPayloadPkg can use for=C2=A0option=C2=A0rom=C2=A0= decoding?

We could update UefiPayloadPkg/BuildAndIntegrationInstructio= ns.txt and make this a requirement for the boot loader to make all option R= OM BARs contain a valid base address.

Thanks,
Marcello

On W= ed, Sep 23, 2020 at 1:58 AM Kinney, Michael D <michael.d.kinney@intel.com> w= rote:

Marcello,

=C2=A0

If the assumption in this env is that PCI enu= meration has already been done, would it make

more sense for the component that performed P= CI enumeration to collect the PCI Option ROM

contents and pass them into the UefiPayLoadPkg in memory buffers and have the PCI Platform Pr= otocol

provide the PCI Option ROM images from these = memory buffers?

=C2=A0

Thanks,

=C2=A0

Mike

=C2=A0

=C2=A0

hi Ray,

>=C2=A0I guess it is because the PciIoDevice->AllOpRomProcessed is s= et which causes GetPciRom() is skipped.

exactly. Therefore we need this for the=C2=A0gPciPlatformProtocol implemen= tation to work.
I will add this information as a code comment.

> In your UefiPayloadPkg change, you have an assumption that the option= ROM BAR still contain the correct base address.
> Is it always true in real world? Do you think maybe the boot loader s= hould supply a MMIO space range so UeifPayloadPkg
>=C2=A0can use for option rom decoding?

Every option ROM in coreboot does have it's own memory space and can n= ot be provided as MMIO space range. Probably we could
add some kind of validation to verify the validity of the base address.=C2= = =A0

thanks,
Marcello

=C2=A0

On Wed, Sep 16, 2020 at 10:28 AM Ni, Ray <ray.ni@intel.com> wr= ote:

Why running it will di= sable the ability of PciPlatform code to scan for ROMs?

I guess it is because the PciIoDevice->AllOpRomProcessed is set which c= auses GetPciRom() is skipped.

Can you explain more in the code comment?

> -----Original Message-----
> From: devel= @edk2.groups.io <devel@edk2.groups.io> On Behalf Of Marcello
> Sylvester Bauer
> Sent: Tuesday, September 15, 2020 8:26 PM
> To: devel@e= dk2.groups.io
> Subject: [edk2-devel] [PATCH v2 0/2] Add support for scanning Option = ROMs
>
> Fix Option ROM enumeration and support scanning.
>
> v2:
> * add correct Maintainer and Reviewer to Cc
> * PciPlatformDxe:
>=C2=A0 =C2=A0- Update description
>=C2=A0 =C2=A0- add function description
>
> Branch: https://github.com/9elements/edk2-1/tree/UefiPayloadPkg-
> Option_ROMs
> PR: https://github.com/tianocore/edk2/pull/926
>
> Patrick Rudolph (2):
>=C2=A0 =C2=A0MdeModulePkg: Fix OptionROM scanning
>=C2=A0 =C2=A0UefiPayloadPkg: Scan for Option ROMs
>
>=C2=A0 UefiPayloadPkg/UefiPayloadPkgIa32.dsc=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A01 +
>=C2=A0 UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 =C2=A01 +
>=C2=A0 UefiPayloadPkg/UefiPayloadPkg.fdf=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A01 +
>=C2=A0 UefiPayloadPkg/PciPlatformDxe/PciPlatformDxe.inf=C2=A0 =C2=A0 = =C2=A0 |=C2=A0 46 +++
>=C2=A0 UefiPayloadPkg/PciPlatformDxe/PciPlatformDxe.h=C2=A0 =C2=A0 =C2= = =A0 =C2=A0 |=C2=A0 19 +
>=C2=A0 MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c |=C2=A0 1= 0 +-
>=C2=A0 UefiPayloadPkg/PciPlatformDxe/PciPlatformDxe.c=C2=A0 =C2=A0 =C2= = =A0 =C2=A0 | 426
> ++++++++++++++++++++
>=C2=A0 7 files changed, 500 insertions(+), 4 deletions(-)
>=C2=A0 create mode 100644 UefiPayloadPkg/PciPlatformDxe/PciPlatformDxe= .inf
>=C2=A0 create mode 100644 UefiPayloadPkg/PciPlatformDxe/PciPlatformDxe= .h
>=C2=A0 create mode 100644 UefiPayloadPkg/PciPlatformDxe/PciPlatformDxe= .c
>
> --
> 2.28.0
>
>
>


=C2=A0

--

[Marcello Sylvester Bauer]=C2= =A0

=C2=A0

=

9elements Agency GmbH, Kortumstra=C3=9Fe 19-21, 4= 4787 Bochum, Germany

Email:=C2=A0=C2=A0[DEINE EMAIL ADDRESSE]

Phone:=C2=A0=C2=A0+49 234 68 94 188

Mobile:=C2=A0=C2=A0+49 1722847618

=C2=A0

Sitz der = Gesellschaft: Bochum

Handelsre= gister: Amtsgericht Bochum, HRB 17519

Gesch=C3= =A4ftsf=C3=BChrung: Sebastian Deutsch, Eray Basar=



--
[Marcello Sylvester Bauer]= =C2=A0



9elements Agency GmbH, Kortumstra=C3= =9Fe 19-21, 44787 Bochum, Germany
Email:=C2=A0=C2=A0= [DEINE EMAIL ADDRESSE]
Phon= e:=C2=A0=C2=A0+49 234 68 94 188
Mobile:=C2=A0=C2=A0+49 1722847= 618

Sitz der Gesellschaft: Bochum
Handelsregister: Amtsgeri= cht Bochum, HRB 17519
G= esch=C3=A4ftsf=C3=BChrung: Sebastian Deutsch, Eray Basar
--0000000000001b089805b3c1f6cc--