[edk2,edk2-platforms,v1,07/16] Hisilicon/D0x: Rename StartupAp() function

Message ID 20190201133436.10500-8-ming.huang@linaro.org
State Superseded
Headers show
Series
  • Fix issues and improve D0x
Related show

Commit Message

Ming Huang Feb. 1, 2019, 1:34 p.m.
As suggestion of community, 'AP' is a bit unfortunate to use in EDK2
context. PI specifies 'BSP' for Boot-strap Processor, as the one
executing all of the EDK2 code. It then uses 'AP' to refer to
Additional Processors, which can be assigned tasks using the
EFI_MP_SERVICES_PROTOCOL. In a TianoCore context, this should be 'BSP'.
So, Rename StartupAp() to StartUpBSP.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ming Huang <ming.huang@linaro.org>

---
 Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h           | 2 +-
 Platform/Hisilicon/D03/EarlyConfigPeim/EarlyConfigPeimD03.c      | 2 +-
 Platform/Hisilicon/D03/Library/OemMiscLib2P/OemMiscLib2PHi1610.c | 2 +-
 Platform/Hisilicon/D05/EarlyConfigPeim/EarlyConfigPeimD05.c      | 2 +-
 Platform/Hisilicon/D05/Library/OemMiscLibD05/OemMiscLibD05.c     | 3 ++-
 Platform/Hisilicon/D06/EarlyConfigPeim/EarlyConfigPeimD06.c      | 2 +-
 6 files changed, 7 insertions(+), 6 deletions(-)

-- 
2.9.5

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Comments

Leif Lindholm Feb. 11, 2019, 6:04 p.m. | #1
On Fri, Feb 01, 2019 at 09:34:27PM +0800, Ming Huang wrote:
> As suggestion of community, 'AP' is a bit unfortunate to use in EDK2

> context. PI specifies 'BSP' for Boot-strap Processor, as the one

> executing all of the EDK2 code. It then uses 'AP' to refer to

> Additional Processors, which can be assigned tasks using the

> EFI_MP_SERVICES_PROTOCOL. In a TianoCore context, this should be 'BSP'.

> So, Rename StartupAp() to StartUpBSP.

> 

> Contributed-under: TianoCore Contribution Agreement 1.1

> Signed-off-by: Ming Huang <ming.huang@linaro.org>


Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>


Thanks!

> ---

>  Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h           | 2 +-

>  Platform/Hisilicon/D03/EarlyConfigPeim/EarlyConfigPeimD03.c      | 2 +-

>  Platform/Hisilicon/D03/Library/OemMiscLib2P/OemMiscLib2PHi1610.c | 2 +-

>  Platform/Hisilicon/D05/EarlyConfigPeim/EarlyConfigPeimD05.c      | 2 +-

>  Platform/Hisilicon/D05/Library/OemMiscLibD05/OemMiscLibD05.c     | 3 ++-

>  Platform/Hisilicon/D06/EarlyConfigPeim/EarlyConfigPeimD06.c      | 2 +-

>  6 files changed, 7 insertions(+), 6 deletions(-)

> 

> diff --git a/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h b/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h

> index a232e52ed719..712b77c44fc8 100644

> --- a/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h

> +++ b/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h

> @@ -76,7 +76,7 @@ VOID MN_CONFIG (VOID);

>  VOID SmmuConfigForOS (VOID);

>  VOID SmmuConfigForBios (VOID);

>  

> -VOID StartupAp (VOID);

> +VOID StartUpBSP (VOID);

>  

>  VOID LlcCleanInvalidate (VOID);

>  

> diff --git a/Platform/Hisilicon/D03/EarlyConfigPeim/EarlyConfigPeimD03.c b/Platform/Hisilicon/D03/EarlyConfigPeim/EarlyConfigPeimD03.c

> index 97cf6b8d8757..dacd9e871faf 100644

> --- a/Platform/Hisilicon/D03/EarlyConfigPeim/EarlyConfigPeimD03.c

> +++ b/Platform/Hisilicon/D03/EarlyConfigPeim/EarlyConfigPeimD03.c

> @@ -83,7 +83,7 @@ void QResetAp(VOID)

>      //SCCL A

>      if (!PcdGet64 (PcdTrustedFirmwareEnable))

>      {

> -        StartupAp();

> +        StartUpBSP ();

>      }

>  }

>  

> diff --git a/Platform/Hisilicon/D03/Library/OemMiscLib2P/OemMiscLib2PHi1610.c b/Platform/Hisilicon/D03/Library/OemMiscLib2P/OemMiscLib2PHi1610.c

> index b57fdfa68e45..c8a9da73bbca 100644

> --- a/Platform/Hisilicon/D03/Library/OemMiscLib2P/OemMiscLib2PHi1610.c

> +++ b/Platform/Hisilicon/D03/Library/OemMiscLib2P/OemMiscLib2PHi1610.c

> @@ -133,7 +133,7 @@ VOID CoreSelectBoot(VOID)

>  {

>      if (!PcdGet64 (PcdTrustedFirmwareEnable))

>      {

> -        StartupAp ();

> +        StartUpBSP ();

>      }

>  

>      return;

> diff --git a/Platform/Hisilicon/D05/EarlyConfigPeim/EarlyConfigPeimD05.c b/Platform/Hisilicon/D05/EarlyConfigPeim/EarlyConfigPeimD05.c

> index 76a055cbe980..b374347e5c4d 100644

> --- a/Platform/Hisilicon/D05/EarlyConfigPeim/EarlyConfigPeimD05.c

> +++ b/Platform/Hisilicon/D05/EarlyConfigPeim/EarlyConfigPeimD05.c

> @@ -35,7 +35,7 @@ QResetAp (

>    (VOID)WriteBackInvalidateDataCacheRange((VOID *) FixedPcdGet64(PcdMailBoxAddress), 8);

>  

>    if (!PcdGet64 (PcdTrustedFirmwareEnable)) {

> -    StartupAp();

> +    StartUpBSP ();

>    }

>  }

>  

> diff --git a/Platform/Hisilicon/D05/Library/OemMiscLibD05/OemMiscLibD05.c b/Platform/Hisilicon/D05/Library/OemMiscLibD05/OemMiscLibD05.c

> index 4c4c944dbead..a1458da7f0a3 100644

> --- a/Platform/Hisilicon/D05/Library/OemMiscLibD05/OemMiscLibD05.c

> +++ b/Platform/Hisilicon/D05/Library/OemMiscLibD05/OemMiscLibD05.c

> @@ -96,7 +96,7 @@ UINTN OemGetDimmSlot(UINTN Socket, UINTN Channel)

>  VOID CoreSelectBoot(VOID)

>  {

>    if (!PcdGet64 (PcdTrustedFirmwareEnable)) {

> -      StartupAp ();

> +      StartUpBSP ();

>    }

>  

>    return;

> @@ -128,3 +128,4 @@ BOOLEAN OemIsNeedDisableExpanderBuffer(VOID)

>  {

>    return TRUE;

>  }

> +

> diff --git a/Platform/Hisilicon/D06/EarlyConfigPeim/EarlyConfigPeimD06.c b/Platform/Hisilicon/D06/EarlyConfigPeim/EarlyConfigPeimD06.c

> index 0790f7941ae7..a8261d370626 100644

> --- a/Platform/Hisilicon/D06/EarlyConfigPeim/EarlyConfigPeimD06.c

> +++ b/Platform/Hisilicon/D06/EarlyConfigPeim/EarlyConfigPeimD06.c

> @@ -78,7 +78,7 @@ QResetAp (

>  

>    //SCCL A

>    if (!PcdGet64 (PcdTrustedFirmwareEnable)) {

> -    StartupAp ();

> +    StartUpBSP ();

>    }

>  }

>  

> -- 

> 2.9.5

> 

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Patch

diff --git a/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h b/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h
index a232e52ed719..712b77c44fc8 100644
--- a/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h
+++ b/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h
@@ -76,7 +76,7 @@  VOID MN_CONFIG (VOID);
 VOID SmmuConfigForOS (VOID);
 VOID SmmuConfigForBios (VOID);
 
-VOID StartupAp (VOID);
+VOID StartUpBSP (VOID);
 
 VOID LlcCleanInvalidate (VOID);
 
diff --git a/Platform/Hisilicon/D03/EarlyConfigPeim/EarlyConfigPeimD03.c b/Platform/Hisilicon/D03/EarlyConfigPeim/EarlyConfigPeimD03.c
index 97cf6b8d8757..dacd9e871faf 100644
--- a/Platform/Hisilicon/D03/EarlyConfigPeim/EarlyConfigPeimD03.c
+++ b/Platform/Hisilicon/D03/EarlyConfigPeim/EarlyConfigPeimD03.c
@@ -83,7 +83,7 @@  void QResetAp(VOID)
     //SCCL A
     if (!PcdGet64 (PcdTrustedFirmwareEnable))
     {
-        StartupAp();
+        StartUpBSP ();
     }
 }
 
diff --git a/Platform/Hisilicon/D03/Library/OemMiscLib2P/OemMiscLib2PHi1610.c b/Platform/Hisilicon/D03/Library/OemMiscLib2P/OemMiscLib2PHi1610.c
index b57fdfa68e45..c8a9da73bbca 100644
--- a/Platform/Hisilicon/D03/Library/OemMiscLib2P/OemMiscLib2PHi1610.c
+++ b/Platform/Hisilicon/D03/Library/OemMiscLib2P/OemMiscLib2PHi1610.c
@@ -133,7 +133,7 @@  VOID CoreSelectBoot(VOID)
 {
     if (!PcdGet64 (PcdTrustedFirmwareEnable))
     {
-        StartupAp ();
+        StartUpBSP ();
     }
 
     return;
diff --git a/Platform/Hisilicon/D05/EarlyConfigPeim/EarlyConfigPeimD05.c b/Platform/Hisilicon/D05/EarlyConfigPeim/EarlyConfigPeimD05.c
index 76a055cbe980..b374347e5c4d 100644
--- a/Platform/Hisilicon/D05/EarlyConfigPeim/EarlyConfigPeimD05.c
+++ b/Platform/Hisilicon/D05/EarlyConfigPeim/EarlyConfigPeimD05.c
@@ -35,7 +35,7 @@  QResetAp (
   (VOID)WriteBackInvalidateDataCacheRange((VOID *) FixedPcdGet64(PcdMailBoxAddress), 8);
 
   if (!PcdGet64 (PcdTrustedFirmwareEnable)) {
-    StartupAp();
+    StartUpBSP ();
   }
 }
 
diff --git a/Platform/Hisilicon/D05/Library/OemMiscLibD05/OemMiscLibD05.c b/Platform/Hisilicon/D05/Library/OemMiscLibD05/OemMiscLibD05.c
index 4c4c944dbead..a1458da7f0a3 100644
--- a/Platform/Hisilicon/D05/Library/OemMiscLibD05/OemMiscLibD05.c
+++ b/Platform/Hisilicon/D05/Library/OemMiscLibD05/OemMiscLibD05.c
@@ -96,7 +96,7 @@  UINTN OemGetDimmSlot(UINTN Socket, UINTN Channel)
 VOID CoreSelectBoot(VOID)
 {
   if (!PcdGet64 (PcdTrustedFirmwareEnable)) {
-      StartupAp ();
+      StartUpBSP ();
   }
 
   return;
@@ -128,3 +128,4 @@  BOOLEAN OemIsNeedDisableExpanderBuffer(VOID)
 {
   return TRUE;
 }
+
diff --git a/Platform/Hisilicon/D06/EarlyConfigPeim/EarlyConfigPeimD06.c b/Platform/Hisilicon/D06/EarlyConfigPeim/EarlyConfigPeimD06.c
index 0790f7941ae7..a8261d370626 100644
--- a/Platform/Hisilicon/D06/EarlyConfigPeim/EarlyConfigPeimD06.c
+++ b/Platform/Hisilicon/D06/EarlyConfigPeim/EarlyConfigPeimD06.c
@@ -78,7 +78,7 @@  QResetAp (
 
   //SCCL A
   if (!PcdGet64 (PcdTrustedFirmwareEnable)) {
-    StartupAp ();
+    StartUpBSP ();
   }
 }