public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [edk2-platforms][PATCH v1 0/2] Add SMBIOS support for RD-V2 platform
@ 2023-10-10  9:22 Pranav Madhu
  2023-10-10  9:22 ` [edk2-devel] [edk2-platforms][PATCH v1 1/2] Platform/Sgi: Define RD-V2 platform id values Pranav Madhu
  2023-10-10  9:22 ` [edk2-devel] [edk2-platforms][PATCH v1 2/2] Platform/Sgi: Extend SMBIOS support for RD-V2 platform Pranav Madhu
  0 siblings, 2 replies; 3+ messages in thread
From: Pranav Madhu @ 2023-10-10  9:22 UTC (permalink / raw)
  To: devel; +Cc: Ard Biesheuvel, Sami Mujawar

SMBIOS provides basic hardware and firmware configuration information
through table-driven data structure. This patch series adds SMBIOS
support for Arm's RD-V2 platforms.

The first patch in this series defines platform-id values for the
RD-V2 platform. The second patch add CPU information and cache
attributes for RD-V2 platform.

Link to branch with the patches in this series -
https://gitlab.arm.com/infra-solutions/reference-design/platsw/edk2-platforms/-/tree/topics/rdv2-smbios-v1

Pranav Madhu (2):
  Platform/Sgi: Define RD-V2 platform id values
  Platform/Sgi: Extend SMBIOS support for RD-V2 platform

 Platform/ARM/SgiPkg/Include/SgiPlatform.h                                 |  5 +++++
 Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type1SystemInformation.c    |  5 ++++-
 Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type4ProcessorInformation.c |  7 +++++--
 Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type7CacheInformation.c     | 18 ++++++++++++++++++
 Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.c                     |  6 ++++++
 5 files changed, 38 insertions(+), 3 deletions(-)

-- 
2.34.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109482): https://edk2.groups.io/g/devel/message/109482
Mute This Topic: https://groups.io/mt/101871394/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [edk2-devel] [edk2-platforms][PATCH v1 1/2] Platform/Sgi: Define RD-V2 platform id values
  2023-10-10  9:22 [edk2-devel] [edk2-platforms][PATCH v1 0/2] Add SMBIOS support for RD-V2 platform Pranav Madhu
@ 2023-10-10  9:22 ` Pranav Madhu
  2023-10-10  9:22 ` [edk2-devel] [edk2-platforms][PATCH v1 2/2] Platform/Sgi: Extend SMBIOS support for RD-V2 platform Pranav Madhu
  1 sibling, 0 replies; 3+ messages in thread
From: Pranav Madhu @ 2023-10-10  9:22 UTC (permalink / raw)
  To: devel; +Cc: Ard Biesheuvel, Sami Mujawar

Add the RD-V2 platform identification values including the part
number and configuration number. This information will be used in
populating the SMBIOS tables.

Signed-off-by: Pranav Madhu <pranav.madhu@arm.com>
---
 Platform/ARM/SgiPkg/Include/SgiPlatform.h             | 5 +++++
 Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.c | 6 ++++++
 2 files changed, 11 insertions(+)

diff --git a/Platform/ARM/SgiPkg/Include/SgiPlatform.h b/Platform/ARM/SgiPkg/Include/SgiPlatform.h
index e83853664c4c..ea197b9f50bc 100644
--- a/Platform/ARM/SgiPkg/Include/SgiPlatform.h
+++ b/Platform/ARM/SgiPkg/Include/SgiPlatform.h
@@ -47,6 +47,10 @@
 #define RD_N2_PART_NUM                            0x7B7
 #define RD_N2_CONF_ID                             0x1
 
+// RD-V2 Platform Identification values
+#define RD_V2_PART_NUM                            0x7F2
+#define RD_V2_CONF_ID                             0x1
+
 #define SGI_CONFIG_MASK                           0x0F
 #define SGI_CONFIG_SHIFT                          0x1C
 #define SGI_PART_NUM_MASK                         0xFFF
@@ -85,6 +89,7 @@ typedef enum {
   RdN2,
   RdN2Cfg1,
   RdN2Cfg2,
+  RdV2,
 } ARM_RD_PRODUCT_ID;
 
 // Arm ProductId look-up table
diff --git a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.c b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.c
index fa006320025b..0562f40d4604 100644
--- a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.c
+++ b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.c
@@ -79,6 +79,12 @@ STATIC CONST SGI_PRODUCT_ID_LOOKUP SgiProductIdLookup[] = {
     RD_N2_CONF_ID,
     1
   },
+  {
+    RdV2,
+    RD_V2_PART_NUM,
+    RD_V2_CONF_ID,
+    0
+  },
 };
 
 EFI_BOOT_MODE
-- 
2.34.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109483): https://edk2.groups.io/g/devel/message/109483
Mute This Topic: https://groups.io/mt/101871395/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [edk2-devel] [edk2-platforms][PATCH v1 2/2] Platform/Sgi: Extend SMBIOS support for RD-V2 platform
  2023-10-10  9:22 [edk2-devel] [edk2-platforms][PATCH v1 0/2] Add SMBIOS support for RD-V2 platform Pranav Madhu
  2023-10-10  9:22 ` [edk2-devel] [edk2-platforms][PATCH v1 1/2] Platform/Sgi: Define RD-V2 platform id values Pranav Madhu
@ 2023-10-10  9:22 ` Pranav Madhu
  1 sibling, 0 replies; 3+ messages in thread
From: Pranav Madhu @ 2023-10-10  9:22 UTC (permalink / raw)
  To: devel; +Cc: Ard Biesheuvel, Sami Mujawar

The Neoverse RD-V2 FVP platform includes 16 CPUs and each CPU has 64KB
of L1 instruction/data cache, 2MB of L2 cache and 32MB of system level
cache. Extend the SMBIOS support for RD-V2 platform with this
configuration.

Signed-off-by: Pranav Madhu <pranav.madhu@arm.com>
---
 Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type1SystemInformation.c    |  5 ++++-
 Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type4ProcessorInformation.c |  7 +++++--
 Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type7CacheInformation.c     | 18 ++++++++++++++++++
 3 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type1SystemInformation.c b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type1SystemInformation.c
index b7e2238fb39c..fe3c88672d7e 100644
--- a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type1SystemInformation.c
+++ b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type1SystemInformation.c
@@ -33,7 +33,8 @@
   "RdV1Mc\0"                                            \
   "RdN2\0"                                              \
   "RdN2Cfg1\0"                                          \
-  "RdN2Cfg2\0"
+  "RdN2Cfg2\0"                                          \
+  "RdV2\0"
 
 typedef enum {
   ManufacturerName = 1,
@@ -71,6 +72,8 @@ STATIC GUID mSmbiosUid[] = {
   {0xa4941d3d, 0xfac3, 0x4ace, {0x9a, 0x7e, 0xce, 0x26, 0x76, 0x64, 0x5e, 0xda}},
   /* Rd-N2-Cfg2    */
   {0xd2946d07, 0x8057, 0x4c26, {0xbf, 0x53, 0x78, 0xa6, 0x5b, 0xe1, 0xc1, 0x60}},
+  /* Rd-V2         */
+  {0x3b1180a3, 0x0744, 0x4194, {0xae, 0x2e, 0xed, 0xa5, 0xbc, 0x2e, 0x43, 0x45}},
 };
 
 /* System information */
diff --git a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type4ProcessorInformation.c b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type4ProcessorInformation.c
index b59172cf1cb9..0f403e41a3c7 100644
--- a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type4ProcessorInformation.c
+++ b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type4ProcessorInformation.c
@@ -27,7 +27,7 @@
 #define SOCKET_TYPE_BASE        3
 #define SOCKET_TYPE_NUM         1
 #define PROCESSOR_VERSION_BASE  (SOCKET_TYPE_BASE + SOCKET_TYPE_NUM)
-#define PROCESSOR_VERSION_NUM   10
+#define PROCESSOR_VERSION_NUM   11
 #define SERIAL_NUMBER_BASE      (PROCESSOR_VERSION_BASE + PROCESSOR_VERSION_NUM)
 #define TYPE4_STRINGS                                   \
   "0x000\0"                     /* Part Number */       \
@@ -43,6 +43,7 @@
   "Neoverse-N2\0"                                       \
   "Neoverse-N2\0"                                       \
   "Neoverse-N2\0"                                       \
+  "Neoverse-V2\0"                                       \
   "000-0\0"                     /* Serial number */     \
   "783-3\0"                                             \
   "786-1\0"                                             \
@@ -52,7 +53,8 @@
   "78A-2\0"                                             \
   "7B7-1\0"                                             \
   "7B6-1\0"                                             \
-  "7B7-1\0"
+  "7B7-1\0"                                             \
+  "7F2-1\0"
 
 typedef enum {
   PartNumber = 1,
@@ -178,6 +180,7 @@ InstallType4ProcessorInformation (
     break;
   case RdN2:
   case RdN2Cfg1:
+  case RdV2:
     mArmRdSmbiosType4.Base.CoreCount = CoreCount;
     mArmRdSmbiosType4.Base.EnabledCoreCount = CoreCount;
     mArmRdSmbiosType4.Base.ThreadCount = CoreCount;
diff --git a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type7CacheInformation.c b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type7CacheInformation.c
index b71ce721e2e8..d65ae9520679 100644
--- a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type7CacheInformation.c
+++ b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type7CacheInformation.c
@@ -334,6 +334,24 @@ InstallType7CacheInformation (
     mArmRdSmbiosType7[4].Base.InstalledSize2 = 8192;     // 8MB SLC
     mArmRdSmbiosType7[4].Base.Associativity = CacheAssociativity16Way;
     break;
+  case RdV2:
+    /* L1 instruction cache */
+    mArmRdSmbiosType7[0].Base.MaximumCacheSize2 = 64;    // 64KB
+    mArmRdSmbiosType7[0].Base.InstalledSize2 = 64;       // 64KB
+    mArmRdSmbiosType7[0].Base.Associativity = CacheAssociativity4Way;
+    /* L1 data cache */
+    mArmRdSmbiosType7[1].Base.MaximumCacheSize2 = 64;    // 64KB
+    mArmRdSmbiosType7[1].Base.InstalledSize2 = 64;       // 64KB
+    mArmRdSmbiosType7[1].Base.Associativity = CacheAssociativity4Way;
+    /* L2 cache */
+    mArmRdSmbiosType7[2].Base.MaximumCacheSize2 = 2048;  // 2MB
+    mArmRdSmbiosType7[2].Base.InstalledSize2 = 2048;     // 2MB
+    mArmRdSmbiosType7[2].Base.Associativity = CacheAssociativity8Way;
+    /* System level cache */
+    mArmRdSmbiosType7[4].Base.MaximumCacheSize2 = 32768; // 32MB SLC
+    mArmRdSmbiosType7[4].Base.InstalledSize2 = 32768;    // 32MB SLC
+    mArmRdSmbiosType7[4].Base.Associativity = CacheAssociativity16Way;
+    break;
   }
 
   /* Install valid cache information tables */
-- 
2.34.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109484): https://edk2.groups.io/g/devel/message/109484
Mute This Topic: https://groups.io/mt/101871396/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-10-10  9:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-10  9:22 [edk2-devel] [edk2-platforms][PATCH v1 0/2] Add SMBIOS support for RD-V2 platform Pranav Madhu
2023-10-10  9:22 ` [edk2-devel] [edk2-platforms][PATCH v1 1/2] Platform/Sgi: Define RD-V2 platform id values Pranav Madhu
2023-10-10  9:22 ` [edk2-devel] [edk2-platforms][PATCH v1 2/2] Platform/Sgi: Extend SMBIOS support for RD-V2 platform Pranav Madhu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox