From: "Vijayenthiran Subramaniam" <vijayenthiran.subramaniam@arm.com>
To: sami.mujawar@arm.com, devel@edk2.groups.io, leif@nuviainc.com,
ardb+tianocore@kernel.org
Cc: thomas.abraham@arm.com
Subject: [edk2-platforms] [PATCH v3 1/3] Platform/ARM/SgiPkg: Add helper macros for HMAT table
Date: Wed, 17 Feb 2021 16:31:55 +0530 [thread overview]
Message-ID: <1613559717-30499-2-git-send-email-vijayenthiran.subramaniam@arm.com> (raw)
In-Reply-To: <1613559717-30499-1-git-send-email-vijayenthiran.subramaniam@arm.com>
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>
---
| 113 +++++++++++++++++++-
1 file changed, 112 insertions(+), 1 deletion(-)
--git a/Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h b/Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h
index 8d715de173c9..e27333d21b53 100644
--- a/Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h
+++ b/Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h
@@ -1,6 +1,6 @@
/** @file
*
-* Copyright (c) 2018-2020, ARM Limited. All rights reserved.
+* Copyright (c) 2018-2021, ARM Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*
@@ -119,4 +119,115 @@
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) \
+ { \
+ EFI_ACPI_6_3_HMAT_TYPE_MEMORY_PROXIMITY_DOMAIN_ATTRIBUTES, \
+ { \
+ 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) \
+ { \
+ EFI_ACPI_6_3_HMAT_TYPE_SYSTEM_LOCALITY_LATENCY_AND_BANDWIDTH_INFO, \
+ { \
+ 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 \
+ }, \
+ 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) \
+ { \
+ EFI_ACPI_6_3_HMAT_TYPE_MEMORY_SIDE_CACHE_INFO, \
+ { \
+ 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
next prev parent reply other threads:[~2021-02-17 11:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-17 11:01 [edk2-platforms] [PATCH v3 0/3] Add HMAT tables for RD multi-chip platforms Vijayenthiran Subramaniam
2021-02-17 11:01 ` Vijayenthiran Subramaniam [this message]
2021-02-17 11:01 ` [edk2-platforms] [PATCH v3 2/3] Platform/ARM/SgiPkg: Add HMAT ACPI table for RdN1EdgeX2 Vijayenthiran Subramaniam
2021-04-07 18:37 ` [edk2-devel] " Sami Mujawar
2021-04-08 12:55 ` Vijayenthiran Subramaniam
2021-02-17 11:01 ` [edk2-platforms] [PATCH v3 3/3] Platform/ARM/SgiPkg: Add HMAT ACPI table for RD-V1-MC Vijayenthiran Subramaniam
2021-04-08 14:51 ` [edk2-devel] [edk2-platforms] [PATCH v3 0/3] Add HMAT tables for RD multi-chip platforms Sami Mujawar
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=1613559717-30499-2-git-send-email-vijayenthiran.subramaniam@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