public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Sami Mujawar" <sami.mujawar@arm.com>
To: Pranav Madhu <pranav.madhu@arm.com>, devel@edk2.groups.io
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>, nd@arm.com
Subject: Re: [edk2-platforms][PATCH V1 10/17] Platform/Sgi: Macro definitions for ACPI CPPC
Date: Mon, 10 May 2021 10:12:31 +0100	[thread overview]
Message-ID: <075667e8-b943-1e5e-2a7a-e81f4ed12d1c@arm.com> (raw)
In-Reply-To: <20210428123600.2385-11-pranav.madhu@arm.com>

Hi Pranav,

Please find my response inline marked [SAMI].

Regards,

Sami Mujawar


On 28/04/2021 01:35 PM, Pranav Madhu wrote:
> Add helper macros required for use with ACPI collaborative processor
> performance control (CPPC). This patch adds macros for initializing ACPI
> _CPC and _PSD control method. The CPC initializer macro initializes _CPC
> control method with revision 3 as specified in Arm FFH specification
> 1.1. The CPC initilizer exposes the reference performance counter and
> delivered perfrmance counter (AMU registers) as FFixedHW registers. The
> initilizer also expose the fastchannel memories for performance level
> set performance limit set protocols as desired performance register and
> performance limited register respectively.
>
> Signed-off-by: Pranav Madhu <pranav.madhu@arm.com>
> ---
>   Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h | 53 ++++++++++++++++++++
>   1 file changed, 53 insertions(+)
>
> diff --git a/Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h b/Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h
> index 4977d4d898aa..1b5305f15fb8 100644
> --- a/Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h
> +++ b/Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h
> @@ -423,4 +423,57 @@ typedef struct {
>       LineSize                                          /* Line size in bytes */ \
>     }
>   
> +// CPPC _CPC object initialization
> +#define CPPC_PACKAGE_INIT(DesiredPerfReg, PerfLimitedReg, GranularityMHz,      \
> +  HighestPerf, NominalPerf, LowestNonlinearPerf, LowestPerf, RefPerf)          \
[SAMI] I think it would be good to add a coment in the macro header 
clarifying that this macro is intended to be used in ASL definitition.
The same would apply for the following macro.
Alternatively, you could introduce a new header file for the ASL macro 
definitions SgiAslHeader.h. What do you think ?
[/SAMI]
> +  {                                                                            \
> +    23,                                 /* NumEntries */                       \
> +    3,                                  /* Revision */                         \
> +    HighestPerf,                        /* Highest Performance */              \
> +    NominalPerf,                        /* Nominal Performance */              \
> +    LowestNonlinearPerf,                /* Lowest Nonlinear Performance */     \
> +    LowestPerf,                         /* Lowest Performance */               \
> +    /* Guaranteed Performance Register */                                      \
> +    ResourceTemplate () { Register (SystemMemory, 0, 0, 0, 0) },               \
> +    /* Desired Performance Register */                                         \
> +    ResourceTemplate () { Register (SystemMemory, 32, 0, DesiredPerfReg, 3) }, \
> +    /* Minimum Performance Register */                                         \
> +    ResourceTemplate () { Register (SystemMemory, 0, 0, 0, 0) },               \
> +    /* Maximum Performance Register */                                         \
> +    ResourceTemplate () { Register (SystemMemory, 0, 0, 0, 0) },               \
> +    /* Performance Reduction Tolerance Register */                             \
> +    ResourceTemplate () { Register (SystemMemory, 0, 0, 0, 0) },               \
> +    /* Time Window Register */                                                 \
> +    ResourceTemplate () { Register (SystemMemory, 0, 0, 0, 0) },               \
> +    /* Counter Wraparound Time */                                              \
> +    ResourceTemplate () { Register (SystemMemory, 0, 0, 0, 0) },               \
> +    /* Reference Performance Counter Register */                               \
> +    ResourceTemplate () { Register (FFixedHW, 64, 0, 1, 4) },                  \
> +    /* Delivered Performance Counter Register */                               \
> +    ResourceTemplate () { Register (FFixedHW, 64, 0, 0, 4) },                  \
> +    /* Performance Limited Register */                                         \
> +    ResourceTemplate () { Register (SystemMemory, 32, 0, PerfLimitedReg, 3) }, \
> +    /* CPPC Enable Register */                                                 \
> +    ResourceTemplate () { Register (SystemMemory, 0, 0, 0, 0) },               \
> +    /* Autonomous Selection Enable Register */                                 \
> +    ResourceTemplate () { Register (SystemMemory, 0, 0, 0, 0) },               \
> +    /* Autonomous Activity Window Register */                                  \
> +    ResourceTemplate () { Register (SystemMemory, 0, 0, 0, 0) },               \
> +    /* Energy Performance Preference Register */                               \
> +    ResourceTemplate () { Register (SystemMemory, 0, 0, 0, 0) },               \
> +    RefPerf,                            /* Reference Performance */            \
> +    (LowestPerf * GranularityMHz),      /* Lowest Frequency */                 \
> +    (NominalPerf * GranularityMHz),     /* Nominal Frequency */                \
> +  }
> +
> +// Power state dependancy (_PSD) for CPPC
> +#define PSD_INIT(Domain)                                                       \
> +  {                                                                            \
> +    5,              /* Entries */                                              \
> +    0,              /* Revision */                                             \
> +    Domain,         /* Domain */                                               \
> +    0xFD,           /* Coord Type- SW_ANY */                                   \
> +    1               /* Processors */                                           \
> +  }
> +
>   #endif /* __SGI_ACPI_HEADER__ */


  reply	other threads:[~2021-05-10  9:12 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28 12:35 [edk2-platforms][PATCH V1 00/17] Enable idle state and CPPC support for RD platform Pranav Madhu
2021-04-28 12:35 ` [edk2-platforms][PATCH V1 01/17] Platform/Sgi: Macro definitions for ACPI _OSC Pranav Madhu
2021-04-28 12:35 ` [edk2-platforms][PATCH V1 02/17] Platform/Sgi: Add CPU container for SGI-575 Pranav Madhu
2021-05-10  9:12   ` Sami Mujawar
2021-04-28 12:35 ` [edk2-platforms][PATCH V1 03/17] Platform/Sgi: Low Power Idle states " Pranav Madhu
2021-04-28 12:35 ` [edk2-platforms][PATCH V1 04/17] Platform/Sgi: Add CPU container for RD-N1-Edge Pranav Madhu
2021-04-28 12:35 ` [edk2-platforms][PATCH V1 05/17] Platform/Sgi: Low Power Idle states " Pranav Madhu
2021-04-28 12:35 ` [edk2-platforms][PATCH V1 06/17] Platform/Sgi: Add DSDT ACPI table for RD-N1-Edge dual-chip platform Pranav Madhu
2021-04-28 12:35 ` [edk2-platforms][PATCH V1 07/17] Platform/Sgi: Low Power Idle States for RD-N1-Edge dual-chip Pranav Madhu
2021-04-28 12:35 ` [edk2-platforms][PATCH V1 08/17] Platform/Sgi: Add CPU container for RD-V1 platform Pranav Madhu
2021-04-28 12:35 ` [edk2-platforms][PATCH V1 09/17] Platform/Sgi: Low Power Idle states " Pranav Madhu
2021-04-28 12:35 ` [edk2-platforms][PATCH V1 10/17] Platform/Sgi: Macro definitions for ACPI CPPC Pranav Madhu
2021-05-10  9:12   ` Sami Mujawar [this message]
2021-04-28 12:35 ` [edk2-platforms][PATCH V1 11/17] Platform/Sgi: ACPI CPPC support for RD-V1 Pranav Madhu
2021-04-28 12:35 ` [edk2-platforms][PATCH V1 12/17] Platform/Sgi: Add CPU container for RD-V1 quad-chip platform Pranav Madhu
2021-04-28 12:35 ` [edk2-platforms][PATCH V1 13/17] Platform/Sgi: Low Power Idle States " Pranav Madhu
2021-04-28 12:35 ` [edk2-platforms][PATCH V1 14/17] Platform/Sgi: ACPI CPPC support " Pranav Madhu
2021-04-28 12:35 ` [edk2-platforms][PATCH V1 15/17] Platform/Sgi: Add CPU container for RD-N2 platform Pranav Madhu
2021-04-28 12:35 ` [edk2-platforms][PATCH V1 16/17] Platform/Sgi: Low Power Idle States for RD-N2 Pranav Madhu
2021-04-28 12:36 ` [edk2-platforms][PATCH V1 17/17] Platform/Sgi: ACPI CPPC support " Pranav Madhu
2021-05-03 14:29 ` [edk2-devel] [edk2-platforms][PATCH V1 00/17] Enable idle state and CPPC support for RD platform Thomas Abraham

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=075667e8-b943-1e5e-2a7a-e81f4ed12d1c@arm.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