From: "Guo Dong" <guo.dong@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"marcello.bauer@9elements.com" <marcello.bauer@9elements.com>
Cc: Patrick Rudolph <patrick.rudolph@9elements.com>,
Christian Walter <christian.walter@9elements.com>,
"Ma, Maurice" <maurice.ma@intel.com>,
"Desimone, Nathaniel L" <nathaniel.l.desimone@intel.com>,
"You, Benjamin" <benjamin.you@intel.com>
Subject: Re: [edk2-devel] [PATCH v5 3/3] UefiPayloadPkg: Support variable size MMCONF space
Date: Tue, 8 Sep 2020 22:35:47 +0000 [thread overview]
Message-ID: <BYAPR11MB3622A972910267A56E3BD7679E290@BYAPR11MB3622.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20200818082421.6168-4-marcello.bauer@9elements.com>
Reviewed-by: Guo Dong <guo.dong@intel.com>
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Marcello
> Sylvester Bauer
> Sent: Tuesday, August 18, 2020 1:24 AM
> To: devel@edk2.groups.io
> Cc: Patrick Rudolph <patrick.rudolph@9elements.com>; Christian Walter
> <christian.walter@9elements.com>; Ma, Maurice <maurice.ma@intel.com>;
> Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; You, Benjamin
> <benjamin.you@intel.com>
> Subject: [edk2-devel] [PATCH v5 3/3] UefiPayloadPkg: Support variable size
> MMCONF space
>
> The default size is still 256MiB, but will be overwritten by
> UefiPayloadPkg with the real MMCONF size.
>
> e.g.: On embedded AMD platforms the MMCONF window size is usually
> only 64MiB.
>
> Fixes crash on platforms not exposing 256 buses.
> Tested on:
> * AMD Stoney Ridge
>
> Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
> Signed-off-by: Marcello Sylvester Bauer <marcello.bauer@9elements.com>
> Cc: Patrick Rudolph <patrick.rudolph@9elements.com>
> Cc: Christian Walter <christian.walter@9elements.com>
> Cc: Maurice Ma <maurice.ma@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Benjamin You <benjamin.you@intel.com>
> ---
> UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc | 1 +
> UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf | 1 +
> UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c | 4 +++-
> 3 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc
> b/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc
> index 942bc9076634..5898a474f9e9 100644
> --- a/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc
> +++ b/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc
> @@ -365,6 +365,7 @@ [PcdsDynamicDefault]
> gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow|31
>
> gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|100
>
> gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0
>
> + gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseSize|0
>
>
>
>
> ################################################################
> ################
>
> #
>
> diff --git a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf
> b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf
> index 1371d5eb7952..cebc81135565 100644
> --- a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf
> +++ b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf
> @@ -54,6 +54,7 @@ [Pcd]
> gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution
>
> gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution
>
> gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
>
> + gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseSize
>
>
>
> [Depex]
>
> TRUE
>
> diff --git a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c
> b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c
> index a3974dcc02f8..a746d0581ee3 100644
> --- a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c
> +++ b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c
> @@ -155,13 +155,15 @@ BlDxeEntryPoint (
> }
>
>
>
> //
>
> - // Set PcdPciExpressBaseAddress by HOB info
>
> + // Set PcdPciExpressBaseAddress and PcdPciExpressBaseSize by HOB info
>
> //
>
> GuidHob = GetFirstGuidHob (&gUefiAcpiBoardInfoGuid);
>
> if (GuidHob != NULL) {
>
> AcpiBoardInfo = (ACPI_BOARD_INFO *)GET_GUID_HOB_DATA (GuidHob);
>
> Status = PcdSet64S (PcdPciExpressBaseAddress, AcpiBoardInfo-
> >PcieBaseAddress);
>
> ASSERT_EFI_ERROR (Status);
>
> + Status = PcdSet64S (PcdPciExpressBaseSize, AcpiBoardInfo->PcieBaseSize);
>
> + ASSERT_EFI_ERROR (Status);
>
> }
>
>
>
> return EFI_SUCCESS;
>
> --
> 2.28.0
>
>
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
>
> View/Reply Online (#64366): https://edk2.groups.io/g/devel/message/64366
> Mute This Topic: https://groups.io/mt/76261187/1781375
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [guo.dong@intel.com]
> -=-=-=-=-=-=
next prev parent reply other threads:[~2020-09-08 22:37 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-18 8:24 [PATCH v5 0/3] UefiPayloadPkg: Runtime MMCONF Marcello Sylvester Bauer
2020-08-18 8:24 ` [PATCH v5 1/3] UefiPayloadPkg: Store the size of the MMCONF window Marcello Sylvester Bauer
2020-08-18 8:24 ` [PATCH v5 2/3] MdePkg: PciExpressLib support variable size MMCONF Marcello Sylvester Bauer
2020-08-20 10:55 ` Liming Gao
2020-08-18 8:24 ` [PATCH v5 3/3] UefiPayloadPkg: Support variable size MMCONF space Marcello Sylvester Bauer
2020-09-08 22:35 ` Guo Dong [this message]
2020-09-16 8:56 ` more development process failure [was: UefiPayloadPkg: Runtime MMCONF] Laszlo Ersek
2020-09-16 17:30 ` [edk2-devel] " Guo Dong
2020-09-16 18:14 ` Laszlo Ersek
2020-09-16 21:51 ` Guo Dong
2020-09-17 5:59 ` Laszlo Ersek
2020-09-17 1:49 ` 回复: " gaoliming
2020-09-17 2:31 ` Yao, Jiewen
2020-09-17 6:31 ` Laszlo Ersek
2020-09-17 7:31 ` Yao, Jiewen
2020-09-17 10:26 ` Laszlo Ersek
2020-09-18 4:39 ` Ni, Ray
2020-09-18 7:37 ` Andrew Fish
2020-09-26 0:34 ` Guo Dong
2020-09-27 1:44 ` 回复: " gaoliming
2020-09-27 17:29 ` Guo Dong
2020-09-28 17:55 ` Laszlo Ersek
2020-09-29 4:13 ` Guo Dong
2020-09-29 11:59 ` Laszlo Ersek
2020-09-17 5:56 ` 回复: " Laszlo Ersek
2020-09-21 9:57 ` Marcello Sylvester Bauer
2020-09-22 6:45 ` Laszlo Ersek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BYAPR11MB3622A972910267A56E3BD7679E290@BYAPR11MB3622.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox