public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Leif Lindholm" <quic_llindhol@quicinc.com>
To: Ard Biesheuvel <ardb+git@google.com>
Cc: <devel@edk2.groups.io>, Ard Biesheuvel <ardb@kernel.org>
Subject: Re: [edk2-devel] [PATCH edk2-platforms 1/1] Platform AARCH64: Drop bogus local copy of gArmMpCoreInfoPpiGuid GUID
Date: Tue, 30 Jul 2024 13:45:29 +0100	[thread overview]
Message-ID: <Zqjgaf3x/y2V/PYD@qc-i7.hemma.eciton.net> (raw)
In-Reply-To: <20240729131600.435025-1-ardb+git@google.com>

On Mon, Jul 29, 2024 at 15:16:00 +0200, Ard Biesheuvel wrote:
> From: Ard Biesheuvel <ardb@kernel.org>
> 
> There is a pattern that has been copy-pasted a number of times where a
> missing references in the INFs [Ppis] section is 'fixed' by creating a
> local GUID variable.

Eew.

> Fix all of those.
> 
> This is just a janitorial patch with no functional changes so fixing all
> of these in one go.
> 
> Cc: Leif Lindholm <quic_llindhol@quicinc.com>
> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>

Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
Thanks!

/
    Leif

> ---
>  Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKeyLib.inf                  | 3 +++
>  Platform/Hisilicon/HiKey960/Library/HiKey960Lib/HiKey960Lib.inf         | 3 +++
>  Silicon/Ampere/AmpereAltraPkg/Library/ArmPlatformLib/ArmPlatformLib.inf | 3 +++
>  Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLib.inf    | 3 +++
>  Silicon/Phytium/FT2000-4Pkg/Library/PlatformLib/PlatformLib.inf         | 3 +++
>  Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKey.c                       | 4 +---
>  Platform/Hisilicon/HiKey960/Library/HiKey960Lib/HiKey960.c              | 4 +---
>  Silicon/Ampere/AmpereAltraPkg/Library/ArmPlatformLib/ArmPlatformLib.c   | 4 +---
>  Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLib.c      | 4 +---
>  Silicon/Phytium/FT2000-4Pkg/Library/PlatformLib/PlatformLib.c           | 7 +------
>  10 files changed, 20 insertions(+), 18 deletions(-)
> 
> diff --git a/Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKeyLib.inf b/Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKeyLib.inf
> index 18b74bc42ef4..2a6ae8a4bb9f 100644
> --- a/Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKeyLib.inf
> +++ b/Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKeyLib.inf
> @@ -35,6 +35,9 @@ [Sources.common]
>  [Sources.AARCH64]
>    HiKeyHelper.S
>  
> +[Ppis]
> +  gArmMpCoreInfoPpiGuid
> +
>  [FixedPcd]
>    gArmTokenSpaceGuid.PcdArmPrimaryCore
>    gArmTokenSpaceGuid.PcdArmPrimaryCoreMask
> diff --git a/Platform/Hisilicon/HiKey960/Library/HiKey960Lib/HiKey960Lib.inf b/Platform/Hisilicon/HiKey960/Library/HiKey960Lib/HiKey960Lib.inf
> index 81167c76f95c..5ccf4a11d5e2 100644
> --- a/Platform/Hisilicon/HiKey960/Library/HiKey960Lib/HiKey960Lib.inf
> +++ b/Platform/Hisilicon/HiKey960/Library/HiKey960Lib/HiKey960Lib.inf
> @@ -31,6 +31,9 @@ [Sources.common]
>    HiKey960Helper.S
>    HiKey960Mem.c
>  
> +[Ppis]
> +  gArmMpCoreInfoPpiGuid
> +
>  [FixedPcd]
>    gArmTokenSpaceGuid.PcdArmPrimaryCore
>    gArmTokenSpaceGuid.PcdArmPrimaryCoreMask
> diff --git a/Silicon/Ampere/AmpereAltraPkg/Library/ArmPlatformLib/ArmPlatformLib.inf b/Silicon/Ampere/AmpereAltraPkg/Library/ArmPlatformLib/ArmPlatformLib.inf
> index a61da278c705..ffeb28d8a901 100644
> --- a/Silicon/Ampere/AmpereAltraPkg/Library/ArmPlatformLib/ArmPlatformLib.inf
> +++ b/Silicon/Ampere/AmpereAltraPkg/Library/ArmPlatformLib/ArmPlatformLib.inf
> @@ -37,6 +37,9 @@ [Packages]
>    Silicon/Ampere/AmpereAltraPkg/AmpereAltraPkg.dec
>    Silicon/Ampere/AmpereSiliconPkg/AmpereSiliconPkg.dec
>  
> +[Ppis]
> +  gArmMpCoreInfoPpiGuid
> +
>  [Pcd]
>    gArmTokenSpaceGuid.PcdMmBufferBase
>    gArmTokenSpaceGuid.PcdMmBufferSize
> diff --git a/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLib.inf b/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLib.inf
> index 83c3f4bf193f..2ab649019aa0 100644
> --- a/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLib.inf
> +++ b/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLib.inf
> @@ -39,6 +39,9 @@ [Sources.common]
>  [Sources.AARCH64]
>    AArch64/Helper.S
>  
> +[Ppis]
> +  gArmMpCoreInfoPpiGuid
> +
>  [FixedPcd]
>    gArmTokenSpaceGuid.PcdSystemMemoryBase
>    gArmTokenSpaceGuid.PcdSystemMemorySize
> diff --git a/Silicon/Phytium/FT2000-4Pkg/Library/PlatformLib/PlatformLib.inf b/Silicon/Phytium/FT2000-4Pkg/Library/PlatformLib/PlatformLib.inf
> index 11134b8fc497..c7b3368ac9e1 100644
> --- a/Silicon/Phytium/FT2000-4Pkg/Library/PlatformLib/PlatformLib.inf
> +++ b/Silicon/Phytium/FT2000-4Pkg/Library/PlatformLib/PlatformLib.inf
> @@ -35,6 +35,9 @@ [Sources.AARCH64]
>  
>  [Guids]
>  
> +[Ppis]
> +  gArmMpCoreInfoPpiGuid
> +
>  [FixedPcd]
>    gPhytiumPlatformTokenSpaceGuid.PcdSystemIoBase
>    gPhytiumPlatformTokenSpaceGuid.PcdSystemIoSize
> diff --git a/Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKey.c b/Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKey.c
> index 801d63398524..057d566bde67 100644
> --- a/Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKey.c
> +++ b/Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKey.c
> @@ -117,14 +117,12 @@ PrePeiCoreGetMpCoreInfo (
>    return EFI_SUCCESS;
>  }
>  
> -// Needs to be declared in the file. Otherwise gArmMpCoreInfoPpiGuid is undefined in the contect of PrePeiCore
> -EFI_GUID mArmMpCoreInfoPpiGuid = ARM_MP_CORE_INFO_PPI_GUID;
>  ARM_MP_CORE_INFO_PPI mMpCoreInfoPpi = { PrePeiCoreGetMpCoreInfo };
>  
>  EFI_PEI_PPI_DESCRIPTOR      gPlatformPpiTable[] = {
>    {
>      EFI_PEI_PPI_DESCRIPTOR_PPI,
> -    &mArmMpCoreInfoPpiGuid,
> +    &gArmMpCoreInfoPpiGuid,
>      &mMpCoreInfoPpi
>    }
>  };
> diff --git a/Platform/Hisilicon/HiKey960/Library/HiKey960Lib/HiKey960.c b/Platform/Hisilicon/HiKey960/Library/HiKey960Lib/HiKey960.c
> index 89cca920ad8d..d7f65420a593 100644
> --- a/Platform/Hisilicon/HiKey960/Library/HiKey960Lib/HiKey960.c
> +++ b/Platform/Hisilicon/HiKey960/Library/HiKey960Lib/HiKey960.c
> @@ -115,14 +115,12 @@ PrePeiCoreGetMpCoreInfo (
>    return EFI_SUCCESS;
>  }
>  
> -// Needs to be declared in the file. Otherwise gArmMpCoreInfoPpiGuid is undefined in the contect of PrePeiCore
> -EFI_GUID mArmMpCoreInfoPpiGuid = ARM_MP_CORE_INFO_PPI_GUID;
>  ARM_MP_CORE_INFO_PPI mMpCoreInfoPpi = { PrePeiCoreGetMpCoreInfo };
>  
>  EFI_PEI_PPI_DESCRIPTOR      gPlatformPpiTable[] = {
>    {
>      EFI_PEI_PPI_DESCRIPTOR_PPI,
> -    &mArmMpCoreInfoPpiGuid,
> +    &gArmMpCoreInfoPpiGuid,
>      &mMpCoreInfoPpi
>    }
>  };
> diff --git a/Silicon/Ampere/AmpereAltraPkg/Library/ArmPlatformLib/ArmPlatformLib.c b/Silicon/Ampere/AmpereAltraPkg/Library/ArmPlatformLib/ArmPlatformLib.c
> index f2ec923d6f8d..84104213d68b 100644
> --- a/Silicon/Ampere/AmpereAltraPkg/Library/ArmPlatformLib/ArmPlatformLib.c
> +++ b/Silicon/Ampere/AmpereAltraPkg/Library/ArmPlatformLib/ArmPlatformLib.c
> @@ -125,14 +125,12 @@ PrePeiCoreGetMpCoreInfo (
>    return EFI_SUCCESS;
>  }
>  
> -// Needs to be declared in the file. Otherwise gArmMpCoreInfoPpiGuid is undefined in the contect of PrePeiCore
> -EFI_GUID             mArmMpCoreInfoPpiGuid = ARM_MP_CORE_INFO_PPI_GUID;
>  ARM_MP_CORE_INFO_PPI mMpCoreInfoPpi = { PrePeiCoreGetMpCoreInfo };
>  
>  EFI_PEI_PPI_DESCRIPTOR gPlatformPpiTable[] = {
>    {
>      EFI_PEI_PPI_DESCRIPTOR_PPI,
> -    &mArmMpCoreInfoPpiGuid,
> +    &gArmMpCoreInfoPpiGuid,
>      &mMpCoreInfoPpi
>    },
>  };
> diff --git a/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLib.c b/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLib.c
> index 0a00cd9d3e3b..070bd0a7f5dc 100644
> --- a/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLib.c
> +++ b/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLib.c
> @@ -59,14 +59,12 @@ PrePeiCoreGetMpCoreInfo (
>    return EFI_UNSUPPORTED;
>  }
>  
> -// Needs to be declared in the file. Otherwise gArmMpCoreInfoPpiGuid is undefined in the contect of PrePeiCore
> -EFI_GUID mArmMpCoreInfoPpiGuid = ARM_MP_CORE_INFO_PPI_GUID;
>  ARM_MP_CORE_INFO_PPI mMpCoreInfoPpi = { PrePeiCoreGetMpCoreInfo };
>  
>  EFI_PEI_PPI_DESCRIPTOR      gPlatformPpiTable[] = {
>    {
>      EFI_PEI_PPI_DESCRIPTOR_PPI,
> -    &mArmMpCoreInfoPpiGuid,
> +    &gArmMpCoreInfoPpiGuid,
>      &mMpCoreInfoPpi
>    }
>  };
> diff --git a/Silicon/Phytium/FT2000-4Pkg/Library/PlatformLib/PlatformLib.c b/Silicon/Phytium/FT2000-4Pkg/Library/PlatformLib/PlatformLib.c
> index a192797d1cfa..7338fe53d6c0 100644
> --- a/Silicon/Phytium/FT2000-4Pkg/Library/PlatformLib/PlatformLib.c
> +++ b/Silicon/Phytium/FT2000-4Pkg/Library/PlatformLib/PlatformLib.c
> @@ -100,18 +100,13 @@ PrePeiCoreGetMpCoreInfo (
>    return EFI_SUCCESS;
>  }
>  
> -//
> -// Needs to be declared in the file. Otherwise gArmMpCoreInfoPpiGuid is
> -// undefined in the contect of PrePeiCore
> -//
> -EFI_GUID mArmMpCoreInfoPpiGuid = ARM_MP_CORE_INFO_PPI_GUID;
>  ARM_MP_CORE_INFO_PPI mMpCoreInfoPpi = { PrePeiCoreGetMpCoreInfo };
>  
>  EFI_PEI_PPI_DESCRIPTOR gPlatformPpiTable[] =
>  {
>    {
>      EFI_PEI_PPI_DESCRIPTOR_PPI,
> -    &mArmMpCoreInfoPpiGuid,
> +    &gArmMpCoreInfoPpiGuid,
>      &mMpCoreInfoPpi
>    }
>  };
> -- 
> 2.46.0.rc1.232.g9752f9e123-goog
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#120077): https://edk2.groups.io/g/devel/message/120077
Mute This Topic: https://groups.io/mt/107626562/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2024-07-30 12:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-29 13:16 [edk2-devel] [PATCH edk2-platforms 1/1] Platform AARCH64: Drop bogus local copy of gArmMpCoreInfoPpiGuid GUID Ard Biesheuvel via groups.io
2024-07-30 12:45 ` Leif Lindholm [this message]
2024-07-30 15:40   ` Ard Biesheuvel

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=Zqjgaf3x/y2V/PYD@qc-i7.hemma.eciton.net \
    --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