public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Guo Dong" <guo.dong@intel.com>
To: Marcello Sylvester Bauer <marcello.bauer@9elements.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Patrick Rudolph <patrick.rudolph@9elements.com>,
	Christian Walter <christian.walter@9elements.com>,
	"Ma, Maurice" <maurice.ma@intel.com>,
	"You, Benjamin" <benjamin.you@intel.com>
Subject: Re: [PATCH v4 1/3] UefiPayloadPkg: Store the size of the MMCONF window
Date: Mon, 27 Jul 2020 15:40:29 +0000	[thread overview]
Message-ID: <BYAPR11MB36227FCB21A123CB4484B5269E720@BYAPR11MB3622.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20200727081842.28843-2-marcello.bauer@9elements.com>


Reviewed-by: Guo Dong <guo.dong@intel.com>

> -----Original Message-----
> From: Marcello Sylvester Bauer <marcello.bauer@9elements.com>
> Sent: Monday, July 27, 2020 1:19 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>;
> Dong, Guo <guo.dong@intel.com>; You, Benjamin <benjamin.you@intel.com>
> Subject: [PATCH v4 1/3] UefiPayloadPkg: Store the size of the MMCONF window
> 
> From: Patrick Rudolph <patrick.rudolph@9elements.com>
> 
> Store the real size of the Pcie Memory Mapped Address Space.
> This change is necessary to support variable size of MMCONF spaces.
> 
> 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: Guo Dong <guo.dong@intel.com>
> Cc: Benjamin You <benjamin.you@intel.com>
> ---
>  UefiPayloadPkg/Include/Guid/AcpiBoardInfoGuid.h | 1 +
>  UefiPayloadPkg/BlSupportPei/BlSupportPei.c      | 3 +++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/UefiPayloadPkg/Include/Guid/AcpiBoardInfoGuid.h
> b/UefiPayloadPkg/Include/Guid/AcpiBoardInfoGuid.h
> index fe783fe5e14c..043b748ae4a9 100644
> --- a/UefiPayloadPkg/Include/Guid/AcpiBoardInfoGuid.h
> +++ b/UefiPayloadPkg/Include/Guid/AcpiBoardInfoGuid.h
> @@ -24,6 +24,7 @@ typedef struct {
>    UINT64             PmTimerRegBase;
> 
>    UINT64             ResetRegAddress;
> 
>    UINT64             PcieBaseAddress;
> 
> +  UINT64             PcieBaseSize;
> 
>  } ACPI_BOARD_INFO;
> 
> 
> 
>  #endif
> 
> diff --git a/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
> b/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
> index 22972453117a..a7e99f9ec6de 100644
> --- a/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
> +++ b/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
> @@ -240,8 +240,10 @@ Done:
>    if (MmCfgHdr != NULL) {
> 
>      MmCfgBase =
> (EFI_ACPI_MEMORY_MAPPED_ENHANCED_CONFIGURATION_SPACE_BASE_AD
> DRESS_ALLOCATION_STRUCTURE *)((UINT8*) MmCfgHdr + sizeof
> (*MmCfgHdr));
> 
>      AcpiBoardInfo->PcieBaseAddress = MmCfgBase->BaseAddress;
> 
> +    AcpiBoardInfo->PcieBaseSize = (MmCfgBase->EndBusNumber + 1 -
> MmCfgBase->StartBusNumber) * 4096 * 32 * 8;
> 
>    } else {
> 
>      AcpiBoardInfo->PcieBaseAddress = 0;
> 
> +    AcpiBoardInfo->PcieBaseSize = 0;
> 
>    }
> 
>    DEBUG ((DEBUG_INFO, "PmCtrl  Reg 0x%lx\n",  AcpiBoardInfo-
> >PmCtrlRegBase));
> 
>    DEBUG ((DEBUG_INFO, "PmTimer Reg 0x%lx\n",  AcpiBoardInfo-
> >PmTimerRegBase));
> 
> @@ -250,6 +252,7 @@ Done:
>    DEBUG ((DEBUG_INFO, "PmEvt   Reg 0x%lx\n",  AcpiBoardInfo->PmEvtBase));
> 
>    DEBUG ((DEBUG_INFO, "PmGpeEn Reg 0x%lx\n",  AcpiBoardInfo-
> >PmGpeEnBase));
> 
>    DEBUG ((DEBUG_INFO, "PcieBaseAddr 0x%lx\n", AcpiBoardInfo-
> >PcieBaseAddress));
> 
> +  DEBUG ((DEBUG_INFO, "PcieBaseSize 0x%lx\n", AcpiBoardInfo-
> >PcieBaseSize));
> 
> 
> 
>    //
> 
>    // Verify values for proper operation
> 
> --
> 2.27.0


  reply	other threads:[~2020-07-27 15:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-27  8:18 [PATCH v4 0/3] UefiPayloadPkg: Runtime MMCONF Marcello Sylvester Bauer
2020-07-27  8:18 ` [PATCH v4 1/3] UefiPayloadPkg: Store the size of the MMCONF window Marcello Sylvester Bauer
2020-07-27 15:40   ` Guo Dong [this message]
2020-07-27  8:18 ` [PATCH v4 2/3] MdePkg/BasePciExpressLib: Support variable size MMCONF Marcello Sylvester Bauer
2020-07-28  1:55   ` Liming Gao
2020-07-29  8:01     ` Marcello Sylvester Bauer
2020-07-31  3:54       ` [edk2-devel] " Liming Gao
2020-07-27  8:18 ` [PATCH v4 3/3] UefiPayloadPkg: Support variable size MMCONF space Marcello Sylvester Bauer

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=BYAPR11MB36227FCB21A123CB4484B5269E720@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