From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-vk1-f193.google.com (mail-vk1-f193.google.com [209.85.221.193]) by mx.groups.io with SMTP id smtpd.web10.42214.1600694715796050091 for ; Mon, 21 Sep 2020 06:25:16 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@9elements.com header.s=google header.b=Aet2Fb/U; spf=pass (domain: 9elements.com, ip: 209.85.221.193, mailfrom: marcello.bauer@9elements.com) Received: by mail-vk1-f193.google.com with SMTP id c63so3349134vkb.7 for ; Mon, 21 Sep 2020 06:25:15 -0700 (PDT) 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=C1m9X4ljVsF9ZfLoTde5xtQqn3csKWK0PXLRoPtvnMM=; b=Aet2Fb/UhSeUN3+TMaeZy9DS/shljcotMc1bbiGpZIj29d0pyemhbM8/l1/cpqgsAU jP+pxfSGDW7OmEZ3EwiI6ETui+Bb6bEDYG8XNtHZbvOvdRMqi3GKRqcVBvfwt7ys5SMW GCZqvJEmZBhz26XVe48L71FTJSbLFExSEwLGS9Blnt05oryxWDRu3JH32v/DN+easQOd 8s92dEmQ6w9GchoKPFQTWyoY5EmguM9bbVpfJhkEW899xsIW+G864UnG+Ueo1GbvqkeD /7EHwChHoxn/B8ulp9SM1nZboUOFxWc4FG64k366ZDCO3swTPM+Q+jJiDbGodjHMUkaH YwYw== 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=C1m9X4ljVsF9ZfLoTde5xtQqn3csKWK0PXLRoPtvnMM=; b=rMyxTn3o8j3ibkNn+dSnz5mXMutVWVjBkP+gdEtYhOcm5EVHSWB8eEJ16hblMEXxlS 7U/rlZB2z6jjbe+8TTvtTcKJ+hTvwBWgL7X87TXRRdSEfdce7YcAVNCoa3W3tdgfNgwW Cq0Slp+XZJTIKAb+yod+FJzkP88nY6C3sk8qeQyO9Rkg2btxRnngHalwXmHzjS4oUnue puF2G66VAAoVLf2njkp14yP2QTm7aV+cxGgMxwzV53yApR6TlLwEkJkKFJiyJkRmuuQi ohYg94E5p5FrQdH0cCR2/T8Y+bDKe1w+vt+HSTCN24goyPUjKMv0v0KxIAUd5HclqGuN 1VYA== X-Gm-Message-State: AOAM530uSl4izXtxjMNlBELHAZTcbmku6LENrJmzn11xLekwD6hqlIOf Ol4lZy/xLjv+nnqMVX5Ruh9Xemj5KmzpRxchfGEmpA== X-Google-Smtp-Source: ABdhPJySEzneHbpMUPGXdZZzpqEzEq6N9x4aVb0VtNk74ykHo3rYU6KriR6K+E1FSjxL+v35aim3DreSEhYfXJPRyf4= X-Received: by 2002:a1f:1457:: with SMTP id 84mr18492957vku.18.1600694714764; Mon, 21 Sep 2020 06:25:14 -0700 (PDT) MIME-Version: 1.0 References: <20200915122616.17196-1-marcello.bauer@9elements.com> In-Reply-To: From: "Marcello Sylvester Bauer" Date: Mon, 21 Sep 2020 15:25:02 +0200 Message-ID: Subject: Re: [edk2-devel] [PATCH v2 0/2] Add support for scanning Option ROMs To: "Ni, Ray" Cc: "devel@edk2.groups.io" Content-Type: multipart/alternative; boundary="000000000000de246805afd2c725" --000000000000de246805afd2c725 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 implementatio= n to work. I will add this information as a code comment. > 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? 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 b= e 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 > > > > > >=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 --000000000000de246805afd2c725 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
hi Ray,

>=C2=A0I guess it is because the PciIoDe= vice->AllOpRomProcessed is set which causes GetPciRom() is skipped.
<= br>exactly. Therefore we need this for the=C2=A0gPciPlatformProtocol implem= entation 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 i= n real world? Do you think maybe the boot loader should supply a MMIO space= range so UeifPayloadPkg
>=C2=A0can use for option rom decoding?
<= br>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.=C2=A0

thanks= ,
Marcello


On Wed, Sep 16, 2020 at 10:28 AM Ni, Ray <ray.ni@intel.com> wrote:
Why running it will disable t= he 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/e= dk2-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
>
>
>



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



9element= s Agency GmbH, Kortumstra=C3=9Fe 19-21, 44787 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

Sit= z der Gesellschaft: Bochum
Handelsregister: Amtsgericht Bochum, HRB 17519
Gesch=C3=A4ftsf=C3=BChrung: Sebastian Deutsch, = Eray Basar
--000000000000de246805afd2c725--