Re: [edk2] [PATCH v3 16/16] ArmPkg: Introduce SCMI protocol

2018-04-23 Thread Girish Pathak
Hi Leif,

> -Original Message-
> From: Leif Lindholm 
> Sent: 23 April 2018 17:22
> To: Girish Pathak 
> Cc: edk2-devel@lists.01.org; ard.biesheu...@linaro.org; Matteo Carlini
> ; Stephanie Hughes-Fitt  f...@arm.com>; nd 
> Subject: Re: [PATCH v3 16/16] ArmPkg: Introduce SCMI protocol
> 
> On Mon, Apr 23, 2018 at 04:06:43PM +, Girish Pathak wrote:
> > > From: Leif Lindholm 
> > > Sent: 23 April 2018 12:32
> > > To: Girish Pathak 
> > > Cc: edk2-devel@lists.01.org; ard.biesheu...@linaro.org; Matteo
> > > Carlini ; Stephanie Hughes-Fitt
> > > ; nd 
> > > Subject: Re: [PATCH v3 16/16] ArmPkg: Introduce SCMI protocol
> > >
> > > Hmm, I did find a few minor things below that I need to hear back on
> > > before pushing.
> >
> > Thanks for your comments, We can incorporate all the changes
> > suggested, shall I tidy this up and resubmit the patch series ?
> 
> Oh God, please don't.
> 
> If you're happy with all of my comments on previous patches, can you just
> say if you're OK with me folding in the below patch into 16/16 before
> pushing?:

Thanks for this, it's ok to fold it.

Regards,
Girish

> 
> From 50294f90db0c3e7b5b19bc2022b5c1d866d0b8e1 Mon Sep 17 00:00:00
> 2001
> From: Leif Lindholm 
> Date: Mon, 23 Apr 2018 12:36:06 +0100
> Subject: [PATCH] fixup scmi
> 
> ---
>  ArmPkg/Drivers/ArmScmiDxe/ArmScmiClockProtocolPrivate.h | 2 +-
>  ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c   | 4 ++--
>  ArmPkg/Drivers/ArmScmiDxe/ScmiPerformanceProtocol.c | 8 
>  3 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/ArmPkg/Drivers/ArmScmiDxe/ArmScmiClockProtocolPrivate.h
> b/ArmPkg/Drivers/ArmScmiDxe/ArmScmiClockProtocolPrivate.h
> index 71245c1647..0d1ec6f5ad 100644
> --- a/ArmPkg/Drivers/ArmScmiDxe/ArmScmiClockProtocolPrivate.h
> +++ b/ArmPkg/Drivers/ArmScmiDxe/ArmScmiClockProtocolPrivate.h
> @@ -30,7 +30,7 @@ typedef struct {
>  #define RATE_FORMAT_SHIFT   12
>  #define RATE_FORMAT_MASK0x0001
>  #define RATE_FORMAT(RatesFlags) ((RatesFlags >> RATE_FORMAT_SHIFT)
> \
> -  & RATE_FORMAT_MASK)
> + & RATE_FORMAT_MASK)
> 
>  // Number of remaining rates after a call to the SCP, RatesFlag Bits[31:16]
>  #define NUM_REMAIN_RATES_SHIFT16
> diff --git a/ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c
> b/ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c
> index fe7edd2a8c..64d2afab72 100644
> --- a/ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c
> +++ b/ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c
> @@ -83,7 +83,7 @@ ClockGetTotalClocks (
> 
>Status = ScmiGetProtocolAttributes (SCMI_PROTOCOL_ID_CLOCK,
> );
>if (EFI_ERROR (Status)) {
> -   return Status;
> +return Status;
>}
> 
>*TotalClocks = SCMI_CLOCK_PROTOCOL_TOTAL_CLKS (ReturnValues[0]);
> @@ -334,7 +334,7 @@ ClockRateGet (
>  return Status;
>}
> 
> -  *Rate = ((UINT64)ClockRate->High << 32) | ClockRate->Low;
> +  *Rate = ConvertTo64Bit (ClockRate->Low, ClockRate->High);
> 
>return EFI_SUCCESS;
>  }
> diff --git a/ArmPkg/Drivers/ArmScmiDxe/ScmiPerformanceProtocol.c
> b/ArmPkg/Drivers/ArmScmiDxe/ScmiPerformanceProtocol.c
> index ac32442ad8..e012424a9b 100644
> --- a/ArmPkg/Drivers/ArmScmiDxe/ScmiPerformanceProtocol.c
> +++ b/ArmPkg/Drivers/ArmScmiDxe/ScmiPerformanceProtocol.c
> @@ -15,9 +15,9 @@
>  DEN0056A_System_Control_and_Management_Interface.pdf
>  **/
> 
> +#include 
>  #include 
>  #include 
> -#include 
> 
>  #include "ArmScmiPerformanceProtocolPrivate.h"
>  #include "ScmiPrivate.h"
> @@ -72,7 +72,7 @@ PerformanceGetAttributes (
>  return Status;
>}
> 
> -  memcpy (
> +  CopyMem (
>  Attributes,
>  ReturnValues,
>  sizeof (SCMI_PERFORMANCE_PROTOCOL_ATTRIBUTES)
> @@ -127,7 +127,7 @@ PerformanceDomainAttributes (
>  return Status;
>}
> 
> -  memcpy (
> +  CopyMem (
>  DomainAttributes,
>  ReturnValues,
>  sizeof (SCMI_PERFORMANCE_DOMAIN_ATTRIBUTES)
> @@ -219,7 +219,7 @@ PerformanceDescribeLevels (
>  }
> 
>  for (LevelNo = 0; LevelNo < ReturnNumLevels; LevelNo++) {
> -   memcpy (
> +   CopyMem (
>   [LevelIndex++],
>   >PerfLevel[LevelNo],
>   sizeof (SCMI_PERFORMANCE_LEVEL)
> --
> 2.11.0

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


Re: [edk2] [PATCH v3 16/16] ArmPkg: Introduce SCMI protocol

2018-04-23 Thread Leif Lindholm
On Mon, Apr 23, 2018 at 04:06:43PM +, Girish Pathak wrote:
> > From: Leif Lindholm 
> > Sent: 23 April 2018 12:32
> > To: Girish Pathak 
> > Cc: edk2-devel@lists.01.org; ard.biesheu...@linaro.org; Matteo Carlini
> > ; Stephanie Hughes-Fitt  > f...@arm.com>; nd 
> > Subject: Re: [PATCH v3 16/16] ArmPkg: Introduce SCMI protocol
> > 
> > Hmm, I did find a few minor things below that I need to hear back on
> > before pushing.
> 
> Thanks for your comments, We can incorporate all the changes
> suggested, shall I tidy this up and resubmit the patch series ?

Oh God, please don't.

If you're happy with all of my comments on previous patches, can you
just say if you're OK with me folding in the below patch into 16/16
before pushing?:

>From 50294f90db0c3e7b5b19bc2022b5c1d866d0b8e1 Mon Sep 17 00:00:00 2001
From: Leif Lindholm 
Date: Mon, 23 Apr 2018 12:36:06 +0100
Subject: [PATCH] fixup scmi

---
 ArmPkg/Drivers/ArmScmiDxe/ArmScmiClockProtocolPrivate.h | 2 +-
 ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c   | 4 ++--
 ArmPkg/Drivers/ArmScmiDxe/ScmiPerformanceProtocol.c | 8 
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/ArmPkg/Drivers/ArmScmiDxe/ArmScmiClockProtocolPrivate.h 
b/ArmPkg/Drivers/ArmScmiDxe/ArmScmiClockProtocolPrivate.h
index 71245c1647..0d1ec6f5ad 100644
--- a/ArmPkg/Drivers/ArmScmiDxe/ArmScmiClockProtocolPrivate.h
+++ b/ArmPkg/Drivers/ArmScmiDxe/ArmScmiClockProtocolPrivate.h
@@ -30,7 +30,7 @@ typedef struct {
 #define RATE_FORMAT_SHIFT   12
 #define RATE_FORMAT_MASK0x0001
 #define RATE_FORMAT(RatesFlags) ((RatesFlags >> RATE_FORMAT_SHIFT)  \
-  & RATE_FORMAT_MASK)
+ & RATE_FORMAT_MASK)
 
 // Number of remaining rates after a call to the SCP, RatesFlag Bits[31:16]
 #define NUM_REMAIN_RATES_SHIFT16
diff --git a/ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c 
b/ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c
index fe7edd2a8c..64d2afab72 100644
--- a/ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c
+++ b/ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c
@@ -83,7 +83,7 @@ ClockGetTotalClocks (
 
   Status = ScmiGetProtocolAttributes (SCMI_PROTOCOL_ID_CLOCK, );
   if (EFI_ERROR (Status)) {
-   return Status;
+return Status;
   }
 
   *TotalClocks = SCMI_CLOCK_PROTOCOL_TOTAL_CLKS (ReturnValues[0]);
@@ -334,7 +334,7 @@ ClockRateGet (
 return Status;
   }
 
-  *Rate = ((UINT64)ClockRate->High << 32) | ClockRate->Low;
+  *Rate = ConvertTo64Bit (ClockRate->Low, ClockRate->High);
 
   return EFI_SUCCESS;
 }
diff --git a/ArmPkg/Drivers/ArmScmiDxe/ScmiPerformanceProtocol.c 
b/ArmPkg/Drivers/ArmScmiDxe/ScmiPerformanceProtocol.c
index ac32442ad8..e012424a9b 100644
--- a/ArmPkg/Drivers/ArmScmiDxe/ScmiPerformanceProtocol.c
+++ b/ArmPkg/Drivers/ArmScmiDxe/ScmiPerformanceProtocol.c
@@ -15,9 +15,9 @@
 DEN0056A_System_Control_and_Management_Interface.pdf
 **/
 
+#include 
 #include 
 #include 
-#include 
 
 #include "ArmScmiPerformanceProtocolPrivate.h"
 #include "ScmiPrivate.h"
@@ -72,7 +72,7 @@ PerformanceGetAttributes (
 return Status;
   }
 
-  memcpy (
+  CopyMem (
 Attributes,
 ReturnValues,
 sizeof (SCMI_PERFORMANCE_PROTOCOL_ATTRIBUTES)
@@ -127,7 +127,7 @@ PerformanceDomainAttributes (
 return Status;
   }
 
-  memcpy (
+  CopyMem (
 DomainAttributes,
 ReturnValues,
 sizeof (SCMI_PERFORMANCE_DOMAIN_ATTRIBUTES)
@@ -219,7 +219,7 @@ PerformanceDescribeLevels (
 }
 
 for (LevelNo = 0; LevelNo < ReturnNumLevels; LevelNo++) {
-   memcpy (
+   CopyMem (
  [LevelIndex++],
  >PerfLevel[LevelNo],
  sizeof (SCMI_PERFORMANCE_LEVEL)
-- 
2.11.0

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


Re: [edk2] [PATCH v3 16/16] ArmPkg: Introduce SCMI protocol

2018-04-23 Thread Girish Pathak
Hi Leif,

> -Original Message-
> From: Leif Lindholm 
> Sent: 23 April 2018 12:32
> To: Girish Pathak 
> Cc: edk2-devel@lists.01.org; ard.biesheu...@linaro.org; Matteo Carlini
> ; Stephanie Hughes-Fitt  f...@arm.com>; nd 
> Subject: Re: [PATCH v3 16/16] ArmPkg: Introduce SCMI protocol
> 
> Hmm, I did find a few minor things below that I need to hear back on
> before pushing.

Thanks for your comments, We can incorporate all the changes suggested, shall I 
tidy this up and resubmit the patch series ?

Regards,
Girish

> 
> On Tue, Mar 20, 2018 at 04:12:12PM +, Girish Pathak wrote:
> > This change introduces a new SCMI protocol driver for
> > Arm systems. The driver currently supports only clock
> > and performance management protocols. Other protocols
> > will be added as and when needed.
> >
> > Clock management protocol is used to configure various clocks
> > available on the platform e.g. HDLCD clock on the Juno platforms.
> >
> > Whereas performance management protocol allows adjustment
> > of various performance domains. Currently this is used to evaluate
> > performance of the Juno platform.
> >
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Girish Pathak 
> > Signed-off-by: Evan Lloyd 
> > ---
> >
> > Notes:
> > v3:
> > - Please rename ArmMtl.h to ArmMtlLibi.h, and
> >   declare it as a library class in the package file.  [Ard]
> >
> >   Done, however ArmMtlLib.h is now part of earlier commit [Girish]
> >
> > - Move ArmScmiDxe to ArmPkg from ArmPlatformPkg   [Ard]
> >
> >   Done[Girish]
> >
> > - Declare gArmScmiBaseProtocolGuid and similar
> >   protocols Guids in ArmPkg.dec   [Ard]
> >
> >   Done[Girish]
> >
> > - Replace flexible array member [] with [1]   [Ard]
> >
> >   Done[Girish]
> >
> > - Move protocol init function which are not part of
> >   of protocol like  ScmiBaseProtocolInit elsewhere[Ard]
> >
> >   Done[Girish]
> >
> > - Please don't put stuff in Include/Drivers.  [Ard]
> >
> >   Moved headers to Include/Protocol.  [Girish]
> >
> >  ArmPkg/ArmPkg.dec |  13 +
> >  ArmPkg/ArmPkg.dsc |   6 +-
> >  ArmPkg/Drivers/ArmScmiDxe/ArmScmiBaseProtocolPrivate.h|  46 ++
> >  ArmPkg/Drivers/ArmScmiDxe/ArmScmiClockProtocolPrivate.h   |  84
> 
> >  ArmPkg/Drivers/ArmScmiDxe/ArmScmiDxe.inf  |  53 +++
> >  ArmPkg/Drivers/ArmScmiDxe/ArmScmiPerformanceProtocolPrivate.h |
> 55 +++
> >  ArmPkg/Drivers/ArmScmiDxe/Scmi.c  | 262 
> > +++
> >  ArmPkg/Drivers/ArmScmiDxe/ScmiBaseProtocol.c  | 318
> ++
> >  ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c | 418
> ++
> >  ArmPkg/Drivers/ArmScmiDxe/ScmiDxe.c   | 138 ++
> >  ArmPkg/Drivers/ArmScmiDxe/ScmiDxe.h   |  41 ++
> >  ArmPkg/Drivers/ArmScmiDxe/ScmiPerformanceProtocol.c   | 457
> 
> >  ArmPkg/Drivers/ArmScmiDxe/ScmiPrivate.h   | 174 
> > 
> >  ArmPkg/Include/Protocol/ArmScmi.h |  27 ++
> >  ArmPkg/Include/Protocol/ArmScmiBaseProtocol.h | 174
> 
> >  ArmPkg/Include/Protocol/ArmScmiClockProtocol.h| 218
> ++
> >  ArmPkg/Include/Protocol/ArmScmiPerformanceProtocol.h  | 265
> 
> >  17 files changed, 2748 insertions(+), 1 deletion(-)
> >
> > diff --git a/ArmPkg/ArmPkg.dec b/ArmPkg/ArmPkg.dec
> > index
> 881751d81c6384a3eb0b4c180c76d01a58266a74..16f7e40046429142b44b52604
> 3b61a3d5e089d2c 100644
> > --- a/ArmPkg/ArmPkg.dec
> > +++ b/ArmPkg/ArmPkg.dec
> > @@ -51,6 +51,19 @@ [Guids.common]
> >
> >gArmGicDxeFileGuid = { 0xde371f7c, 0xdec4, 0x4d21, { 0xad, 0xf1, 0x59,
> 0x3a, 0xbc, 0xc1, 0x58, 0x82 } }
> >
> > +[Protocols.common]
> > +  ## Arm System Control and Management Interface(SCMI) Base protocol
> > +  ## ArmPkg/Include/Protocol/ArmScmiBaseProtocol.h
> > +  gArmScmiBaseProtocolGuid = { 0xd7e5abe9, 0x33ab, 0x418e, { 0x9f, 0x91,
> 0x72, 0xda, 0xe2, 0xba, 0x8e, 0x2f } }
> > +
> > +  ## Arm System Control and Management Interface(SCMI) Clock
> management protocol
> > +  ## ArmPkg/Include/Protocol/ArmScmiClockProtocol.h
> > +  gArmScmiClockProtocolGuid = { 0x91ce67a8, 0xe0aa, 0x4012, { 0xb9, 0x9f,
> 0xb6, 0xfc, 0xf3, 0x4, 0x8e, 0xaa } }
> > +
> > +  ## Arm System Control and 

Re: [edk2] [PATCH v3 16/16] ArmPkg: Introduce SCMI protocol

2018-04-23 Thread Leif Lindholm
Hmm, I did find a few minor things below that I need to hear back on
before pushing.

On Tue, Mar 20, 2018 at 04:12:12PM +, Girish Pathak wrote:
> This change introduces a new SCMI protocol driver for
> Arm systems. The driver currently supports only clock
> and performance management protocols. Other protocols
> will be added as and when needed.
> 
> Clock management protocol is used to configure various clocks
> available on the platform e.g. HDLCD clock on the Juno platforms.
> 
> Whereas performance management protocol allows adjustment
> of various performance domains. Currently this is used to evaluate
> performance of the Juno platform.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Girish Pathak 
> Signed-off-by: Evan Lloyd 
> ---
> 
> Notes:
> v3:
> - Please rename ArmMtl.h to ArmMtlLibi.h, and
>   declare it as a library class in the package file.  [Ard]
> 
>   Done, however ArmMtlLib.h is now part of earlier commit [Girish]
> 
> - Move ArmScmiDxe to ArmPkg from ArmPlatformPkg   [Ard]
> 
>   Done[Girish]
> 
> - Declare gArmScmiBaseProtocolGuid and similar
>   protocols Guids in ArmPkg.dec   [Ard]
> 
>   Done[Girish]
> 
> - Replace flexible array member [] with [1]   [Ard]
> 
>   Done[Girish]
> 
> - Move protocol init function which are not part of
>   of protocol like  ScmiBaseProtocolInit elsewhere[Ard]
> 
>   Done[Girish]
> 
> - Please don't put stuff in Include/Drivers.  [Ard]
> 
>   Moved headers to Include/Protocol.  [Girish]
> 
>  ArmPkg/ArmPkg.dec |  13 +
>  ArmPkg/ArmPkg.dsc |   6 +-
>  ArmPkg/Drivers/ArmScmiDxe/ArmScmiBaseProtocolPrivate.h|  46 ++
>  ArmPkg/Drivers/ArmScmiDxe/ArmScmiClockProtocolPrivate.h   |  84 
>  ArmPkg/Drivers/ArmScmiDxe/ArmScmiDxe.inf  |  53 +++
>  ArmPkg/Drivers/ArmScmiDxe/ArmScmiPerformanceProtocolPrivate.h |  55 +++
>  ArmPkg/Drivers/ArmScmiDxe/Scmi.c  | 262 
> +++
>  ArmPkg/Drivers/ArmScmiDxe/ScmiBaseProtocol.c  | 318 
> ++
>  ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c | 418 
> ++
>  ArmPkg/Drivers/ArmScmiDxe/ScmiDxe.c   | 138 ++
>  ArmPkg/Drivers/ArmScmiDxe/ScmiDxe.h   |  41 ++
>  ArmPkg/Drivers/ArmScmiDxe/ScmiPerformanceProtocol.c   | 457 
> 
>  ArmPkg/Drivers/ArmScmiDxe/ScmiPrivate.h   | 174 
>  ArmPkg/Include/Protocol/ArmScmi.h |  27 ++
>  ArmPkg/Include/Protocol/ArmScmiBaseProtocol.h | 174 
>  ArmPkg/Include/Protocol/ArmScmiClockProtocol.h| 218 
> ++
>  ArmPkg/Include/Protocol/ArmScmiPerformanceProtocol.h  | 265 
> 
>  17 files changed, 2748 insertions(+), 1 deletion(-)
> 
> diff --git a/ArmPkg/ArmPkg.dec b/ArmPkg/ArmPkg.dec
> index 
> 881751d81c6384a3eb0b4c180c76d01a58266a74..16f7e40046429142b44b526043b61a3d5e089d2c
>  100644
> --- a/ArmPkg/ArmPkg.dec
> +++ b/ArmPkg/ArmPkg.dec
> @@ -51,6 +51,19 @@ [Guids.common]
>  
>gArmGicDxeFileGuid = { 0xde371f7c, 0xdec4, 0x4d21, { 0xad, 0xf1, 0x59, 
> 0x3a, 0xbc, 0xc1, 0x58, 0x82 } }
>  
> +[Protocols.common]
> +  ## Arm System Control and Management Interface(SCMI) Base protocol
> +  ## ArmPkg/Include/Protocol/ArmScmiBaseProtocol.h
> +  gArmScmiBaseProtocolGuid = { 0xd7e5abe9, 0x33ab, 0x418e, { 0x9f, 0x91, 
> 0x72, 0xda, 0xe2, 0xba, 0x8e, 0x2f } }
> +
> +  ## Arm System Control and Management Interface(SCMI) Clock management 
> protocol
> +  ## ArmPkg/Include/Protocol/ArmScmiClockProtocol.h
> +  gArmScmiClockProtocolGuid = { 0x91ce67a8, 0xe0aa, 0x4012, { 0xb9, 0x9f, 
> 0xb6, 0xfc, 0xf3, 0x4, 0x8e, 0xaa } }
> +
> +  ## Arm System Control and Management Interface(SCMI) Clock management 
> protocol
> +  ## ArmPkg/Include/Protocol/ArmScmiPerformanceProtocol.h
> +  gArmScmiPerformanceProtocolGuid = { 0x9b8ba84, 0x3dd3, 0x49a6, { 0xa0, 
> 0x5a, 0x31, 0x34, 0xa5, 0xf0, 0x7b, 0xad } }
> +
>  [Ppis]
>## Include/Ppi/ArmMpCoreInfo.h
>gArmMpCoreInfoPpiGuid = { 0x6847cc74, 0xe9ec, 0x4f8f, {0xa2, 0x9d, 0xab, 
> 0x44, 0xe7, 0x54, 0xa8, 0xfc} }
> diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc
> index 
> 526909458e0d80dbc5a65c8ad12ec1095dda48d2..22332090db7111e0668607a16288cefc1bace926
>  100644
> --- a/ArmPkg/ArmPkg.dsc
> +++ b/ArmPkg/ArmPkg.dsc
> @@ -2,7 +2,7 @@
>  # ARM 

Re: [edk2] [PATCH v3 16/16] ArmPkg: Introduce SCMI protocol

2018-03-21 Thread Evan Lloyd
Reviewed-by: Evan Lloyd 

> -Original Message-
> From: edk2-devel  On Behalf Of Girish
> Pathak
> Sent: 20 March 2018 16:12
> To: edk2-devel@lists.01.org
> Cc: nd ; Stephanie Hughes-Fitt  f...@arm.com>; leif.lindh...@linaro.org; ard.biesheu...@linaro.org
> Subject: [edk2] [PATCH v3 16/16] ArmPkg: Introduce SCMI protocol
> 
> This change introduces a new SCMI protocol driver for
> Arm systems. The driver currently supports only clock
> and performance management protocols. Other protocols
> will be added as and when needed.
> 
> Clock management protocol is used to configure various clocks
> available on the platform e.g. HDLCD clock on the Juno platforms.
> 
> Whereas performance management protocol allows adjustment
> of various performance domains. Currently this is used to evaluate
> performance of the Juno platform.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Girish Pathak 
> Signed-off-by: Evan Lloyd 
> ---
> 
> Notes:
> v3:
> - Please rename ArmMtl.h to ArmMtlLibi.h, and
>   declare it as a library class in the package file.  [Ard]
> 
>   Done, however ArmMtlLib.h is now part of earlier commit [Girish]
> 
> - Move ArmScmiDxe to ArmPkg from ArmPlatformPkg   [Ard]
> 
>   Done[Girish]
> 
> - Declare gArmScmiBaseProtocolGuid and similar
>   protocols Guids in ArmPkg.dec   [Ard]
> 
>   Done[Girish]
> 
> - Replace flexible array member [] with [1]   [Ard]
> 
>   Done[Girish]
> 
> - Move protocol init function which are not part of
>   of protocol like  ScmiBaseProtocolInit elsewhere[Ard]
> 
>   Done[Girish]
> 
> - Please don't put stuff in Include/Drivers.  [Ard]
> 
>   Moved headers to Include/Protocol.  [Girish]
> 
>  ArmPkg/ArmPkg.dec |  13 +
>  ArmPkg/ArmPkg.dsc |   6 +-
>  ArmPkg/Drivers/ArmScmiDxe/ArmScmiBaseProtocolPrivate.h|  46 ++
>  ArmPkg/Drivers/ArmScmiDxe/ArmScmiClockProtocolPrivate.h   |  84
> 
>  ArmPkg/Drivers/ArmScmiDxe/ArmScmiDxe.inf  |  53 +++
>  ArmPkg/Drivers/ArmScmiDxe/ArmScmiPerformanceProtocolPrivate.h |  55
> +++
>  ArmPkg/Drivers/ArmScmiDxe/Scmi.c  | 262 
> +++
>  ArmPkg/Drivers/ArmScmiDxe/ScmiBaseProtocol.c  | 318
> ++
>  ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c | 418
> ++
>  ArmPkg/Drivers/ArmScmiDxe/ScmiDxe.c   | 138 ++
>  ArmPkg/Drivers/ArmScmiDxe/ScmiDxe.h   |  41 ++
>  ArmPkg/Drivers/ArmScmiDxe/ScmiPerformanceProtocol.c   | 457
> 
>  ArmPkg/Drivers/ArmScmiDxe/ScmiPrivate.h   | 174 
>  ArmPkg/Include/Protocol/ArmScmi.h |  27 ++
>  ArmPkg/Include/Protocol/ArmScmiBaseProtocol.h | 174
> 
>  ArmPkg/Include/Protocol/ArmScmiClockProtocol.h| 218
> ++
>  ArmPkg/Include/Protocol/ArmScmiPerformanceProtocol.h  | 265
> 
>  17 files changed, 2748 insertions(+), 1 deletion(-)
> 
> diff --git a/ArmPkg/ArmPkg.dec b/ArmPkg/ArmPkg.dec
> index
> 881751d81c6384a3eb0b4c180c76d01a58266a74..16f7e40046429142b44
> b526043b61a3d5e089d2c 100644
> --- a/ArmPkg/ArmPkg.dec
> +++ b/ArmPkg/ArmPkg.dec
> @@ -51,6 +51,19 @@ [Guids.common]
> 
>gArmGicDxeFileGuid = { 0xde371f7c, 0xdec4, 0x4d21, { 0xad, 0xf1, 0x59,
> 0x3a, 0xbc, 0xc1, 0x58, 0x82 } }
> 
> +[Protocols.common]
> +  ## Arm System Control and Management Interface(SCMI) Base protocol
> +  ## ArmPkg/Include/Protocol/ArmScmiBaseProtocol.h
> +  gArmScmiBaseProtocolGuid = { 0xd7e5abe9, 0x33ab, 0x418e, { 0x9f,
> 0x91, 0x72, 0xda, 0xe2, 0xba, 0x8e, 0x2f } }
> +
> +  ## Arm System Control and Management Interface(SCMI) Clock
> management protocol
> +  ## ArmPkg/Include/Protocol/ArmScmiClockProtocol.h
> +  gArmScmiClockProtocolGuid = { 0x91ce67a8, 0xe0aa, 0x4012, { 0xb9,
> 0x9f, 0xb6, 0xfc, 0xf3, 0x4, 0x8e, 0xaa } }
> +
> +  ## Arm System Control and Management Interface(SCMI) Clock
> management protocol
> +  ## ArmPkg/Include/Protocol/ArmScmiPerformanceProtocol.h
> +  gArmScmiPerformanceProtocolGuid = { 0x9b8ba84, 0x3dd3, 0x49a6,
> { 0xa0, 0x5a, 0x31, 0x34, 0xa5, 0xf0, 0x7b, 0xad } }
> +
>  [Ppis]
>## Include/Ppi/ArmMpCoreInfo.h
>gArmMpCoreInfoPpiGuid = { 0x6847cc74, 0xe9ec, 0x4f8f, {0xa2, 0x9d,
> 0xab, 0x44, 0xe7, 0x54, 0xa8, 0xfc} }
> diff --git a/ArmPkg/ArmPkg.dsc