public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Sami Mujawar" <sami.mujawar@arm.com>
To: Vijayenthiran Subramaniam <Vijayenthiran.Subramaniam@arm.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Vijayenthiran Subramaniam <Vijayenthiran.Subramaniam@arm.com>,
	"Jonathan.Cameron@Huawei.com" <Jonathan.Cameron@huawei.com>,
	"leif@nuviainc.com" <leif@nuviainc.com>,
	"ardb+tianocore@kernel.org" <ardb+tianocore@kernel.org>,
	Thomas Abraham <thomas.abraham@arm.com>, nd <nd@arm.com>
Subject: Re: [edk2-devel] [edk2-platforms] [PATCH v2 1/3] Platform/ARM/SgiPkg: Add helper macros for HMAT table
Date: Wed, 17 Feb 2021 09:27:10 +0000	[thread overview]
Message-ID: <DB7PR08MB30972605F753E070C106D74C84869@DB7PR08MB3097.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <CAC0BY-f4Ytm7cVm+epLdAAj0p55oXxjQ9vEm_h2VQitZzyQoLA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 11778 bytes --]

Hi Vijay,

Please find my response inline marked [SAMI]

Regards,

Sami Mujawar
________________________________
From: Vijayenthiran Subramanian <vijayenthiran.subramaniam@arm.com>
Sent: Wednesday, 17 February 2021, 9:15 am
To: devel@edk2.groups.io; Sami Mujawar
Cc: Vijayenthiran Subramaniam; Jonathan.Cameron@Huawei.com; leif@nuviainc.com; ardb+tianocore@kernel.org; Thomas Abraham
Subject: Re: [edk2-devel] [edk2-platforms] [PATCH v2 1/3] Platform/ARM/SgiPkg: Add helper macros for HMAT table

Hi Sami,

On Fri, Feb 12, 2021 at 5:28 PM Sami Mujawar <sami.mujawar@arm.com> wrote:
>
> Hi Vijay,
>
> Please find my response inline marked [SAMI].
>
> Regards,
>
> Sami Mujawar
>
> -----Original Message-----
> From: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
> Sent: 03 February 2021 09:07 AM
> To: devel@edk2.groups.io; Jonathan.Cameron@Huawei.com; leif@nuviainc.com; ardb+tianocore@kernel.org; Sami Mujawar <Sami.Mujawar@arm.com>
> Cc: Thomas Abraham <thomas.abraham@arm.com>
> Subject: [edk2-platforms] [PATCH v2 1/3] Platform/ARM/SgiPkg: Add helper macros for HMAT table
>
> Add helper macros to create Memory Proximity Domain, System Locality
> Latency and Bandwidth Information, Memory Side Cache Information
> structures in the HMAT table.
>
> Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
> ---
>  Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h | 110 ++++++++++++++++++++
>  1 file changed, 110 insertions(+)
>
> diff --git a/Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h b/Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h
> index 8d715de173c9..181d9d771d1e 100644
> --- a/Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h
> +++ b/Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h
> @@ -119,4 +119,114 @@
>      ACPIProcessorUID,  Flags,  ClockDomain                                     \
>    }
>
> +//
> +// HMAT related structures
> +//
> +// Memory Proximity Domain Attributes Structure
> +// Refer Section 5.2.27.3 in ACPI Specification, Version 6.3
> +#define EFI_ACPI_6_3_HMAT_STRUCTURE_MEMORY_PROXIMITY_DOMAIN_ATTRIBUTES_INIT(   \
> +    Flags, ProximityDomainForAttachedIntiator, ProximityDomainForMemory)       \
> +  {                                                                            \
> +    0,                                                                         \
> [SAMI] EFI_ACPI_6_3_HMAT_TYPE_MEMORY_PROXIMITY_DOMAIN_ATTRIBUTES ?
> [/SAMI]

EFI_ACPI_6_3_HMAT_STRUCTURE_MEMORY_PROXIMITY_DOMAIN_ATTRIBUTES is
already a typedef and
EFI_ACPI_6_3_HMAT_STRUCTURE_MEMORY_PROXIMITY_DOMAIN_ATTRIBUTES_INIT
follows the same
naming as used in the Acpi63.h file:
https://github.com/tianocore/edk2/blob/4f4d862c1c7232a18347616d94c343c929657fdb/MdePkg/Include/IndustryStandard/Acpi63.h#L2057
[SAMI] Please use the defined values from https://github.com/tianocore/edk2/blob/4f4d862c1c7232a18347616d94c343c929657fdb/MdePkg/Include/IndustryStandard/Acpi63.h#L20<https://github.com/tianocore/edk2/blob/4f4d862c1c7232a18347616d94c343c929657fdb/MdePkg/Include/IndustryStandard/Acpi63.h#L2057>24
instead of magic numbers. Same for other places in this patch.
[SAMI]

> +    {                                                                          \
> +      EFI_ACPI_RESERVED_BYTE,                                                  \
> +      EFI_ACPI_RESERVED_BYTE                                                   \
> +    },                                                                         \
> +    sizeof (EFI_ACPI_6_3_HMAT_STRUCTURE_MEMORY_PROXIMITY_DOMAIN_ATTRIBUTES),   \
> +    {                                                                          \
> +      Flags,                                                                   \
> +      0                                                                        \
> +    },                                                                         \
> +    {                                                                          \
> +      EFI_ACPI_RESERVED_BYTE,                                                  \
> +      EFI_ACPI_RESERVED_BYTE                                                   \
> +    },                                                                         \
> +    ProximityDomainForAttachedIntiator,                                        \
> +    ProximityDomainForMemory,                                                  \
> +    {                                                                          \
> +      EFI_ACPI_RESERVED_BYTE,                                                  \
> +      EFI_ACPI_RESERVED_BYTE,                                                  \
> +      EFI_ACPI_RESERVED_BYTE,                                                  \
> +      EFI_ACPI_RESERVED_BYTE,                                                  \
> +      EFI_ACPI_RESERVED_BYTE,                                                  \
> +      EFI_ACPI_RESERVED_BYTE,                                                  \
> +      EFI_ACPI_RESERVED_BYTE,                                                  \
> +      EFI_ACPI_RESERVED_BYTE,                                                  \
> +      EFI_ACPI_RESERVED_BYTE,                                                  \
> +      EFI_ACPI_RESERVED_BYTE,                                                  \
> +      EFI_ACPI_RESERVED_BYTE,                                                  \
> +      EFI_ACPI_RESERVED_BYTE,                                                  \
> +      EFI_ACPI_RESERVED_BYTE,                                                  \
> +      EFI_ACPI_RESERVED_BYTE,                                                  \
> +      EFI_ACPI_RESERVED_BYTE,                                                  \
> +      EFI_ACPI_RESERVED_BYTE,                                                  \
> +      EFI_ACPI_RESERVED_BYTE,                                                  \
> +      EFI_ACPI_RESERVED_BYTE,                                                  \
> +      EFI_ACPI_RESERVED_BYTE,                                                  \
> +      EFI_ACPI_RESERVED_BYTE                                                   \
> +    }                                                                          \
> +  }
> +
> +// System Locality Latency and Bandwidth Information Structure
> +// Refer Section 5.2.27.4 in ACPI Specification, Version 6.3
> +#define EFI_ACPI_6_3_HMAT_STRUCTURE_SYSTEM_LOCALITY_LATENCY_AND_BANDWIDTH_INFO_INIT(  \
> +    Flags, DataType, NumInitiatorProximityDomains,                                    \
> +    NumTargetProximityDomains, EntryBaseUnit)                                         \
> +  {                                                                                   \
> +    1,                                                                                \
> [SAMI] EFI_ACPI_6_3_HMAT_TYPE_SYSTEM_LOCALITY_LATENCY_AND_BANDWIDTH_INFO ?
> [/SAMI]

Same as above.

> +    {                                                                                 \
> +      EFI_ACPI_RESERVED_BYTE,                                                         \
> +      EFI_ACPI_RESERVED_BYTE                                                          \
> +    },                                                                                \
> +    sizeof (EFI_ACPI_6_3_HMAT_STRUCTURE_SYSTEM_LOCALITY_LATENCY_AND_BANDWIDTH_INFO) + \
> +      (4 * NumInitiatorProximityDomains) + (4 * NumTargetProximityDomains) +          \
> +      (2 * NumInitiatorProximityDomains * NumTargetProximityDomains),                 \
> +    {                                                                                 \
> +      Flags, 0                                                                        \
> [SAMI] 0 on new line for consistency ?
> [/SAMI]

Ack, will fix in the next version.

> +    },                                                                                \
> +    DataType,                                                                         \
> +    {                                                                                 \
> +      EFI_ACPI_RESERVED_BYTE,                                                         \
> +      EFI_ACPI_RESERVED_BYTE                                                          \
> +    },                                                                                \
> +    NumInitiatorProximityDomains,                                                     \
> +    NumTargetProximityDomains,                                                        \
> +    {                                                                                 \
> +      EFI_ACPI_RESERVED_BYTE,                                                         \
> +      EFI_ACPI_RESERVED_BYTE,                                                         \
> +      EFI_ACPI_RESERVED_BYTE,                                                         \
> +      EFI_ACPI_RESERVED_BYTE                                                          \
> +    },                                                                                \
> +    EntryBaseUnit                                                                     \
> +  }
> +
> +// Memory Side Cache Information Structure
> +// Refer Section 5.2.27.5 in ACPI Specification, Version 6.3
> +#define EFI_ACPI_6_3_HMAT_STRUCTURE_MEMORY_SIDE_CACHE_INFO_INIT(               \
> +    MemoryProximityDomain, MemorySideCacheSize, CacheAttributes,               \
> +    NumberOfSmbiosHandles)                                                     \
> +  {                                                                            \
> +    2,                                                                         \
> [SAMI] EFI_ACPI_6_3_HMAT_TYPE_MEMORY_SIDE_CACHE_INFO ?
> [/SAMI]

Same as above.

> +    {                                                                          \
> +      EFI_ACPI_RESERVED_BYTE,                                                  \
> +      EFI_ACPI_RESERVED_BYTE                                                   \
> +    },                                                                         \
> +    sizeof (EFI_ACPI_6_3_HMAT_STRUCTURE_MEMORY_SIDE_CACHE_INFO) +              \
> +      (NumberOfSmbiosHandles * 2),                                             \
> +    MemoryProximityDomain,                                                     \
> +    {                                                                          \
> +      EFI_ACPI_RESERVED_BYTE,                                                  \
> +      EFI_ACPI_RESERVED_BYTE,                                                  \
> +      EFI_ACPI_RESERVED_BYTE,                                                  \
> +      EFI_ACPI_RESERVED_BYTE                                                   \
> +    },                                                                         \
> +    MemorySideCacheSize,                                                       \
> +    CacheAttributes,                                                           \
> +    {                                                                          \
> +      EFI_ACPI_RESERVED_BYTE,                                                  \
> +      EFI_ACPI_RESERVED_BYTE                                                   \
> +    },                                                                         \
> +    NumberOfSmbiosHandles                                                      \
> +  }
> +
>  #endif /* __SGI_ACPI_HEADER__ */
> --
> 2.17.1
>
>

BR,
Vijayenthiran


[-- Attachment #2: Type: text/html, Size: 42394 bytes --]

  reply	other threads:[~2021-02-17  9:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-03  9:07 [edk2-platforms] [PATCH v2 0/3] Add HMAT tables for RD multi-chip platforms Vijayenthiran Subramaniam
2021-02-03  9:07 ` [edk2-platforms] [PATCH v2 1/3] Platform/ARM/SgiPkg: Add helper macros for HMAT table Vijayenthiran Subramaniam
2021-02-12 17:28   ` Sami Mujawar
2021-02-17  9:13     ` [edk2-devel] " Vijayenthiran Subramaniam
2021-02-17  9:27       ` Sami Mujawar [this message]
2021-02-03  9:07 ` [edk2-platforms] [PATCH v2 2/3] Platform/ARM/SgiPkg: Add HMAT ACPI table for RdN1EdgeX2 Vijayenthiran Subramaniam
2021-02-03  9:07 ` [edk2-platforms] [PATCH v2 3/3] Platform/ARM/SgiPkg: Add HMAT ACPI table for RD-V1-MC Vijayenthiran Subramaniam
2021-02-12 17:28   ` Sami Mujawar
2021-02-17  9:17     ` [edk2-devel] " Vijayenthiran Subramaniam
2021-02-11 15:14 ` [edk2-devel] [edk2-platforms] [PATCH v2 0/3] Add HMAT tables for RD multi-chip platforms Vijayenthiran Subramaniam
2021-02-12 14:06   ` Jonathan Cameron

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=DB7PR08MB30972605F753E070C106D74C84869@DB7PR08MB3097.eurprd08.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