From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@semihalf-com.20150623.gappssmtp.com header.s=20150623 header.b=lfIM0G6q; spf=none, err=SPF record not found (domain: semihalf.com, ip: 209.85.222.169, mailfrom: mw@semihalf.com) Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) by groups.io with SMTP; Fri, 31 May 2019 11:04:33 -0700 Received: by mail-qk1-f169.google.com with SMTP id c70so6837770qkg.7 for ; Fri, 31 May 2019 11:04:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=v/X7hzEfEsazINjQGKSOI5HsOHKHI7GmVoKbkBNG0hc=; b=lfIM0G6qxyiHePkrWfQSBRqjTOfpxId7esbERNGnxaxgtN5KPeFSUpfKiY971a+Q6S G2YInxIhINxJ7FAJfb0DZbU62dwABU+drtW2F4AbeMIDHcwMd6SQJ4ClchAeKIw6R13Q B+t08Sze6S9OpP6egMeQaoc457MPPlvzi8uf6ijU72I6hETJH+0ItH0buH4lAkMfHRVS VRNdMxUqmyCbKYS8QJ7S/ankPmNZjHAlFpgZoPJjZwk+Ggpj1VH7MvBgiqSf6IbZU/9u OK3Nzm2m0Fy53C2gG9sySCeHHpNCNtzdgWL7eYij6Jm6wuiLfLdZNBofFPJcLTcKeO7h un8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=v/X7hzEfEsazINjQGKSOI5HsOHKHI7GmVoKbkBNG0hc=; b=nJlAEHumA83DqYrC4uWBqV8b1S8RCBwO4L3+dk6lkEsLqIW5YauOAXMw70J9J2ZyQP 20vfDyDPC47ye+OQjn836/ENifRgK7nDbXGorTZSKum/LY+tUd7eTc15v3e3ei5doTHz uoGKxm6/6pIAt+IUxnHfPMX79+ymXZAgI8VVfJjbsYi2usVAD4Ts1cHHiHJvcxF8XDy2 eVWyMBRrCqTfD2WY3hn7E4Kbh71l+rnGsxHvyZrmcLv34InrhPtHoxpERzrpPesU62yL Fp76nvJDZ+EXAdtBr8wBr+bRR8jCd/n3nq44fFvdWIB6htlz9eTzqtDoSmlyzFSi08vI b0DQ== X-Gm-Message-State: APjAAAWrvNRN1ucz0pIv3J9H59WzaPZGQI2nCw6m4Pw3cLZ/2h4+vBgr muukpMc3TZDqE+EGp64k++o24+X81G9CJVC64svvgQ== X-Google-Smtp-Source: APXvYqznnM6+vSB9BArKuH5f3TlweOleR1E1lch5LXrAsOqWiFRXhJC69U0Ht24y3CDfRPIgb/s8K2d8/57U0SNvFks= X-Received: by 2002:a37:8007:: with SMTP id b7mr9598129qkd.102.1559325871700; Fri, 31 May 2019 11:04:31 -0700 (PDT) MIME-Version: 1.0 References: <1559319619-12833-1-git-send-email-mw@semihalf.com> <582a403c-7c4f-00b4-abad-8a2fef010c37@arm.com> In-Reply-To: <582a403c-7c4f-00b4-abad-8a2fef010c37@arm.com> From: "Marcin Wojtas" Date: Fri, 31 May 2019 20:04:20 +0200 Message-ID: Subject: Re: [edk2-devel] [edk2-platforms: PATCH v2] Marvell/Armada7k8k: Introduce SMBIOS/DMI support To: Jeremy Linton Cc: Leif Lindholm , edk2-devel-groups-io , Ard Biesheuvel , "jsd@semihalf.com" , Grzegorz Jaszczyk , Kostya Porotchkin , Jici Gao Content-Type: multipart/alternative; boundary="000000000000ac27a4058a32d814" --000000000000ac27a4058a32d814 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Jeremy, Thanks for a quick test! 1. Cache sizes - here's the dmidecode output Handle 0x1000, DMI type 7, 27 bytes Cache Information Socket Designation: L1 Instruction [...] Installed Size: 48 kB [...] Handle 0x1001, DMI type 7, 27 bytes Cache Information Socket Designation: L1 Data [...] Installed Size: 32 kB Maximum Size: 32 kB [...] Handle 0x1002, DMI type 7, 27 bytes Cache Information Socket Designation: L2 [...] Installed Size: 512 kB Maximum Size: 512 kB [...] Handle 0x1003, DMI type 7, 27 bytes Cache Information Socket Designation: L3 [...] Installed Size: 1024 kB Maximum Size: 1024 kB [...] Above size values match the spec. Am I missing something? 2. DIMM/SPD data is read and processed in ARM-TF. Currently processing thi= s data is not available in EDK2. On the other hand Table19 and TYPE 17 shows the real memory map and size, which is read during EDK2 init (check GetDramSize () in Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/Armada7k8kLibMem.c) from via SMC from the secure world. DDR speed is also read from the SoC registers. Any particular data that you are missing? 3. In next step I'd like to use BoardDescProtocol to update a couple of tables fields such as name, revision number, PCIE slots information. Best regards, Marcin pt., 31 maj 2019 o 19:05 Jeremy Linton napisa=C5= =82(a): > Hi, > > I'm super in favor of this, but.. I noticed while trying to test it that > the cache sizes being displayed by dmidecode don't seem to match what is > in this table, implying something doesn't appear to be 100% correct. > > Also, while its understandable all the missing serial/chassis/etc > fields, the dimm data should be available? I assume the dimm training > add-on is reading the SPD from the dimm, so it can/should be stored > somewhere? > > Thanks, > > > On 5/31/19 11:20 AM, Marcin Wojtas via Groups.Io wrote: > > Fill in the basic requirements of the SMBIOS specification by specifyi= ng > > the minimum required structures. The basic fixup is performed. > > CPU/DRAM frequency is obtained via SampleAtResetlib and the DRAM size > > is calculated from the information stored in the HOB list. > > > > Add new Armada SmbiosPlatformDxe and MdeModulePkg/SmbiosDxe to the > > build and firmware image. With these changes, the EFI BDS, EFI shell, > > and Linux dmidecode command return useful information. > > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > Signed-off-by: Marcin Wojtas > > --- > > Hi, > > > > This is the second version of the SmBios support for > > Armada platforms, addressing all remarks from the initial > > patch. Please check the changelog below. > > > > In order to ease review, the patch is available in the github: > > > https://github.com/MarvellEmbeddedProcessors/edk2-open-platform/commits/= smbios-upstream-r20190531 > > > > Looking forward to your comments. > > > > Best regards, > > Marcin > > > > Changelog: > > v1->v2: > > * Update SMBIOS version to 3.2 > > * Correct copyright name and remove unused Packages/LibraryClasses/Pcd= s > > * Remove unused headers > > * SMBIOS_REFRENCE_HANDLES > > - Drop CA53 references > > - SMBIOS_HANDLE_A72_L3/SMBIOS_HANDLE_L3 > > - Add SMBIOS_HANDLE_A72_L1D and according type7 table > > * Do not use 'fixup' word > > * Unify string placeholders to 32 signs > > * LogSmbiosData > > - Use same variable name as in DoxyGen blurb > > - Fix indentation in for loop > > - Set double null in the same way in all cases. > > - Cast Record with (VOID *) > > * Add missing parameters description of SmbiosInstallMemoryStructure() > and SmbiosInstallStructures() > > * Split variable assignment with its declaration in SmbiosMemoryInstal= l() > > * Keep firmware revision in local variables in > SmbiosInstallAllStructures() > > > > Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc | = 9 + > > Silicon/Marvell/Armada7k8k/Armada7k8k.fdf | = 4 + > > Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf | 5= 0 > ++ > > Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c | 81= 3 > ++++++++++++++++++++ > > 4 files changed, 876 insertions(+) > > create mode 100644 > Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf > > create mode 100644 > Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c > > > > diff --git a/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc > b/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc > > index 0e63bc8..ed716a7 100644 > > --- a/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc > > +++ b/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc > > @@ -398,6 +398,11 @@ > > gMarvellTokenSpaceGuid.PcdOpTeeRegionBase|0x4400000 > > gMarvellTokenSpaceGuid.PcdOpTeeRegionSize|0x1000000 > > > > + # SMBIOS/DMI > > + gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0 > > + gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosEntryPointProvideMethod|0x2 > > + gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0320 > > + > > # TRNG > > gMarvellTokenSpaceGuid.PcdEip76TrngBaseAddress|0xF2760000 > > > > @@ -615,6 +620,10 @@ > > ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf > > !endif #$(INCLUDE_TFTP_COMMAND) > > > > + # SMBIOS/DMI > > + MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf > > + Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf > > + > > [Components.AARCH64] > > # > > # Generic ACPI modules > > diff --git a/Silicon/Marvell/Armada7k8k/Armada7k8k.fdf > b/Silicon/Marvell/Armada7k8k/Armada7k8k.fdf > > index f59cc1f..e003623 100644 > > --- a/Silicon/Marvell/Armada7k8k/Armada7k8k.fdf > > +++ b/Silicon/Marvell/Armada7k8k/Armada7k8k.fdf > > @@ -207,6 +207,10 @@ FvNameGuid =3D > 5eda4200-2c5f-43cb-9da3-0baf74b1b30c > > # DTB > > INF EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.inf > > > > + # SMBIOS/DMI > > + INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf > > + INF Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf > > + > > !if $(ARCH) =3D=3D AARCH64 > > # ACPI support > > INF MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.in= f > > diff --git > a/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf > b/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf > > new file mode 100644 > > index 0000000..8fa0438 > > --- /dev/null > > +++ b/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf > > @@ -0,0 +1,50 @@ > > +#/** @file > > +# SMBIOS Table for ARM platform > > +# > > +# Copyright (c) 2013, Linaro Ltd. All rights reserved.
> > +# Copyright (c) 2019, Marvell International Ltd. and its affiliates > > +# > > +# This program and the accompanying materials > > +# are licensed and made available under the terms and conditions of > the BSD License > > +# which accompanies this distribution. The full text of the license > may be found at > > +# http://opensource.org/licenses/bsd-license.php > > +# > > +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BAS= IS, > > +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS = OR > IMPLIED. > > +# > > +#**/ > > + > > +[Defines] > > + INF_VERSION =3D 0x0001001B > > + BASE_NAME =3D SmbiosPlatformDxe > > + FILE_GUID =3D 1c5028a4-3bd0-43cf-9e56-b450584d= c22b > > + MODULE_TYPE =3D DXE_DRIVER > > + VERSION_STRING =3D 1.0 > > + ENTRY_POINT =3D SmbiosPlatformDriverEntryPoint > > + > > +[Sources] > > + SmbiosPlatformDxe.c > > + > > +[Packages] > > + MdeModulePkg/MdeModulePkg.dec > > + MdePkg/MdePkg.dec > > + Silicon/Marvell/Marvell.dec > > + > > +[LibraryClasses] > > + BaseLib > > + BaseMemoryLib > > + DebugLib > > + HobLib > > + PcdLib > > + SampleAtResetLib > > + UefiBootServicesTableLib > > + UefiDriverEntryPoint > > + > > +[FixedPcd] > > + gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision > > + > > +[Protocols] > > + gEfiSmbiosProtocolGuid # PROTOCOL ALWAYS_CONSU= MED > > + > > +[Depex] > > + gEfiSmbiosProtocolGuid > > diff --git > a/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c > b/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c > > new file mode 100644 > > index 0000000..12ee72e > > --- /dev/null > > +++ b/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c > > @@ -0,0 +1,813 @@ > > +/** @file > > + This driver installs SMBIOS information for Marvell Armada platform= s > > + > > + Copyright (c) 2015, ARM Limited. All rights reserved. > > + Copyright (c) 2019, Marvell International Ltd. and its affiliates > > + > > + This program and the accompanying materials > > + are licensed and made available under the terms and conditions of t= he > BSD License > > + which accompanies this distribution. The full text of the license > may be found at > > + http://opensource.org/licenses/bsd-license.php > > + > > + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASI= S, > > + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS O= R > IMPLIED. > > + > > +**/ > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#include > > + > > +#include > > + > > +// > > +// SMBIOS tables often reference each other using > > +// fixed constants, define a list of these constants > > +// for our hardcoded tables > > +// > > +enum SMBIOS_REFRENCE_HANDLES { > > + SMBIOS_HANDLE_A72_L1I =3D 0x1000, > > + SMBIOS_HANDLE_A72_L1D, > > + SMBIOS_HANDLE_A72_L2, > > + SMBIOS_HANDLE_L3, > > + SMBIOS_HANDLE_MOTHERBOARD, > > + SMBIOS_HANDLE_CHASSIS, > > + SMBIOS_HANDLE_A72_CLUSTER, > > + SMBIOS_HANDLE_MEMORY, > > + SMBIOS_HANDLE_DIMM > > +}; > > + > > +// > > +// Type definition and contents of the default SMBIOS table. > > +// This table covers only the minimum structures required by > > +// the SMBIOS specification (section 6.2, version 3.0) > > +// > > + > > +// BIOS information (section 7.1) > > +STATIC SMBIOS_TABLE_TYPE0 mArmadaDefaultType0 =3D { > > + { // SMBIOS_STRUCTURE Hdr > > + EFI_SMBIOS_TYPE_BIOS_INFORMATION, // UINT8 Type > > + sizeof (SMBIOS_TABLE_TYPE0), // UINT8 Length > > + SMBIOS_HANDLE_PI_RESERVED, > > + }, > > + 1, // SMBIOS_TABLE_STRING Vendor > > + 2, // SMBIOS_TABLE_STRING BiosVersion > > + 0xE800,// UINT16 BiosSegment > > + 3, // SMBIOS_TABLE_STRING BiosReleaseDate > > + 0, // UINT8 BiosSize > > + { > > + 0,0,0,0,0,0, > > + 1, //PCI supported > > + 0, > > + 1, //PNP supported > > + 0, > > + 1, //BIOS upgradable > > + 0, 0, 0, > > + 0, //Boot from CD > > + 1, //selectable boot > > + }, // MISC_BIOS_CHARACTERISTICS BiosCharacteristics > > + { // BIOSCharacteristicsExtensionBytes[2] > > + 0x3, > > + 0xC, > > + }, > > + 0, // UINT8 SystemBiosMajorRelease > > + 0, // UINT8 SystemBiosMinorRelease > > + 0xFF, // UINT8 > EmbeddedControllerFirmwareMajorRelease > > + 0xFF, // UINT8 > EmbeddedControllerFirmwareMinorRelease > > +}; > > + > > +STATIC CHAR8 CONST *mArmadaDefaultType0Strings[] =3D { > > + "EFI Development Kit II / Marvell\0", /* Vendor */ > > + "EDK II\0", /* BiosVersion */ > > + __DATE__"\0", /* BiosReleaseDate */ > > + NULL > > +}; > > + > > +// System information (section 7.2) > > +STATIC SMBIOS_TABLE_TYPE1 mArmadaDefaultType1 =3D { > > + { // SMBIOS_STRUCTURE Hdr > > + EFI_SMBIOS_TYPE_SYSTEM_INFORMATION, > > + sizeof (SMBIOS_TABLE_TYPE1), > > + SMBIOS_HANDLE_PI_RESERVED, > > + }, > > + 1, //Manufacturer > > + 2, //Product Name > > + 3, //Version > > + 4, //Serial > > + { 0x97c93925, 0x1273, 0x4f03, { > 0x9f,0x75,0x2f,0x2b,0x7e,0xd1,0x94,0x80 }}, //UUID > > + 6, //Wakeup type > > + 0, //SKU > > + 0, //Family > > +}; > > + > > +STATIC CHAR8 CONST *mArmadaDefaultType1Strings[] =3D { > > + "Marvell \0",/* Manufacturer */ > > + "Armada 7k/8k Family Board \0",/* Product Name placeholder*/ > > + "Revision unknown \0",/* Version placeholder */ > > + " \0",/* 32 character buffer */ > > + NULL > > +}; > > + > > +// Baseboard (section 7.3) > > +STATIC SMBIOS_TABLE_TYPE2 mArmadaDefaultType2 =3D { > > + { // SMBIOS_STRUCTURE Hdr > > + EFI_SMBIOS_TYPE_BASEBOARD_INFORMATION, // UINT8 Type > > + sizeof (SMBIOS_TABLE_TYPE2), // UINT8 Length > > + SMBIOS_HANDLE_MOTHERBOARD, > > + }, > > + 1, //Manufacturer > > + 2, //Product Name > > + 3, //Version > > + 4, //Serial > > + 0, //Asset tag > > + {1}, //motherboard, not replaceable > > + 5, //location of board > > + SMBIOS_HANDLE_CHASSIS, > > + BaseBoardTypeMotherBoard, > > + 1, > > + {SMBIOS_HANDLE_A72_CLUSTER}, > > +}; > > + > > +STATIC CHAR8 CONST *mArmadaDefaultType2Strings[] =3D { > > + "Marvell \0",/* Manufacturer */ > > + "Armada 7k/8k Family Board \0",/* Product Name placeholder*/ > > + "Revision unknown \0",/* Version placeholder */ > > + "Serial Not Set \0",/* Serial */ > > + "Base of Chassis \0",/* Board location */ > > + NULL > > +}; > > + > > +// Enclosure > > +STATIC SMBIOS_TABLE_TYPE3 mArmadaDefaultType3 =3D { > > + { // SMBIOS_STRUCTURE Hdr > > + EFI_SMBIOS_TYPE_SYSTEM_ENCLOSURE, // UINT8 Type > > + sizeof (SMBIOS_TABLE_TYPE3), // UINT8 Length > > + SMBIOS_HANDLE_CHASSIS, > > + }, > > + 1, //Manufacturer > > + 2, //enclosure type > > + 2, //version > > + 3, //serial > > + 0, //asset tag > > + ChassisStateUnknown, //boot chassis state > > + ChassisStateSafe, //power supply state > > + ChassisStateSafe, //thermal state > > + ChassisSecurityStatusNone, //security state > > + {0,0,0,0,}, //OEM defined > > + 1, //1U height > > + 1, //number of power cords > > + 0, //no contained elements > > +}; > > + > > +STATIC CHAR8 CONST *mArmadaDefaultType3Strings[] =3D { > > + "Marvell \0",/* Manufacturer placeholder */ > > + "Revision unknown \0",/* Version placeholder */ > > + "Serial Not Set \0",/* Serial placeholder */ > > + NULL > > +}; > > + > > +// Processor > > +STATIC SMBIOS_TABLE_TYPE4 mArmadaDefaultType4 =3D { > > + { // SMBIOS_STRUCTURE Hdr > > + EFI_SMBIOS_TYPE_PROCESSOR_INFORMATION, // UINT8 Type > > + sizeof (SMBIOS_TABLE_TYPE4), // UINT8 Length > > + SMBIOS_HANDLE_A72_CLUSTER, > > + }, > > + 1, //socket type > > + 3, //processor type CPU > > + ProcessorFamilyIndicatorFamily2, //processor family, acquire from > field2 > > + 2, //manufactuer > > + {{0,},{0.}}, //processor id > > + 3, //version > > + {0,0,0,0,0,1}, //voltage > > + 0, //external clock > > + 2000, //max speed > > + 0, //current speed - requires update > > + 0x41, //status > > + ProcessorUpgradeOther, > > + SMBIOS_HANDLE_A72_L1I, //l1 cache handle > > + SMBIOS_HANDLE_A72_L2, //l2 cache handle > > + SMBIOS_HANDLE_L3, //l3 cache handle > > + 0, //serial not set > > + 0, //asset not set > > + 4, //part number > > + 4, //core count in socket > > + 4, //enabled core count in socket > > + 0, //threads per socket > > + 0xEC, //processor characteristics > > + ProcessorFamilyARM, //ARMADA core > > +}; > > + > > +STATIC CHAR8 CONST *mArmadaDefaultType4Strings[] =3D { > > + "Socket type unknown \0", /* Socket type placeholder */ > > + "Marvell\0", /* manufactuer */ > > + "Cortex-A72\0", /* processor description */ > > + "0xd08\0", /* A72 part number */ > > + NULL > > +}; > > + > > +// Cache > > +STATIC SMBIOS_TABLE_TYPE7 mArmadaDefaultType7_a72_l1i =3D { > > + { // SMBIOS_STRUCTURE Hdr > > + EFI_SMBIOS_TYPE_CACHE_INFORMATION, // UINT8 Type > > + sizeof (SMBIOS_TABLE_TYPE7), // UINT8 Length > > + SMBIOS_HANDLE_A72_L1I, > > + }, > > + 1, > > + 0x380, //L1 enabled, unknown WB > > + 48, //48k I-cache max > > + 48, //48k installed > > + {0,1}, //SRAM type > > + {0,1}, //SRAM type > > + 0, //speed unknown > > + CacheErrorParity, //parity checking > > + CacheTypeInstruction, //instruction cache > > + CacheAssociativityOther, //three way > > +}; > > + > > +STATIC SMBIOS_TABLE_TYPE7 mArmadaDefaultType7_a72_l1d =3D { > > + { // SMBIOS_STRUCTURE Hdr > > + EFI_SMBIOS_TYPE_CACHE_INFORMATION, // UINT8 Type > > + sizeof (SMBIOS_TABLE_TYPE7), // UINT8 Length > > + SMBIOS_HANDLE_A72_L1D, > > + }, > > + 2, > > + 0x380, //L1 enabled, unknown WB > > + 32, //32k D-cache max > > + 32, //32k installed > > + {0,1}, //SRAM type > > + {0,1}, //SRAM type > > + 0, //speed unknown > > + CacheErrorParity, //parity checking > > + CacheTypeInstruction, //instruction cache > > + CacheAssociativityOther, //three way > > +}; > > + > > +STATIC SMBIOS_TABLE_TYPE7 mArmadaDefaultType7_a72_l2 =3D { > > + { // SMBIOS_STRUCTURE Hdr > > + EFI_SMBIOS_TYPE_CACHE_INFORMATION, // UINT8 Type > > + sizeof (SMBIOS_TABLE_TYPE7), // UINT8 Length > > + SMBIOS_HANDLE_A72_L2, > > + }, > > + 3, > > + 0x181, //L2 enabled, WB > > + 512, //512k D-cache max > > + 512, //512k installed > > + {0,1}, //SRAM type > > + {0,1}, //SRAM type > > + 0, //speed unknown > > + CacheErrorSingleBit, //ECC checking > > + CacheTypeUnified, //instruction cache > > + CacheAssociativity16Way, //16 way associative > > +}; > > + > > +STATIC SMBIOS_TABLE_TYPE7 mArmadaDefaultType7_l3 =3D { > > + { // SMBIOS_STRUCTURE Hdr > > + EFI_SMBIOS_TYPE_CACHE_INFORMATION, // UINT8 Type > > + sizeof (SMBIOS_TABLE_TYPE7), // UINT8 Length > > + SMBIOS_HANDLE_L3, > > + }, > > + 4, > > + 0x182, //L3 enabled, WB > > + 1024, //1M cache max > > + 1024, //1M installed > > + {0,1}, //SRAM type > > + {0,1}, //SRAM type > > + 0, //speed unknown > > + CacheErrorSingleBit, //ECC checking > > + CacheTypeUnified, //instruction cache > > + CacheAssociativity8Way, //8 way associative > > +}; > > + > > +STATIC CONST CHAR8 *mArmadaDefaultType7Strings[] =3D { > > + "L1 Instruction\0", /* L1I */ > > + "L1 Data\0", /* L1D */ > > + "L2\0", /* L2 */ > > + "L3\0", /* L3 */ > > + NULL > > +}; > > + > > +// Slots > > +STATIC SMBIOS_TABLE_TYPE9 mArmadaDefaultType9_0 =3D { > > + { // SMBIOS_STRUCTURE Hdr > > + EFI_SMBIOS_TYPE_INACTIVE, // UINT8 Type > > + sizeof (SMBIOS_TABLE_TYPE9), // UINT8 Length > > + SMBIOS_HANDLE_PI_RESERVED, > > + }, > > + 1, // CP0 PCIE0 > > + SlotTypePciExpressGen2X1, > > + SlotDataBusWidth1X, > > + SlotUsageUnknown, > > + SlotLengthShort, > > + 0, > > + {1}, //Unknown > > + {1,0,1}, //PME and SMBUS > > + 0, > > + 0, > > + 1, > > +}; > > + > > +STATIC SMBIOS_TABLE_TYPE9 mArmadaDefaultType9_1 =3D { > > + { // SMBIOS_STRUCTURE Hdr > > + EFI_SMBIOS_TYPE_INACTIVE, // UINT8 Type > > + sizeof (SMBIOS_TABLE_TYPE9), // UINT8 Length > > + SMBIOS_HANDLE_PI_RESERVED, > > + }, > > + 2, // CP0 PCIE1 > > + SlotTypePciExpressGen2X1, > > + SlotDataBusWidth1X, > > + SlotUsageUnknown, > > + SlotLengthShort, > > + 0, > > + {1}, > > + {1,0,1}, //PME and SMBUS > > + 0, > > + 0, > > + 2, > > +}; > > + > > +STATIC SMBIOS_TABLE_TYPE9 mArmadaDefaultType9_2 =3D { > > + { // SMBIOS_STRUCTURE Hdr > > + EFI_SMBIOS_TYPE_INACTIVE, // UINT8 Type > > + sizeof (SMBIOS_TABLE_TYPE9), // UINT8 Length > > + SMBIOS_HANDLE_PI_RESERVED, > > + }, > > + 3, // CP0 PCIE2 > > + SlotTypePciExpressGen2X1, > > + SlotDataBusWidth1X, > > + SlotUsageUnknown, > > + SlotLengthShort, > > + 0, > > + {1}, > > + {1,0,1}, //PME and SMBUS > > + 0, > > + 0, > > + 3, > > +}; > > + > > +STATIC SMBIOS_TABLE_TYPE9 mArmadaDefaultType9_3 =3D { > > + { // SMBIOS_STRUCTURE Hdr > > + EFI_SMBIOS_TYPE_INACTIVE, // UINT8 Type > > + sizeof (SMBIOS_TABLE_TYPE9), // UINT8 Length > > + SMBIOS_HANDLE_PI_RESERVED, > > + }, > > + 4, // CP1 PCIE0 > > + SlotTypePciExpressGen2X1, > > + SlotDataBusWidth1X, > > + SlotUsageUnknown, > > + SlotLengthShort, > > + 0, > > + {1}, > > + {1,0,1}, //PME and SMBUS > > + 0, > > + 0, > > + 0xc, > > +}; > > + > > +STATIC SMBIOS_TABLE_TYPE9 mArmadaDefaultType9_4 =3D { > > + { // SMBIOS_STRUCTURE Hdr > > + EFI_SMBIOS_TYPE_INACTIVE, // UINT8 Type > > + sizeof (SMBIOS_TABLE_TYPE9), // UINT8 Length > > + SMBIOS_HANDLE_PI_RESERVED, > > + }, > > + 5, // CP1 PCIE1 > > + SlotTypePciExpressGen2X1, > > + SlotDataBusWidth1X, > > + SlotUsageUnknown, > > + SlotLengthShort, > > + 0, > > + {1}, > > + {1,0,1}, //PME and SMBUS > > + 0, > > + 0, > > + 0xc, > > +}; > > + > > +STATIC SMBIOS_TABLE_TYPE9 mArmadaDefaultType9_5 =3D { > > + { // SMBIOS_STRUCTURE Hdr > > + EFI_SMBIOS_TYPE_INACTIVE, // UINT8 Type > > + sizeof (SMBIOS_TABLE_TYPE9), // UINT8 Length > > + SMBIOS_HANDLE_PI_RESERVED, > > + }, > > + 6, // CP1 PCIE2 > > + SlotTypePciExpressGen2X1, > > + SlotDataBusWidth1X, > > + SlotUsageUnknown, > > + SlotLengthShort, > > + 0, > > + {1}, > > + {1,0,1}, //PME and SMBUS > > + 0, > > + 0, > > + 0xc, > > +}; > > + > > +STATIC CHAR8 CONST *mArmadaDefaultType9Strings[] =3D { > > + "PCIE0 CP0 \0",/* Slot0 */ > > + "PCIE1 CP0 \0",/* Slot1 */ > > + "PCIE2 CP0 \0",/* Slot2 */ > > + "PCIE0 CP1 \0",/* Slot3 */ > > + "PCIE1 CP1 \0",/* Slot4 */ > > + "PCIE2 CP1 \0",/* Slot5 */ > > + NULL > > +}; > > + > > +// Memory array > > +STATIC SMBIOS_TABLE_TYPE16 mArmadaDefaultType16 =3D { > > + { // SMBIOS_STRUCTURE Hdr > > + EFI_SMBIOS_TYPE_PHYSICAL_MEMORY_ARRAY, // UINT8 Type > > + sizeof (SMBIOS_TABLE_TYPE16), // UINT8 Length > > + SMBIOS_HANDLE_MEMORY, > > + }, > > + MemoryArrayLocationSystemBoard, //on motherboard > > + MemoryArrayUseSystemMemory, //system RAM > > + MemoryErrorCorrectionNone, //ECC RAM > > + 0x1000000, //16GB > > + 0xFFFE, //No error information structure > > + 0x1, //soldered memory > > +}; > > + > > +STATIC CHAR8 CONST *mArmadaDefaultType16Strings[] =3D { > > + NULL > > +}; > > + > > +// Memory device > > +STATIC SMBIOS_TABLE_TYPE17 mArmadaDefaultType17 =3D { > > + { // SMBIOS_STRUCTURE Hdr > > + EFI_SMBIOS_TYPE_MEMORY_DEVICE, // UINT8 Type > > + sizeof (SMBIOS_TABLE_TYPE17), // UINT8 Length > > + SMBIOS_HANDLE_DIMM, > > + }, > > + SMBIOS_HANDLE_MEMORY, //array to which this module belongs > > + 0xFFFE, //no errors > > + 64, //single DIMM, no ECC is 64bits (for ecc this would be 72) > > + 32, //data width of this device (32-bits) > > + 0, //Memory size obtained dynamically > > + MemoryFormFactorRowOfChips, //Memory factor > > + 0, //Not part of a set > > + 1, //Right side of board > > + 2, //Bank 0 > > + MemoryTypeDdr4, //DDR4 > > + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, //unbuffered > > + 0, //DRAM speed - requires update > > + 0, //varies between diffrent production runs > > + 0, //serial > > + 0, //asset tag > > + 0, //part number > > + 0, //rank > > +}; > > + > > +STATIC CHAR8 CONST *mArmadaDefaultType17Strings[] =3D { > > + "RIGHT SIDE\0", /* location */ > > + "BANK 0\0", /* bank description */ > > + NULL > > +}; > > + > > +// > > +// Memory array mapped address, this structure > > +// is overridden by SmbiosInstallMemoryStructure. > > +// > > +STATIC SMBIOS_TABLE_TYPE19 mArmadaDefaultType19 =3D { > > + { // SMBIOS_STRUCTURE Hdr > > + EFI_SMBIOS_TYPE_MEMORY_ARRAY_MAPPED_ADDRESS, // UINT8 Type > > + sizeof (SMBIOS_TABLE_TYPE19), // UINT8 Length > > + SMBIOS_HANDLE_PI_RESERVED, > > + }, > > + 0xFFFFFFFF, //invalid, look at extended addr field > > + 0xFFFFFFFF, > > + SMBIOS_HANDLE_DIMM, //handle > > + 1, > > + 0x080000000, //starting addr of first 2GB > > + 0x100000000, //ending addr of first 2GB > > +}; > > + > > +// System boot infomArmadaDefaultType4. > > +STATIC SMBIOS_TABLE_TYPE32 mArmadaDefaultType32 =3D { > > + { // SMBIOS_STRUCTURE Hdr > > + EFI_SMBIOS_TYPE_SYSTEM_BOOT_INFORMATION, // UINT8 Type > > + sizeof (SMBIOS_TABLE_TYPE32), // UINT8 Length > > + SMBIOS_HANDLE_PI_RESERVED, > > + }, > > + {0, 0, 0, 0, 0, 0}, //reserved > > + BootInformationStatusNoError, > > +}; > > + > > +STATIC CHAR8 CONST *mArmadaDefaultType32Strings[] =3D { > > + NULL > > +}; > > + > > +STATIC CONST VOID *DefaultCommonTables[][2] =3D > > +{ > > + { &mArmadaDefaultType0, mArmadaDefaultType0Strings }, > > + { &mArmadaDefaultType1, mArmadaDefaultType1Strings }, > > + { &mArmadaDefaultType2, mArmadaDefaultType2Strings }, > > + { &mArmadaDefaultType3, mArmadaDefaultType3Strings }, > > + { &mArmadaDefaultType4, mArmadaDefaultType4Strings }, > > + { &mArmadaDefaultType7_a72_l1i, mArmadaDefaultType7Strings }, > > + { &mArmadaDefaultType7_a72_l1d, mArmadaDefaultType7Strings }, > > + { &mArmadaDefaultType7_a72_l2, mArmadaDefaultType7Strings }, > > + { &mArmadaDefaultType7_l3, mArmadaDefaultType7Strings }, > > + { &mArmadaDefaultType9_0, mArmadaDefaultType9Strings }, > > + { &mArmadaDefaultType9_1, mArmadaDefaultType9Strings }, > > + { &mArmadaDefaultType9_2, mArmadaDefaultType9Strings }, > > + { &mArmadaDefaultType9_3, mArmadaDefaultType9Strings }, > > + { &mArmadaDefaultType9_4, mArmadaDefaultType9Strings }, > > + { &mArmadaDefaultType9_5, mArmadaDefaultType9Strings }, > > + { &mArmadaDefaultType16, mArmadaDefaultType16Strings }, > > + { &mArmadaDefaultType17, mArmadaDefaultType17Strings }, > > + { &mArmadaDefaultType32, mArmadaDefaultType32Strings }, > > + { NULL, NULL }, > > +}; > > + > > +/** > > + > > + Create SMBIOS record. > > + > > + Converts a fixed SMBIOS structure and an array of pointers to strin= gs > into > > + an SMBIOS record where the strings are cat'ed on the end of the fix= ed > record > > + and terminated via a double NULL and add to SMBIOS table. > > + > > + SMBIOS_TABLE_TYPE32 gSmbiosType12 =3D { > > + { EFI_SMBIOS_TYPE_SYSTEM_CONFIGURATION_OPTIONS, sizeof > (SMBIOS_TABLE_TYPE12), 0 }, > > + 1 // StringCount > > + }; > > + > > + CHAR8 *gSmbiosType12Strings[] =3D { > > + "Not Found", > > + NULL > > + }; > > + > > + ... > > + > > + LogSmbiosData ( > > + (EFI_SMBIOS_TABLE_HEADER*)&gSmbiosType12, > > + gSmbiosType12Strings > > + ); > > + > > + @param Smbios SMBIOS protocol > > + @param Template Fixed SMBIOS structure, required. > > + @param StringArray Array of strings to convert to an SMBIOS string > pack. > > + NULL is OK. > > +**/ > > +STATIC > > +EFI_STATUS > > +EFIAPI > > +LogSmbiosData ( > > + IN EFI_SMBIOS_PROTOCOL *Smbios, > > + IN EFI_SMBIOS_TABLE_HEADER *Template, > > + IN CONST CHAR8 * CONST *StringArray > > + ) > > +{ > > + EFI_STATUS Status; > > + EFI_SMBIOS_TABLE_HEADER *Record; > > + UINTN Index; > > + UINTN StringSize; > > + UINTN Size; > > + CHAR8 *Str; > > + > > + > > + // Calculate the size of the fixed record and optional string pack > > + Size =3D Template->Length; > > + if (StringArray =3D=3D NULL) { > > + // At least a double null is required > > + Size +=3D 1; > > + } else { > > + for (Index =3D 0; StringArray[Index] !=3D NULL; Index++) { > > + StringSize =3D AsciiStrSize (StringArray[Index]); > > + Size +=3D StringSize; > > + } > > + if (StringArray[0] =3D=3D NULL) { > > + // At least a double null is required > > + Size +=3D 1; > > + } > > + > > + // Don't forget the terminating double null > > + Size +=3D 1; > > + } > > + > > + // Copy over Template > > + Record =3D (EFI_SMBIOS_TABLE_HEADER *)AllocateZeroPool (Size); > > + if (Record =3D=3D NULL) { > > + return EFI_OUT_OF_RESOURCES; > > + } > > + CopyMem (Record, Template, Template->Length); > > + > > + // Append string pack > > + Str =3D ((VOID *)Record) + Record->Length; > > + for (Index =3D 0; StringArray[Index] !=3D NULL; Index++) { > > + StringSize =3D AsciiStrSize (StringArray[Index]); > > + CopyMem (Str, StringArray[Index], StringSize); > > + Str +=3D StringSize; > > + } > > + *Str =3D 0; > > + > > + Status =3D Smbios->Add (Smbios, > > + NULL, > > + &Record->Handle, > > + Record); > > + ASSERT_EFI_ERROR (Status); > > + > > + FreePool (Record); > > + > > + return Status; > > +} > > + > > +/** > > + Installs a memory descriptor (type19) for the given address range > > + > > + @param Smbios SMBIOS protocol. > > + @param StartingAddress Start address of the memory chunk. > > + @param RegionLength Memory chunk size. > > + > > +**/ > > +EFI_STATUS > > +SmbiosInstallMemoryStructure ( > > + IN EFI_SMBIOS_PROTOCOL *Smbios, > > + IN UINT64 StartingAddress, > > + IN UINT64 RegionLength > > + ) > > +{ > > + EFI_SMBIOS_HANDLE SmbiosHandle; > > + SMBIOS_TABLE_TYPE19 MemoryDescriptor; > > + EFI_STATUS Status =3D EFI_SUCCESS; > > + > > + CopyMem (&MemoryDescriptor, > > + &mArmadaDefaultType19, > > + sizeof (SMBIOS_TABLE_TYPE19)); > > + > > + MemoryDescriptor.ExtendedStartingAddress =3D StartingAddress; > > + MemoryDescriptor.ExtendedEndingAddress =3D StartingAddress + > RegionLength; > > + SmbiosHandle =3D MemoryDescriptor.Hdr.Handle; > > + > > + Status =3D Smbios->Add (Smbios, > > + NULL, > > + &SmbiosHandle, > > + (EFI_SMBIOS_TABLE_HEADER*) &MemoryDescriptor); > > + > > + return Status; > > +} > > + > > +/** > > + Install a whole table worth of structructures > > + > > + @param Smbios SMBIOS protocol. > > + @param DefaultTables A pointer to the default SMBIOS table > structure. > > + > > +**/ > > +EFI_STATUS > > +SmbiosInstallStructures ( > > + IN EFI_SMBIOS_PROTOCOL *Smbios, > > + IN CONST VOID *DefaultTables[][2] > > + ) > > +{ > > + EFI_STATUS Status =3D EFI_SUCCESS; > > + INTN TableEntry; > > + > > + for (TableEntry =3D 0; DefaultTables[TableEntry][0] !=3D NULL; > TableEntry++) { > > + // Omit disabled tables > > + if (((EFI_SMBIOS_TABLE_HEADER > *)DefaultTables[TableEntry][0])->Type =3D=3D > > + EFI_SMBIOS_TYPE_INACTIVE) { > > + continue; > > + } > > + > > + Status =3D LogSmbiosData (Smbios, > > + ((EFI_SMBIOS_TABLE_HEADER > *)DefaultTables[TableEntry][0]), > > + DefaultTables[TableEntry][1]); > > + if (EFI_ERROR (Status)) > > + break; > > + } > > + > > + return Status; > > +} > > + > > +/** > > + Update memory information basing on the HOB list. > > + > > + @param Smbios SMBIOS protocol > > + > > +**/ > > +STATIC > > +EFI_STATUS > > +SmbiosMemoryInstall ( > > + IN EFI_SMBIOS_PROTOCOL *Smbios > > + ) > > +{ > > + EFI_PEI_HOB_POINTERS Hob; > > + UINT64 MemorySize; > > + EFI_STATUS Status; > > + > > + MemorySize =3D 0; > > + > > + // > > + // Get the HOB list for processing > > + // > > + Hob.Raw =3D GetHobList (); > > + > > + // > > + // Collect memory ranges > > + // > > + while (!END_OF_HOB_LIST (Hob)) { > > + if (Hob.Header->HobType =3D=3D EFI_HOB_TYPE_RESOURCE_DESCRIPTOR) = { > > + if (Hob.ResourceDescriptor->ResourceType =3D=3D > EFI_RESOURCE_SYSTEM_MEMORY) { > > + MemorySize +=3D > (UINT64)(Hob.ResourceDescriptor->ResourceLength); > > + > > + Status =3D SmbiosInstallMemoryStructure (Smbios, > > + Hob.ResourceDescriptor->PhysicalStart, > > + Hob.ResourceDescriptor->ResourceLength); > > + if (EFI_ERROR(Status)) { > > + return Status; > > + } > > + } > > + } > > + Hob.Raw =3D GET_NEXT_HOB (Hob); > > + } > > + > > + // > > + // Update TYPE17 memory size field > > + // > > + mArmadaDefaultType17.Size =3D (UINT16)(MemorySize >> 20); > > + > > + return EFI_SUCCESS; > > +} > > + > > +/** > > + Install all structures from the DefaultTables structure > > + > > + @param Smbios SMBIOS protocol > > + > > +**/ > > +EFI_STATUS > > +SmbiosInstallAllStructures ( > > + IN EFI_SMBIOS_PROTOCOL *Smbios > > + ) > > +{ > > + EFI_STATUS Status; > > + UINT32 FirmwareMajorRevisionNumber; > > + UINT32 FirmwareMinorRevisionNumber; > > + > > + FirmwareMajorRevisionNumber =3D (PcdGet32 (PcdFirmwareRevision) >> = 16) > & 0xFF; > > + FirmwareMinorRevisionNumber =3D PcdGet32 (PcdFirmwareRevision) & 0x= FF; > > + > > + // > > + // Update Firmware Revision, CPU and DRAM frequencies. > > + // > > + mArmadaDefaultType0.SystemBiosMajorRelease =3D > FirmwareMajorRevisionNumber; > > + mArmadaDefaultType0.SystemBiosMinorRelease =3D > FirmwareMinorRevisionNumber; > > + mArmadaDefaultType4.CurrentSpeed =3D SampleAtResetGetCpuFrequency (= ); > > + mArmadaDefaultType17.Speed =3D SampleAtResetGetDramFrequency (); > > + > > + // > > + // Generate memory descriptors. > > + // > > + Status =3D SmbiosMemoryInstall (Smbios); > > + ASSERT_EFI_ERROR (Status); > > + > > + // > > + // Install all tables. > > + // > > + Status =3D SmbiosInstallStructures (Smbios, DefaultCommonTables); > > + ASSERT_EFI_ERROR (Status); > > + > > + return EFI_SUCCESS; > > +} > > + > > +/** > > + Installs SMBIOS information for Armada platforms > > + > > + @param ImageHandle Module's image handle > > + @param SystemTable Pointer of EFI_SYSTEM_TABLE > > + > > + @retval EFI_SUCCESS Smbios data successfully installed > > + @retval Other Smbios data was not installed > > + > > +**/ > > +EFI_STATUS > > +EFIAPI > > +SmbiosPlatformDriverEntryPoint ( > > + IN EFI_HANDLE ImageHandle, > > + IN EFI_SYSTEM_TABLE *SystemTable > > + ) > > +{ > > + EFI_STATUS Status; > > + EFI_SMBIOS_PROTOCOL *Smbios; > > + > > + // > > + // Find the SMBIOS protocol > > + // > > + Status =3D gBS->LocateProtocol (&gEfiSmbiosProtocolGuid, > > + NULL, > > + (VOID **)&Smbios); > > + if (EFI_ERROR (Status)) { > > + return Status; > > + } > > + > > + Status =3D SmbiosInstallAllStructures (Smbios); > > + > > + return Status; > > +} > > > > >=20 > > --000000000000ac27a4058a32d814 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Jeremy,

Thank= s for a quick test!

1. Cache sizes - here's th= e dmidecode output

Handle 0x1000, DMI type 7,= 27 bytes
Cache Information
Socket Designation: L1 Instruction
[...]
<= span style=3D"white-space:pre"> Installed Size: 48 kB
= [...]

Handle 0x1001, DMI type 7, 27 bytes
Cache Information
Socke= t Designation: L1 Data
[...]=C2=A0=C2=A0
Installed Size: 32 kB
Maximum Size: 32 kB
[...]=C2=A0
=C2=A0
Handle 0x1002, DMI type 7, 27 bytes
C= ache Information
Socket D= esignation: L2
[...]=C2=A0=C2=A0=C2=A0=C2=A0
Installed Size: 512 kB
Maximum Size: 512 kB
[...]=C2=A0= =C2=A0=C2=A0=C2=A0

Handle 0x1003, DMI type 7,= 27 bytes
Cache Information
Socket Designation: L3
[...]=C2=A0=C2=A0=C2=A0=C2=A0=
Installed Size: 1024= kB
Maximum Size: 1024 kB=
[...]=C2=A0=C2=A0=C2=A0

Above size valu= es match the spec. Am I missing something?

2. DIMM= /SPD data is read and processed in ARM-TF. Currently processing this data i= s not available in EDK2. On the other hand Table19 and TYPE 17 shows the re= al memory map and size, which is read during EDK2 init (check GetDramSize (= ) in=C2=A0Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/Armada7k8kLibMem= .c) from via SMC from the secure world.

DDR speed = is also read from the SoC registers.

Any particula= r data that you are missing?

3. In next step I'= ;d like to use BoardDescProtocol to update a couple of tables fields such a= s name, revision number, PCIE slots information.

=
Best regards,
Marcin


<= /div>

pt., 31 maj 2019 o 19:05=C2=A0Jeremy Lin= ton <jeremy.linton@arm.com&= gt; napisa=C5=82(a):
Hi,

I'm super in favor of this, but.. I noticed while trying to test it th= at
the cache sizes being displayed by dmidecode don't seem to match what = is
in this table, implying something doesn't appear to be 100% correct.
Also, while its understandable all the missing serial/chassis/etc
fields, the dimm data should be available? I assume the dimm training
add-on is reading the SPD from the dimm, so it can/should be stored
somewhere?

Thanks,


On 5/31/19 11:20 AM, Marcin Wojtas via Groups.Io wrote:
> Fill in the basic requirements of the SMBIOS specification by specify= ing
> the minimum required structures. The basic fixup is performed.
> CPU/DRAM frequency is obtained via SampleAtResetlib and the DRAM size=
> is calculated from the information stored in the HOB list.
>
> Add new Armada SmbiosPlatformDxe and MdeModulePkg/SmbiosDxe to the > build and firmware image. With these changes, the EFI BDS, EFI shell,=
> and Linux dmidecode command return useful information.
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Marcin Wojtas <mw@semihalf.com>
> ---
> Hi,
>
> This is the second version of the SmBios support for
> Armada platforms, addressing all remarks from the initial
> patch. Please check the changelog below.
>
> In order to ease review, the patch is available in the github:
> https://github.com/MarvellEmbeddedProcessors/edk2-open-platform/commits/= smbios-upstream-r20190531
>
> Looking forward to your comments.
>
> Best regards,
> Marcin
>
> Changelog:
> v1->v2:
> * Update SMBIOS version to 3.2
> * Correct copyright name and remove unused Packages/LibraryClasses/Pc= ds
> * Remove unused headers
> * SMBIOS_REFRENCE_HANDLES
>=C2=A0 =C2=A0 - Drop CA53 references
>=C2=A0 =C2=A0 - SMBIOS_HANDLE_A72_L3/SMBIOS_HANDLE_L3
>=C2=A0 =C2=A0 - Add SMBIOS_HANDLE_A72_L1D and according type7 table > * Do not use 'fixup' word
> * Unify string placeholders to 32 signs
> * LogSmbiosData
>=C2=A0 =C2=A0 - Use same variable name as in=C2=A0 DoxyGen blurb
>=C2=A0 =C2=A0 - Fix indentation in for loop
>=C2=A0 =C2=A0 - Set double null in the same way in all cases.
>=C2=A0 =C2=A0 - Cast Record with (VOID *)
> * Add missing parameters description of SmbiosInstallMemoryStructure(= ) and SmbiosInstallStructures()
> * Split variable assignment with its declaration in SmbiosMemoryInsta= ll()
> * Keep firmware revision in local variables in SmbiosInstallAllStruct= ures()
>
>=C2=A0 =C2=A0Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A09= +
>=C2=A0 =C2=A0Silicon/Marvell/Armada7k8k/Armada7k8k.fdf=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2= =A0 =C2=A04 +
>=C2=A0 =C2=A0Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformD= xe.inf |=C2=A0 50 ++
>=C2=A0 =C2=A0Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformD= xe.c=C2=A0 =C2=A0| 813 ++++++++++++++++++++
>=C2=A0 =C2=A04 files changed, 876 insertions(+)
>=C2=A0 =C2=A0create mode 100644 Silicon/Marvell/Drivers/SmbiosPlatform= Dxe/SmbiosPlatformDxe.inf
>=C2=A0 =C2=A0create mode 100644 Silicon/Marvell/Drivers/SmbiosPlatform= Dxe/SmbiosPlatformDxe.c
>
> diff --git a/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc b/Silicon/= Marvell/Armada7k8k/Armada7k8k.dsc.inc
> index 0e63bc8..ed716a7 100644
> --- a/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
> +++ b/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
> @@ -398,6 +398,11 @@
>=C2=A0 =C2=A0 =C2=A0gMarvellTokenSpaceGuid.PcdOpTeeRegionBase|0x440000= 0
>=C2=A0 =C2=A0 =C2=A0gMarvellTokenSpaceGuid.PcdOpTeeRegionSize|0x100000= 0
>=C2=A0 =C2=A0
> +=C2=A0 # SMBIOS/DMI
> +=C2=A0 gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0
> +=C2=A0 gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosEntryPointProvideMeth= od|0x2
> +=C2=A0 gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0320
> +
>=C2=A0 =C2=A0 =C2=A0# TRNG
>=C2=A0 =C2=A0 =C2=A0gMarvellTokenSpaceGuid.PcdEip76TrngBaseAddress|0xF= 2760000
>=C2=A0 =C2=A0
> @@ -615,6 +620,10 @@
>=C2=A0 =C2=A0 =C2=A0ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDyn= amicCommand.inf
>=C2=A0 =C2=A0!endif #$(INCLUDE_TFTP_COMMAND)
>=C2=A0 =C2=A0
> +=C2=A0 # SMBIOS/DMI
> +=C2=A0 MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
> +=C2=A0 Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.i= nf
> +
>=C2=A0 =C2=A0[Components.AARCH64]
>=C2=A0 =C2=A0 =C2=A0#
>=C2=A0 =C2=A0 =C2=A0# Generic ACPI modules
> diff --git a/Silicon/Marvell/Armada7k8k/Armada7k8k.fdf b/Silicon/Marv= ell/Armada7k8k/Armada7k8k.fdf
> index f59cc1f..e003623 100644
> --- a/Silicon/Marvell/Armada7k8k/Armada7k8k.fdf
> +++ b/Silicon/Marvell/Armada7k8k/Armada7k8k.fdf
> @@ -207,6 +207,10 @@ FvNameGuid=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D = 5eda4200-2c5f-43cb-9da3-0baf74b1b30c
>=C2=A0 =C2=A0 =C2=A0# DTB
>=C2=A0 =C2=A0 =C2=A0INF EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDx= e.inf
>=C2=A0 =C2=A0
> +=C2=A0 # SMBIOS/DMI
> +=C2=A0 INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
> +=C2=A0 INF Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformD= xe.inf
> +
>=C2=A0 =C2=A0!if $(ARCH) =3D=3D AARCH64
>=C2=A0 =C2=A0 =C2=A0# ACPI support
>=C2=A0 =C2=A0 =C2=A0INF MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/Ac= piPlatformDxe.inf
> diff --git a/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatform= Dxe.inf b/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf > new file mode 100644
> index 0000000..8fa0438
> --- /dev/null
> +++ b/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf=
> @@ -0,0 +1,50 @@
> +#/** @file
> +#=C2=A0 SMBIOS Table for ARM platform
> +#
> +#=C2=A0 Copyright (c) 2013, Linaro Ltd. All rights reserved.<BR&g= t;
> +#=C2=A0 Copyright (c) 2019, Marvell International Ltd. and its affil= iates
> +#
> +#=C2=A0 This program and the accompanying materials
> +#=C2=A0 are licensed and made available under the terms and conditio= ns of the BSD License
> +#=C2=A0 which accompanies this distribution.=C2=A0 The full text of = the license may be found at
> +#=C2=A0 http://opensource.org/licenses/bsd-lice= nse.php
> +#
> +#=C2=A0 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "= ;AS IS" BASIS,
> +#=C2=A0 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EX= PRESS OR IMPLIED.
> +#
> +#**/
> +
> +[Defines]
> +=C2=A0 INF_VERSION=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =3D 0x0001001B
> +=C2=A0 BASE_NAME=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= = =A0 =C2=A0 =C2=A0 =C2=A0 =3D SmbiosPlatformDxe
> +=C2=A0 FILE_GUID=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= = =A0 =C2=A0 =C2=A0 =C2=A0 =3D 1c5028a4-3bd0-43cf-9e56-b450584dc22b
> +=C2=A0 MODULE_TYPE=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =3D DXE_DRIVER
> +=C2=A0 VERSION_STRING=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0=3D 1.0
> +=C2=A0 ENTRY_POINT=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =3D SmbiosPlatformDriverEntryPoint
> +
> +[Sources]
> +=C2=A0 SmbiosPlatformDxe.c
> +
> +[Packages]
> +=C2=A0 MdeModulePkg/MdeModulePkg.dec
> +=C2=A0 MdePkg/MdePkg.dec
> +=C2=A0 Silicon/Marvell/Marvell.dec
> +
> +[LibraryClasses]
> +=C2=A0 BaseLib
> +=C2=A0 BaseMemoryLib
> +=C2=A0 DebugLib
> +=C2=A0 HobLib
> +=C2=A0 PcdLib
> +=C2=A0 SampleAtResetLib
> +=C2=A0 UefiBootServicesTableLib
> +=C2=A0 UefiDriverEntryPoint
> +
> +[FixedPcd]
> +=C2=A0 gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision
> +
> +[Protocols]
> +=C2=A0 gEfiSmbiosProtocolGuid=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # PROTOCOL ALWAYS_CONSUMED
> +
> +[Depex]
> +=C2=A0 gEfiSmbiosProtocolGuid
> diff --git a/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatform= Dxe.c b/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c
> new file mode 100644
> index 0000000..12ee72e
> --- /dev/null
> +++ b/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c > @@ -0,0 +1,813 @@
> +/** @file
> +=C2=A0 This driver installs SMBIOS information for Marvell Armada pl= atforms
> +
> +=C2=A0 Copyright (c) 2015, ARM Limited. All rights reserved.
> +=C2=A0 Copyright (c) 2019, Marvell International Ltd. and its affili= ates
> +
> +=C2=A0 This program and the accompanying materials
> +=C2=A0 are licensed and made available under the terms and condition= s of the BSD License
> +=C2=A0 which accompanies this distribution.=C2=A0 The full text of t= he license may be found at
> +=C2=A0 http://opensource.org/licenses/bsd-licen= se.php
> +
> +=C2=A0 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "= AS IS" BASIS,
> +=C2=A0 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXP= RESS OR IMPLIED.
> +
> +**/
> +#include <Library/BaseLib.h>
> +#include <Library/BaseMemoryLib.h>
> +#include <Library/DebugLib.h>
> +#include <Library/HobLib.h>
> +#include <Library/MemoryAllocationLib.h>
> +#include <Library/PcdLib.h>
> +#include <Library/SampleAtResetLib.h>
> +#include <Library/UefiBootServicesTableLib.h>
> +
> +#include <Protocol/Smbios.h>
> +
> +#include <IndustryStandard/SmBios.h>
> +
> +//
> +// SMBIOS tables often reference each other using
> +// fixed constants, define a list of these constants
> +// for our hardcoded tables
> +//
> +enum SMBIOS_REFRENCE_HANDLES {
> +=C2=A0 SMBIOS_HANDLE_A72_L1I =3D 0x1000,
> +=C2=A0 SMBIOS_HANDLE_A72_L1D,
> +=C2=A0 SMBIOS_HANDLE_A72_L2,
> +=C2=A0 SMBIOS_HANDLE_L3,
> +=C2=A0 SMBIOS_HANDLE_MOTHERBOARD,
> +=C2=A0 SMBIOS_HANDLE_CHASSIS,
> +=C2=A0 SMBIOS_HANDLE_A72_CLUSTER,
> +=C2=A0 SMBIOS_HANDLE_MEMORY,
> +=C2=A0 SMBIOS_HANDLE_DIMM
> +};
> +
> +//
> +// Type definition and contents of the default SMBIOS table.
> +// This table covers only the minimum structures required by
> +// the SMBIOS specification (section 6.2, version 3.0)
> +//
> +
> +// BIOS information (section 7.1)
> +STATIC SMBIOS_TABLE_TYPE0 mArmadaDefaultType0 =3D {
> +=C2=A0 { // SMBIOS_STRUCTURE Hdr
> +=C2=A0 =C2=A0 EFI_SMBIOS_TYPE_BIOS_INFORMATION, // UINT8 Type
> +=C2=A0 =C2=A0 sizeof (SMBIOS_TABLE_TYPE0),=C2=A0 =C2=A0 =C2=A0 // UI= NT8 Length
> +=C2=A0 =C2=A0 SMBIOS_HANDLE_PI_RESERVED,
> +=C2=A0 },
> +=C2=A0 1,=C2=A0 =C2=A0 =C2=A0// SMBIOS_TABLE_STRING=C2=A0 =C2=A0 =C2= = =A0 =C2=A0Vendor
> +=C2=A0 2,=C2=A0 =C2=A0 =C2=A0// SMBIOS_TABLE_STRING=C2=A0 =C2=A0 =C2= = =A0 =C2=A0BiosVersion
> +=C2=A0 0xE800,// UINT16=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= = =A0 =C2=A0 =C2=A0 =C2=A0 BiosSegment
> +=C2=A0 3,=C2=A0 =C2=A0 =C2=A0// SMBIOS_TABLE_STRING=C2=A0 =C2=A0 =C2= = =A0 =C2=A0BiosReleaseDate
> +=C2=A0 0,=C2=A0 =C2=A0 =C2=A0// UINT8=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= = =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0BiosSize
> +=C2=A0 {
> +=C2=A0 =C2=A0 0,0,0,0,0,0,
> +=C2=A0 =C2=A0 1, //PCI supported
> +=C2=A0 =C2=A0 0,
> +=C2=A0 =C2=A0 1, //PNP supported
> +=C2=A0 =C2=A0 0,
> +=C2=A0 =C2=A0 1, //BIOS upgradable
> +=C2=A0 =C2=A0 0, 0, 0,
> +=C2=A0 =C2=A0 0, //Boot from CD
> +=C2=A0 =C2=A0 1, //selectable boot
> +=C2=A0 },=C2=A0 =C2=A0// MISC_BIOS_CHARACTERISTICS BiosCharacteristi= cs
> +=C2=A0 {=C2=A0 =C2=A0 // BIOSCharacteristicsExtensionBytes[2]
> +=C2=A0 =C2=A0 0x3,
> +=C2=A0 =C2=A0 0xC,
> +=C2=A0 },
> +=C2=A0 0,=C2=A0 =C2=A0 =C2=A0// UINT8=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= = =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0SystemBiosMajorRelease
> +=C2=A0 0,=C2=A0 =C2=A0 =C2=A0// UINT8=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= = =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0SystemBiosMinorRelease
> +=C2=A0 0xFF,=C2=A0 // UINT8=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0EmbeddedControllerFirmwareMajorRelease > +=C2=A0 0xFF,=C2=A0 // UINT8=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0EmbeddedControllerFirmwareMinorRelease > +};
> +
> +STATIC CHAR8 CONST *mArmadaDefaultType0Strings[] =3D {
> +=C2=A0 "EFI Development Kit II / Marvell\0", /* Vendor */<= br> > +=C2=A0 "EDK II\0",=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* BiosVersion = */
> +=C2=A0 __DATE__"\0",=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= = =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* BiosReleaseDate */<= br> > +=C2=A0 NULL
> +};
> +
> +// System information (section 7.2)
> +STATIC SMBIOS_TABLE_TYPE1 mArmadaDefaultType1 =3D {
> +=C2=A0 { // SMBIOS_STRUCTURE Hdr
> +=C2=A0 =C2=A0 EFI_SMBIOS_TYPE_SYSTEM_INFORMATION,
> +=C2=A0 =C2=A0 sizeof (SMBIOS_TABLE_TYPE1),
> +=C2=A0 =C2=A0 SMBIOS_HANDLE_PI_RESERVED,
> +=C2=A0 },
> +=C2=A0 1,=C2=A0 =C2=A0 =C2=A0//Manufacturer
> +=C2=A0 2,=C2=A0 =C2=A0 =C2=A0//Product Name
> +=C2=A0 3,=C2=A0 =C2=A0 =C2=A0//Version
> +=C2=A0 4,=C2=A0 =C2=A0 =C2=A0//Serial
> +=C2=A0 { 0x97c93925, 0x1273, 0x4f03, { 0x9f,0x75,0x2f,0x2b,0x7e,0xd1= ,0x94,0x80 }},=C2=A0 =C2=A0 //UUID
> +=C2=A0 6,=C2=A0 =C2=A0 =C2=A0//Wakeup type
> +=C2=A0 0,=C2=A0 =C2=A0 =C2=A0//SKU
> +=C2=A0 0,=C2=A0 =C2=A0 =C2=A0//Family
> +};
> +
> +STATIC CHAR8 CONST *mArmadaDefaultType1Strings[] =3D {
> +=C2=A0 "Marvell=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \0",/* Manufacturer */
> +=C2=A0 "Armada 7k/8k Family Board=C2=A0 =C2=A0 =C2=A0 \0",= /* Product Name placeholder*/
> +=C2=A0 "Revision unknown=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0\0",/* Version placeholder */
> +=C2=A0 "=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\0",/* 32 char= acter buffer */
> +=C2=A0 NULL
> +};
> +
> +// Baseboard (section 7.3)
> +STATIC SMBIOS_TABLE_TYPE2 mArmadaDefaultType2 =3D {
> +=C2=A0 { // SMBIOS_STRUCTURE Hdr
> +=C2=A0 =C2=A0 EFI_SMBIOS_TYPE_BASEBOARD_INFORMATION, // UINT8 Type > +=C2=A0 =C2=A0 sizeof (SMBIOS_TABLE_TYPE2),=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0// UINT8 Length
> +=C2=A0 =C2=A0 SMBIOS_HANDLE_MOTHERBOARD,
> +=C2=A0 },
> +=C2=A0 1,=C2=A0 =C2=A0 //Manufacturer
> +=C2=A0 2,=C2=A0 =C2=A0 //Product Name
> +=C2=A0 3,=C2=A0 =C2=A0 //Version
> +=C2=A0 4,=C2=A0 =C2=A0 //Serial
> +=C2=A0 0,=C2=A0 =C2=A0 //Asset tag
> +=C2=A0 {1},=C2=A0 //motherboard, not replaceable
> +=C2=A0 5,=C2=A0 =C2=A0 //location of board
> +=C2=A0 SMBIOS_HANDLE_CHASSIS,
> +=C2=A0 BaseBoardTypeMotherBoard,
> +=C2=A0 1,
> +=C2=A0 {SMBIOS_HANDLE_A72_CLUSTER},
> +};
> +
> +STATIC CHAR8 CONST *mArmadaDefaultType2Strings[] =3D {
> +=C2=A0 "Marvell=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \0",/* Manufacturer */
> +=C2=A0 "Armada 7k/8k Family Board=C2=A0 =C2=A0 =C2=A0 \0",= /* Product Name placeholder*/
> +=C2=A0 "Revision unknown=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0\0",/* Version placeholder */
> +=C2=A0 "Serial Not Set=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0\0",/* Serial */
> +=C2=A0 "Base of Chassis=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 \0",/* Board location */
> +=C2=A0 NULL
> +};
> +
> +// Enclosure
> +STATIC SMBIOS_TABLE_TYPE3 mArmadaDefaultType3 =3D {
> +=C2=A0 { // SMBIOS_STRUCTURE Hdr
> +=C2=A0 =C2=A0 EFI_SMBIOS_TYPE_SYSTEM_ENCLOSURE, // UINT8 Type
> +=C2=A0 =C2=A0 sizeof (SMBIOS_TABLE_TYPE3),=C2=A0 =C2=A0 =C2=A0 // UI= NT8 Length
> +=C2=A0 =C2=A0 SMBIOS_HANDLE_CHASSIS,
> +=C2=A0 },
> +=C2=A0 1,=C2=A0 =C2=A0//Manufacturer
> +=C2=A0 2,=C2=A0 =C2=A0//enclosure type
> +=C2=A0 2,=C2=A0 =C2=A0//version
> +=C2=A0 3,=C2=A0 =C2=A0//serial
> +=C2=A0 0,=C2=A0 =C2=A0//asset tag
> +=C2=A0 ChassisStateUnknown,=C2=A0 =C2=A0//boot chassis state
> +=C2=A0 ChassisStateSafe,=C2=A0 =C2=A0 =C2=A0 //power supply state > +=C2=A0 ChassisStateSafe,=C2=A0 =C2=A0 =C2=A0 //thermal state
> +=C2=A0 ChassisSecurityStatusNone,=C2=A0 =C2=A0//security state
> +=C2=A0 {0,0,0,0,}, //OEM defined
> +=C2=A0 1,=C2=A0 //1U height
> +=C2=A0 1,=C2=A0 //number of power cords
> +=C2=A0 0,=C2=A0 //no contained elements
> +};
> +
> +STATIC CHAR8 CONST *mArmadaDefaultType3Strings[] =3D {
> +=C2=A0 "Marvell=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \0",/* Manufacturer placeholder */=
> +=C2=A0 "Revision unknown=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0\0",/* Version placeholder */
> +=C2=A0 "Serial Not Set=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0\0",/* Serial placeholder */
> +=C2=A0 NULL
> +};
> +
> +// Processor
> +STATIC SMBIOS_TABLE_TYPE4 mArmadaDefaultType4 =3D {
> +=C2=A0 { // SMBIOS_STRUCTURE Hdr
> +=C2=A0 =C2=A0 EFI_SMBIOS_TYPE_PROCESSOR_INFORMATION, // UINT8 Type > +=C2=A0 =C2=A0 sizeof (SMBIOS_TABLE_TYPE4),=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0// UINT8 Length
> +=C2=A0 =C2=A0 SMBIOS_HANDLE_A72_CLUSTER,
> +=C2=A0 },
> +=C2=A0 1, //socket type
> +=C2=A0 3, //processor type CPU
> +=C2=A0 ProcessorFamilyIndicatorFamily2, //processor family, acquire = from field2
> +=C2=A0 2,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0//manufactu= er
> +=C2=A0 {{0,},{0.}},=C2=A0 =C2=A0//processor id
> +=C2=A0 3,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0//version > +=C2=A0 {0,0,0,0,0,1}, //voltage
> +=C2=A0 0,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0//external = clock
> +=C2=A0 2000,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 //max speed
> +=C2=A0 0,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0//current s= peed - requires update
> +=C2=A0 0x41,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 //status
> +=C2=A0 ProcessorUpgradeOther,
> +=C2=A0 SMBIOS_HANDLE_A72_L1I, //l1 cache handle
> +=C2=A0 SMBIOS_HANDLE_A72_L2,=C2=A0 //l2 cache handle
> +=C2=A0 SMBIOS_HANDLE_L3,=C2=A0 =C2=A0 =C2=A0 //l3 cache handle
> +=C2=A0 0,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0//serial no= t set
> +=C2=A0 0,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0//asset not= set
> +=C2=A0 4,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0//part numb= er
> +=C2=A0 4,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0//core coun= t in socket
> +=C2=A0 4,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0//enabled c= ore count in socket
> +=C2=A0 0,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0//threads p= er socket
> +=C2=A0 0xEC,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 //processor character= istics
> +=C2=A0 ProcessorFamilyARM, //ARMADA core
> +};
> +
> +STATIC CHAR8 CONST *mArmadaDefaultType4Strings[] =3D {
> +=C2=A0 "Socket type unknown=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0\0", /* Socket type placeholder */
> +=C2=A0 "Marvell\0",=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* manufactuer */
> +=C2=A0 "Cortex-A72\0",=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* processor description */
> +=C2=A0 "0xd08\0",=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* A72 part number */
> +=C2=A0 NULL
> +};
> +
> +// Cache
> +STATIC SMBIOS_TABLE_TYPE7 mArmadaDefaultType7_a72_l1i =3D {
> +=C2=A0 { // SMBIOS_STRUCTURE Hdr
> +=C2=A0 =C2=A0 EFI_SMBIOS_TYPE_CACHE_INFORMATION, // UINT8 Type
> +=C2=A0 =C2=A0 sizeof (SMBIOS_TABLE_TYPE7),=C2=A0 =C2=A0 =C2=A0 =C2= =A0// UINT8 Length
> +=C2=A0 =C2=A0 SMBIOS_HANDLE_A72_L1I,
> +=C2=A0 },
> +=C2=A0 1,
> +=C2=A0 0x380, //L1 enabled, unknown WB
> +=C2=A0 48,=C2=A0 =C2=A0 //48k I-cache max
> +=C2=A0 48,=C2=A0 =C2=A0 //48k installed
> +=C2=A0 {0,1}, //SRAM type
> +=C2=A0 {0,1}, //SRAM type
> +=C2=A0 0,=C2=A0 =C2=A0 =C2=A0//speed unknown
> +=C2=A0 CacheErrorParity,=C2=A0 =C2=A0 =C2=A0 =C2=A0 //parity checkin= g
> +=C2=A0 CacheTypeInstruction,=C2=A0 =C2=A0 //instruction cache
> +=C2=A0 CacheAssociativityOther, //three way
> +};
> +
> +STATIC SMBIOS_TABLE_TYPE7 mArmadaDefaultType7_a72_l1d =3D {
> +=C2=A0 { // SMBIOS_STRUCTURE Hdr
> +=C2=A0 =C2=A0 EFI_SMBIOS_TYPE_CACHE_INFORMATION, // UINT8 Type
> +=C2=A0 =C2=A0 sizeof (SMBIOS_TABLE_TYPE7),=C2=A0 =C2=A0 =C2=A0 =C2= =A0// UINT8 Length
> +=C2=A0 =C2=A0 SMBIOS_HANDLE_A72_L1D,
> +=C2=A0 },
> +=C2=A0 2,
> +=C2=A0 0x380, //L1 enabled, unknown WB
> +=C2=A0 32,=C2=A0 =C2=A0 //32k D-cache max
> +=C2=A0 32,=C2=A0 =C2=A0 //32k installed
> +=C2=A0 {0,1}, //SRAM type
> +=C2=A0 {0,1}, //SRAM type
> +=C2=A0 0,=C2=A0 =C2=A0 =C2=A0//speed unknown
> +=C2=A0 CacheErrorParity,=C2=A0 =C2=A0 =C2=A0 =C2=A0 //parity checkin= g
> +=C2=A0 CacheTypeInstruction,=C2=A0 =C2=A0 //instruction cache
> +=C2=A0 CacheAssociativityOther, //three way
> +};
> +
> +STATIC SMBIOS_TABLE_TYPE7 mArmadaDefaultType7_a72_l2 =3D {
> +=C2=A0 { // SMBIOS_STRUCTURE Hdr
> +=C2=A0 =C2=A0 EFI_SMBIOS_TYPE_CACHE_INFORMATION, // UINT8 Type
> +=C2=A0 =C2=A0 sizeof (SMBIOS_TABLE_TYPE7),=C2=A0 =C2=A0 =C2=A0 =C2= =A0// UINT8 Length
> +=C2=A0 =C2=A0 SMBIOS_HANDLE_A72_L2,
> +=C2=A0 },
> +=C2=A0 3,
> +=C2=A0 0x181, //L2 enabled, WB
> +=C2=A0 512,=C2=A0 =C2=A0//512k D-cache max
> +=C2=A0 512,=C2=A0 =C2=A0//512k installed
> +=C2=A0 {0,1}, //SRAM type
> +=C2=A0 {0,1}, //SRAM type
> +=C2=A0 0,=C2=A0 =C2=A0 =C2=A0//speed unknown
> +=C2=A0 CacheErrorSingleBit,=C2=A0 =C2=A0 =C2=A0//ECC checking
> +=C2=A0 CacheTypeUnified,=C2=A0 =C2=A0 =C2=A0 =C2=A0 //instruction ca= che
> +=C2=A0 CacheAssociativity16Way, //16 way associative
> +};
> +
> +STATIC SMBIOS_TABLE_TYPE7 mArmadaDefaultType7_l3 =3D {
> +=C2=A0 { // SMBIOS_STRUCTURE Hdr
> +=C2=A0 =C2=A0 EFI_SMBIOS_TYPE_CACHE_INFORMATION, // UINT8 Type
> +=C2=A0 =C2=A0 sizeof (SMBIOS_TABLE_TYPE7),=C2=A0 =C2=A0 =C2=A0 =C2= =A0// UINT8 Length
> +=C2=A0 =C2=A0 SMBIOS_HANDLE_L3,
> +=C2=A0 },
> +=C2=A0 4,
> +=C2=A0 0x182, //L3 enabled, WB
> +=C2=A0 1024,=C2=A0 //1M cache max
> +=C2=A0 1024,=C2=A0 //1M installed
> +=C2=A0 {0,1}, //SRAM type
> +=C2=A0 {0,1}, //SRAM type
> +=C2=A0 0,=C2=A0 =C2=A0 =C2=A0//speed unknown
> +=C2=A0 CacheErrorSingleBit,=C2=A0 =C2=A0 =C2=A0//ECC checking
> +=C2=A0 CacheTypeUnified,=C2=A0 =C2=A0 =C2=A0 =C2=A0 //instruction ca= che
> +=C2=A0 CacheAssociativity8Way,=C2=A0 //8 way associative
> +};
> +
> +STATIC CONST CHAR8 *mArmadaDefaultType7Strings[] =3D {
> +=C2=A0 "L1 Instruction\0",=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* L1I=C2=A0 */
> +=C2=A0 "L1 Data\0",=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* L1D=C2=A0 */
> +=C2=A0 "L2\0",=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* L2=C2=A0 = = =C2=A0*/
> +=C2=A0 "L3\0",=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* L3=C2=A0 = = =C2=A0*/
> +=C2=A0 NULL
> +};
> +
> +// Slots
> +STATIC SMBIOS_TABLE_TYPE9 mArmadaDefaultType9_0 =3D {
> +=C2=A0 { // SMBIOS_STRUCTURE Hdr
> +=C2=A0 =C2=A0 EFI_SMBIOS_TYPE_INACTIVE,=C2=A0 =C2=A0 =C2=A0// UINT8 = Type
> +=C2=A0 =C2=A0 sizeof (SMBIOS_TABLE_TYPE9),=C2=A0 // UINT8 Length
> +=C2=A0 =C2=A0 SMBIOS_HANDLE_PI_RESERVED,
> +=C2=A0 },
> +=C2=A0 1, // CP0 PCIE0
> +=C2=A0 SlotTypePciExpressGen2X1,
> +=C2=A0 SlotDataBusWidth1X,
> +=C2=A0 SlotUsageUnknown,
> +=C2=A0 SlotLengthShort,
> +=C2=A0 0,
> +=C2=A0 {1},=C2=A0 =C2=A0 =C2=A0 //Unknown
> +=C2=A0 {1,0,1},=C2=A0 //PME and SMBUS
> +=C2=A0 0,
> +=C2=A0 0,
> +=C2=A0 1,
> +};
> +
> +STATIC SMBIOS_TABLE_TYPE9 mArmadaDefaultType9_1 =3D {
> +=C2=A0 { // SMBIOS_STRUCTURE Hdr
> +=C2=A0 =C2=A0 EFI_SMBIOS_TYPE_INACTIVE,=C2=A0 =C2=A0 =C2=A0// UINT8 = Type
> +=C2=A0 =C2=A0 sizeof (SMBIOS_TABLE_TYPE9),=C2=A0 // UINT8 Length
> +=C2=A0 =C2=A0 SMBIOS_HANDLE_PI_RESERVED,
> +=C2=A0 },
> +=C2=A0 2, // CP0 PCIE1
> +=C2=A0 SlotTypePciExpressGen2X1,
> +=C2=A0 SlotDataBusWidth1X,
> +=C2=A0 SlotUsageUnknown,
> +=C2=A0 SlotLengthShort,
> +=C2=A0 0,
> +=C2=A0 {1},
> +=C2=A0 {1,0,1}, //PME and SMBUS
> +=C2=A0 0,
> +=C2=A0 0,
> +=C2=A0 2,
> +};
> +
> +STATIC SMBIOS_TABLE_TYPE9 mArmadaDefaultType9_2 =3D {
> +=C2=A0 { // SMBIOS_STRUCTURE Hdr
> +=C2=A0 =C2=A0 EFI_SMBIOS_TYPE_INACTIVE,=C2=A0 =C2=A0 =C2=A0// UINT8 = Type
> +=C2=A0 =C2=A0 sizeof (SMBIOS_TABLE_TYPE9),=C2=A0 // UINT8 Length
> +=C2=A0 =C2=A0 SMBIOS_HANDLE_PI_RESERVED,
> +=C2=A0 },
> +=C2=A0 3, // CP0 PCIE2
> +=C2=A0 SlotTypePciExpressGen2X1,
> +=C2=A0 SlotDataBusWidth1X,
> +=C2=A0 SlotUsageUnknown,
> +=C2=A0 SlotLengthShort,
> +=C2=A0 0,
> +=C2=A0 {1},
> +=C2=A0 {1,0,1}, //PME and SMBUS
> +=C2=A0 0,
> +=C2=A0 0,
> +=C2=A0 3,
> +};
> +
> +STATIC SMBIOS_TABLE_TYPE9 mArmadaDefaultType9_3 =3D {
> +=C2=A0 { // SMBIOS_STRUCTURE Hdr
> +=C2=A0 =C2=A0 EFI_SMBIOS_TYPE_INACTIVE,=C2=A0 =C2=A0 =C2=A0// UINT8 = Type
> +=C2=A0 =C2=A0 sizeof (SMBIOS_TABLE_TYPE9),=C2=A0 // UINT8 Length
> +=C2=A0 =C2=A0 SMBIOS_HANDLE_PI_RESERVED,
> +=C2=A0 },
> +=C2=A0 4, // CP1 PCIE0
> +=C2=A0 SlotTypePciExpressGen2X1,
> +=C2=A0 SlotDataBusWidth1X,
> +=C2=A0 SlotUsageUnknown,
> +=C2=A0 SlotLengthShort,
> +=C2=A0 0,
> +=C2=A0 {1},
> +=C2=A0 {1,0,1}, //PME and SMBUS
> +=C2=A0 0,
> +=C2=A0 0,
> +=C2=A0 0xc,
> +};
> +
> +STATIC SMBIOS_TABLE_TYPE9 mArmadaDefaultType9_4 =3D {
> +=C2=A0 { // SMBIOS_STRUCTURE Hdr
> +=C2=A0 =C2=A0 EFI_SMBIOS_TYPE_INACTIVE,=C2=A0 =C2=A0 =C2=A0// UINT8 = Type
> +=C2=A0 =C2=A0 sizeof (SMBIOS_TABLE_TYPE9),=C2=A0 // UINT8 Length
> +=C2=A0 =C2=A0 SMBIOS_HANDLE_PI_RESERVED,
> +=C2=A0 },
> +=C2=A0 5, // CP1 PCIE1
> +=C2=A0 SlotTypePciExpressGen2X1,
> +=C2=A0 SlotDataBusWidth1X,
> +=C2=A0 SlotUsageUnknown,
> +=C2=A0 SlotLengthShort,
> +=C2=A0 0,
> +=C2=A0 {1},
> +=C2=A0 {1,0,1}, //PME and SMBUS
> +=C2=A0 0,
> +=C2=A0 0,
> +=C2=A0 0xc,
> +};
> +
> +STATIC SMBIOS_TABLE_TYPE9 mArmadaDefaultType9_5 =3D {
> +=C2=A0 { // SMBIOS_STRUCTURE Hdr
> +=C2=A0 =C2=A0 EFI_SMBIOS_TYPE_INACTIVE,=C2=A0 =C2=A0 =C2=A0// UINT8 = Type
> +=C2=A0 =C2=A0 sizeof (SMBIOS_TABLE_TYPE9),=C2=A0 // UINT8 Length
> +=C2=A0 =C2=A0 SMBIOS_HANDLE_PI_RESERVED,
> +=C2=A0 },
> +=C2=A0 6, // CP1 PCIE2
> +=C2=A0 SlotTypePciExpressGen2X1,
> +=C2=A0 SlotDataBusWidth1X,
> +=C2=A0 SlotUsageUnknown,
> +=C2=A0 SlotLengthShort,
> +=C2=A0 0,
> +=C2=A0 {1},
> +=C2=A0 {1,0,1}, //PME and SMBUS
> +=C2=A0 0,
> +=C2=A0 0,
> +=C2=A0 0xc,
> +};
> +
> +STATIC CHAR8 CONST *mArmadaDefaultType9Strings[] =3D {
> +=C2=A0 "PCIE0 CP0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \0",/* Slot0 */
> +=C2=A0 "PCIE1 CP0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \0",/* Slot1 */
> +=C2=A0 "PCIE2 CP0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \0",/* Slot2 */
> +=C2=A0 "PCIE0 CP1=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \0",/* Slot3 */
> +=C2=A0 "PCIE1 CP1=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \0",/* Slot4 */
> +=C2=A0 "PCIE2 CP1=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \0",/* Slot5 */
> +=C2=A0 NULL
> +};
> +
> +// Memory array
> +STATIC SMBIOS_TABLE_TYPE16 mArmadaDefaultType16 =3D {
> +=C2=A0 { // SMBIOS_STRUCTURE Hdr
> +=C2=A0 =C2=A0 EFI_SMBIOS_TYPE_PHYSICAL_MEMORY_ARRAY, // UINT8 Type > +=C2=A0 =C2=A0 sizeof (SMBIOS_TABLE_TYPE16),=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 // UINT8 Length
> +=C2=A0 =C2=A0 SMBIOS_HANDLE_MEMORY,
> +=C2=A0 },
> +=C2=A0 MemoryArrayLocationSystemBoard, //on motherboard
> +=C2=A0 MemoryArrayUseSystemMemory,=C2=A0 =C2=A0 =C2=A0//system RAM > +=C2=A0 MemoryErrorCorrectionNone,=C2=A0 =C2=A0 =C2=A0 //ECC RAM
> +=C2=A0 0x1000000, //16GB
> +=C2=A0 0xFFFE,=C2=A0 =C2=A0 //No error information structure
> +=C2=A0 0x1,=C2=A0 =C2=A0 =C2=A0 =C2=A0//soldered memory
> +};
> +
> +STATIC CHAR8 CONST *mArmadaDefaultType16Strings[] =3D {
> +=C2=A0 NULL
> +};
> +
> +// Memory device
> +STATIC SMBIOS_TABLE_TYPE17 mArmadaDefaultType17 =3D {
> +=C2=A0 { // SMBIOS_STRUCTURE Hdr
> +=C2=A0 =C2=A0 EFI_SMBIOS_TYPE_MEMORY_DEVICE, // UINT8 Type
> +=C2=A0 =C2=A0 sizeof (SMBIOS_TABLE_TYPE17),=C2=A0 // UINT8 Length > +=C2=A0 =C2=A0 SMBIOS_HANDLE_DIMM,
> +=C2=A0 },
> +=C2=A0 SMBIOS_HANDLE_MEMORY, //array to which this module belongs > +=C2=A0 0xFFFE,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0//no errors
> +=C2=A0 64, //single DIMM, no ECC is 64bits (for ecc this would be 72= )
> +=C2=A0 32, //data width of this device (32-bits)
> +=C2=A0 0,=C2=A0 //Memory size obtained dynamically
> +=C2=A0 MemoryFormFactorRowOfChips,=C2=A0 =C2=A0 =C2=A0 //Memory fact= or
> +=C2=A0 0,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= = =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0//Not part of a set > +=C2=A0 1,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= = =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0//Right side of board<= br> > +=C2=A0 2,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= = =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0//Bank 0
> +=C2=A0 MemoryTypeDdr4,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 //DDR4
> +=C2=A0 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, //unbuffered
> +=C2=A0 0,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= = =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0//DRAM speed - require= s update
> +=C2=A0 0, //varies between diffrent production runs
> +=C2=A0 0, //serial
> +=C2=A0 0, //asset tag
> +=C2=A0 0, //part number
> +=C2=A0 0, //rank
> +};
> +
> +STATIC CHAR8 CONST *mArmadaDefaultType17Strings[] =3D {
> +=C2=A0 "RIGHT SIDE\0",=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* location */
> +=C2=A0 "BANK 0\0",=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* bank description */=
> +=C2=A0 NULL
> +};
> +
> +//
> +// Memory array mapped address, this structure
> +// is overridden by SmbiosInstallMemoryStructure.
> +//
> +STATIC SMBIOS_TABLE_TYPE19 mArmadaDefaultType19 =3D {
> +=C2=A0 {=C2=A0 // SMBIOS_STRUCTURE Hdr
> +=C2=A0 =C2=A0 EFI_SMBIOS_TYPE_MEMORY_ARRAY_MAPPED_ADDRESS, // UINT8 = Type
> +=C2=A0 =C2=A0 sizeof (SMBIOS_TABLE_TYPE19),=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 // UINT8 Length
> +=C2=A0 =C2=A0 SMBIOS_HANDLE_PI_RESERVED,
> +=C2=A0 },
> +=C2=A0 0xFFFFFFFF,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0//invalid, look = at extended addr field
> +=C2=A0 0xFFFFFFFF,
> +=C2=A0 SMBIOS_HANDLE_DIMM, //handle
> +=C2=A0 1,
> +=C2=A0 0x080000000,=C2=A0 =C2=A0 =C2=A0 =C2=A0 //starting addr of fi= rst 2GB
> +=C2=A0 0x100000000,=C2=A0 =C2=A0 =C2=A0 =C2=A0 //ending addr of firs= t 2GB
> +};
> +
> +// System boot infomArmadaDefaultType4.
> +STATIC SMBIOS_TABLE_TYPE32 mArmadaDefaultType32 =3D {
> +=C2=A0 { // SMBIOS_STRUCTURE Hdr
> +=C2=A0 =C2=A0 EFI_SMBIOS_TYPE_SYSTEM_BOOT_INFORMATION, // UINT8 Type=
> +=C2=A0 =C2=A0 sizeof (SMBIOS_TABLE_TYPE32),=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 // UINT8 Length
> +=C2=A0 =C2=A0 SMBIOS_HANDLE_PI_RESERVED,
> +=C2=A0 },
> +=C2=A0 {0, 0, 0, 0, 0, 0},=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 //reserved
> +=C2=A0 BootInformationStatusNoError,
> +};
> +
> +STATIC CHAR8 CONST *mArmadaDefaultType32Strings[] =3D {
> +=C2=A0 NULL
> +};
> +
> +STATIC CONST VOID *DefaultCommonTables[][2] =3D
> +{
> +=C2=A0 { &mArmadaDefaultType0,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= mArmadaDefaultType0Strings=C2=A0 },
> +=C2=A0 { &mArmadaDefaultType1,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= mArmadaDefaultType1Strings=C2=A0 },
> +=C2=A0 { &mArmadaDefaultType2,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= mArmadaDefaultType2Strings=C2=A0 },
> +=C2=A0 { &mArmadaDefaultType3,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= mArmadaDefaultType3Strings=C2=A0 },
> +=C2=A0 { &mArmadaDefaultType4,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= mArmadaDefaultType4Strings=C2=A0 },
> +=C2=A0 { &mArmadaDefaultType7_a72_l1i, mArmadaDefaultType7String= s=C2=A0 },
> +=C2=A0 { &mArmadaDefaultType7_a72_l1d, mArmadaDefaultType7String= s=C2=A0 },
> +=C2=A0 { &mArmadaDefaultType7_a72_l2,=C2=A0 mArmadaDefaultType7S= trings=C2=A0 },
> +=C2=A0 { &mArmadaDefaultType7_l3,=C2=A0 =C2=A0 =C2=A0 mArmadaDef= aultType7Strings=C2=A0 },
> +=C2=A0 { &mArmadaDefaultType9_0,=C2=A0 =C2=A0 =C2=A0 =C2=A0mArma= daDefaultType9Strings=C2=A0 },
> +=C2=A0 { &mArmadaDefaultType9_1,=C2=A0 =C2=A0 =C2=A0 =C2=A0mArma= daDefaultType9Strings=C2=A0 },
> +=C2=A0 { &mArmadaDefaultType9_2,=C2=A0 =C2=A0 =C2=A0 =C2=A0mArma= daDefaultType9Strings=C2=A0 },
> +=C2=A0 { &mArmadaDefaultType9_3,=C2=A0 =C2=A0 =C2=A0 =C2=A0mArma= daDefaultType9Strings=C2=A0 },
> +=C2=A0 { &mArmadaDefaultType9_4,=C2=A0 =C2=A0 =C2=A0 =C2=A0mArma= daDefaultType9Strings=C2=A0 },
> +=C2=A0 { &mArmadaDefaultType9_5,=C2=A0 =C2=A0 =C2=A0 =C2=A0mArma= daDefaultType9Strings=C2=A0 },
> +=C2=A0 { &mArmadaDefaultType16,=C2=A0 =C2=A0 =C2=A0 =C2=A0 mArma= daDefaultType16Strings },
> +=C2=A0 { &mArmadaDefaultType17,=C2=A0 =C2=A0 =C2=A0 =C2=A0 mArma= daDefaultType17Strings },
> +=C2=A0 { &mArmadaDefaultType32,=C2=A0 =C2=A0 =C2=A0 =C2=A0 mArma= daDefaultType32Strings },
> +=C2=A0 { NULL,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0NULL=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 },
> +};
> +
> +/**
> +
> +=C2=A0 Create SMBIOS record.
> +
> +=C2=A0 Converts a fixed SMBIOS structure and an array of pointers to= strings into
> +=C2=A0 an SMBIOS record where the strings are cat'ed on the end = of the fixed record
> +=C2=A0 and terminated via a double NULL and add to SMBIOS table.
> +
> +=C2=A0 SMBIOS_TABLE_TYPE32 gSmbiosType12 =3D {
> +=C2=A0 =C2=A0 { EFI_SMBIOS_TYPE_SYSTEM_CONFIGURATION_OPTIONS, sizeof= (SMBIOS_TABLE_TYPE12), 0 },
> +=C2=A0 =C2=A0 1 // StringCount
> +=C2=A0 };
> +
> +=C2=A0 CHAR8 *gSmbiosType12Strings[] =3D {
> +=C2=A0 =C2=A0 "Not Found",
> +=C2=A0 =C2=A0 NULL
> +=C2=A0 };
> +
> +=C2=A0 ...
> +
> +=C2=A0 LogSmbiosData (
> +=C2=A0 =C2=A0 (EFI_SMBIOS_TABLE_HEADER*)&gSmbiosType12,
> +=C2=A0 =C2=A0 gSmbiosType12Strings
> +=C2=A0 =C2=A0 );
> +
> +=C2=A0 @param=C2=A0 Smbios=C2=A0 =C2=A0 =C2=A0 SMBIOS protocol
> +=C2=A0 @param=C2=A0 Template=C2=A0 =C2=A0 Fixed SMBIOS structure, re= quired.
> +=C2=A0 @param=C2=A0 StringArray Array of strings to convert to an SM= BIOS string pack.
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 NULL is OK.
> +**/
> +STATIC
> +EFI_STATUS
> +EFIAPI
> +LogSmbiosData (
> +=C2=A0 IN=C2=A0 EFI_SMBIOS_PROTOCOL=C2=A0 =C2=A0 =C2=A0*Smbios,
> +=C2=A0 IN=C2=A0 EFI_SMBIOS_TABLE_HEADER *Template,
> +=C2=A0 IN=C2=A0 CONST CHAR8 * CONST=C2=A0 =C2=A0 =C2=A0*StringArray<= br> > +=C2=A0 )
> +{
> +=C2=A0 EFI_STATUS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 Status;
> +=C2=A0 EFI_SMBIOS_TABLE_HEADER=C2=A0 =C2=A0*Record;
> +=C2=A0 UINTN=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = = =C2=A0 =C2=A0 =C2=A0Index;
> +=C2=A0 UINTN=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = = =C2=A0 =C2=A0 =C2=A0StringSize;
> +=C2=A0 UINTN=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = = =C2=A0 =C2=A0 =C2=A0Size;
> +=C2=A0 CHAR8=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = = =C2=A0 =C2=A0 =C2=A0*Str;
> +
> +
> +=C2=A0 // Calculate the size of the fixed record and optional string= pack
> +=C2=A0 Size =3D Template->Length;
> +=C2=A0 if (StringArray =3D=3D NULL) {
> +=C2=A0 =C2=A0 // At least a double null is required
> +=C2=A0 =C2=A0 Size +=3D 1;
> +=C2=A0 } else {
> +=C2=A0 =C2=A0 for (Index =3D 0; StringArray[Index] !=3D NULL; Index+= +) {
> +=C2=A0 =C2=A0 =C2=A0 StringSize =3D AsciiStrSize (StringArray[Index]= );
> +=C2=A0 =C2=A0 =C2=A0 Size +=3D StringSize;
> +=C2=A0 =C2=A0 }
> +=C2=A0 =C2=A0 if (StringArray[0] =3D=3D NULL) {
> +=C2=A0 =C2=A0 =C2=A0 // At least a double null is required
> +=C2=A0 =C2=A0 =C2=A0 Size +=3D 1;
> +=C2=A0 =C2=A0 }
> +
> +=C2=A0 =C2=A0 // Don't forget the terminating double null
> +=C2=A0 =C2=A0 Size +=3D 1;
> +=C2=A0 }
> +
> +=C2=A0 // Copy over Template
> +=C2=A0 Record =3D (EFI_SMBIOS_TABLE_HEADER *)AllocateZeroPool (Size)= ;
> +=C2=A0 if (Record =3D=3D NULL) {
> +=C2=A0 =C2=A0 return EFI_OUT_OF_RESOURCES;
> +=C2=A0 }
> +=C2=A0 CopyMem (Record, Template, Template->Length);
> +
> +=C2=A0 // Append string pack
> +=C2=A0 Str =3D ((VOID *)Record) + Record->Length;
> +=C2=A0 for (Index =3D 0; StringArray[Index] !=3D NULL; Index++) { > +=C2=A0 =C2=A0 StringSize =3D AsciiStrSize (StringArray[Index]);
> +=C2=A0 =C2=A0 CopyMem (Str, StringArray[Index], StringSize);
> +=C2=A0 =C2=A0 Str +=3D StringSize;
> +=C2=A0 }
> +=C2=A0 *Str =3D 0;
> +
> +=C2=A0 Status =3D Smbios->Add (Smbios,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0NULL,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0&Record->Handle,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0Record);
> +=C2=A0 ASSERT_EFI_ERROR (Status);
> +
> +=C2=A0 FreePool (Record);
> +
> +=C2=A0 return Status;
> +}
> +
> +/**
> +=C2=A0 =C2=A0Installs a memory descriptor (type19) for the given add= ress range
> +
> +=C2=A0 =C2=A0@param=C2=A0 Smbios=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0SMBIOS protocol.
> +=C2=A0 =C2=A0@param=C2=A0 StartingAddress=C2=A0 =C2=A0 =C2=A0 Start = address of the memory chunk.
> +=C2=A0 =C2=A0@param=C2=A0 RegionLength=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0Memory chunk size.
> +
> +**/
> +EFI_STATUS
> +SmbiosInstallMemoryStructure (
> +=C2=A0 IN EFI_SMBIOS_PROTOCOL=C2=A0 =C2=A0 =C2=A0 =C2=A0*Smbios,
> +=C2=A0 IN UINT64=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= = =A0 =C2=A0 =C2=A0 StartingAddress,
> +=C2=A0 IN UINT64=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= = =A0 =C2=A0 =C2=A0 RegionLength
> +=C2=A0 )
> +{
> +=C2=A0 EFI_SMBIOS_HANDLE=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0SmbiosHand= le;
> +=C2=A0 SMBIOS_TABLE_TYPE19=C2=A0 =C2=A0 =C2=A0 =C2=A0MemoryDescripto= r;
> +=C2=A0 EFI_STATUS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 Status =3D EFI_SUCCESS;
> +
> +=C2=A0 CopyMem (&MemoryDescriptor,
> +=C2=A0 =C2=A0 &mArmadaDefaultType19,
> +=C2=A0 =C2=A0 sizeof (SMBIOS_TABLE_TYPE19));
> +
> +=C2=A0 MemoryDescriptor.ExtendedStartingAddress =3D StartingAddress;=
> +=C2=A0 MemoryDescriptor.ExtendedEndingAddress =3D StartingAddress + = RegionLength;
> +=C2=A0 SmbiosHandle =3D MemoryDescriptor.Hdr.Handle;
> +
> +=C2=A0 Status =3D Smbios->Add (Smbios,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0NULL,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0&SmbiosHandle,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0(EFI_SMBIOS_TABLE_HEADER*) &MemoryDescriptor);
> +
> +=C2=A0 return Status;
> +}
> +
> +/**
> +=C2=A0 =C2=A0Install a whole table worth of structructures
> +
> +=C2=A0 =C2=A0@param=C2=A0 Smbios=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0SMBIOS protocol.
> +=C2=A0 =C2=A0@param=C2=A0 DefaultTables=C2=A0 =C2=A0 =C2=A0 =C2=A0 A= pointer to the default SMBIOS table structure.
> +
> +**/
> +EFI_STATUS
> +SmbiosInstallStructures (
> +=C2=A0 =C2=A0IN EFI_SMBIOS_PROTOCOL=C2=A0 =C2=A0*Smbios,
> +=C2=A0 =C2=A0IN CONST VOID=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = *DefaultTables[][2]
> +=C2=A0 =C2=A0)
> +{
> +=C2=A0 =C2=A0 EFI_STATUS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 Status =3D EFI_SUCCESS;
> +=C2=A0 =C2=A0 INTN TableEntry;
> +
> +=C2=A0 =C2=A0 for (TableEntry =3D 0; DefaultTables[TableEntry][0] != =3D NULL; TableEntry++) {
> +=C2=A0 =C2=A0 =C2=A0 // Omit disabled tables
> +=C2=A0 =C2=A0 =C2=A0 if (((EFI_SMBIOS_TABLE_HEADER *)DefaultTables[T= ableEntry][0])->Type =3D=3D
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 EFI_SMBIOS_TYPE_INACTIVE) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 continue;
> +=C2=A0 =C2=A0 =C2=A0 }
> +
> +=C2=A0 =C2=A0 =C2=A0 Status =3D LogSmbiosData (Smbios,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0((EFI_= SMBIOS_TABLE_HEADER *)DefaultTables[TableEntry][0]),
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Defaul= tTables[TableEntry][1]);
> +=C2=A0 =C2=A0 =C2=A0 if (EFI_ERROR (Status))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 break;
> +=C2=A0 =C2=A0 }
> +
> +=C2=A0 =C2=A0 return Status;
> +}
> +
> +/**
> +=C2=A0 =C2=A0Update memory information basing on the HOB list.
> +
> +=C2=A0 =C2=A0@param=C2=A0 Smbios=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0SMBIOS protocol
> +
> +**/
> +STATIC
> +EFI_STATUS
> +SmbiosMemoryInstall (
> +=C2=A0 IN EFI_SMBIOS_PROTOCOL=C2=A0 =C2=A0 =C2=A0 =C2=A0*Smbios
> +=C2=A0 )
> +{
> +=C2=A0 EFI_PEI_HOB_POINTERS=C2=A0 =C2=A0 Hob;
> +=C2=A0 UINT64 MemorySize;
> +=C2=A0 EFI_STATUS Status;
> +
> +=C2=A0 MemorySize =3D 0;
> +
> +=C2=A0 //
> +=C2=A0 // Get the HOB list for processing
> +=C2=A0 //
> +=C2=A0 Hob.Raw =3D GetHobList ();
> +
> +=C2=A0 //
> +=C2=A0 // Collect memory ranges
> +=C2=A0 //
> +=C2=A0 while (!END_OF_HOB_LIST (Hob)) {
> +=C2=A0 =C2=A0 if (Hob.Header->HobType =3D=3D EFI_HOB_TYPE_RESOURC= E_DESCRIPTOR) {
> +=C2=A0 =C2=A0 =C2=A0 if (Hob.ResourceDescriptor->ResourceType =3D= = =3D EFI_RESOURCE_SYSTEM_MEMORY) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 MemorySize +=3D (UINT64)(Hob.Reso= urceDescriptor->ResourceLength);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Status =3D SmbiosInstallMemoryStr= ucture (Smbios,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0Hob.ResourceDescriptor->PhysicalStart,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0Hob.ResourceDescriptor->ResourceLength);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (EFI_ERROR(Status)) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return Status;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }
> +=C2=A0 =C2=A0 =C2=A0 }
> +=C2=A0 =C2=A0 }
> +=C2=A0 =C2=A0 Hob.Raw =3D GET_NEXT_HOB (Hob);
> +=C2=A0 }
> +
> +=C2=A0 //
> +=C2=A0 // Update TYPE17 memory size field
> +=C2=A0 //
> +=C2=A0 mArmadaDefaultType17.Size =3D (UINT16)(MemorySize >> 20= );
> +
> +=C2=A0 return EFI_SUCCESS;
> +}
> +
> +/**
> +=C2=A0 =C2=A0Install all structures from the DefaultTables structure=
> +
> +=C2=A0 =C2=A0@param=C2=A0 Smbios=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0SMBIOS protocol
> +
> +**/
> +EFI_STATUS
> +SmbiosInstallAllStructures (
> +=C2=A0 =C2=A0IN EFI_SMBIOS_PROTOCOL=C2=A0 =C2=A0 =C2=A0 =C2=A0*Smbio= s
> +=C2=A0 =C2=A0)
> +{
> +=C2=A0 EFI_STATUS=C2=A0 =C2=A0 Status;
> +=C2=A0 UINT32=C2=A0 =C2=A0 =C2=A0 =C2=A0 FirmwareMajorRevisionNumber= ;
> +=C2=A0 UINT32=C2=A0 =C2=A0 =C2=A0 =C2=A0 FirmwareMinorRevisionNumber= ;
> +
> +=C2=A0 FirmwareMajorRevisionNumber =3D (PcdGet32 (PcdFirmwareRevisio= n) >> 16) & 0xFF;
> +=C2=A0 FirmwareMinorRevisionNumber =3D PcdGet32 (PcdFirmwareRevision= ) & 0xFF;
> +
> +=C2=A0 //
> +=C2=A0 // Update Firmware Revision, CPU and DRAM frequencies.
> +=C2=A0 //
> +=C2=A0 mArmadaDefaultType0.SystemBiosMajorRelease =3D FirmwareMajorR= evisionNumber;
> +=C2=A0 mArmadaDefaultType0.SystemBiosMinorRelease =3D FirmwareMinorR= evisionNumber;
> +=C2=A0 mArmadaDefaultType4.CurrentSpeed =3D SampleAtResetGetCpuFrequ= ency ();
> +=C2=A0 mArmadaDefaultType17.Speed =3D SampleAtResetGetDramFrequency = ();
> +
> +=C2=A0 //
> +=C2=A0 // Generate memory descriptors.
> +=C2=A0 //
> +=C2=A0 Status =3D SmbiosMemoryInstall (Smbios);
> +=C2=A0 ASSERT_EFI_ERROR (Status);
> +
> +=C2=A0 //
> +=C2=A0 // Install all tables.
> +=C2=A0 //
> +=C2=A0 Status =3D SmbiosInstallStructures (Smbios, DefaultCommonTabl= es);
> +=C2=A0 ASSERT_EFI_ERROR (Status);
> +
> +=C2=A0 return EFI_SUCCESS;
> +}
> +
> +/**
> +=C2=A0 =C2=A0Installs SMBIOS information for Armada platforms
> +
> +=C2=A0 =C2=A0@param ImageHandle=C2=A0 =C2=A0 =C2=A0Module's imag= e handle
> +=C2=A0 =C2=A0@param SystemTable=C2=A0 =C2=A0 =C2=A0Pointer of EFI_SY= STEM_TABLE
> +
> +=C2=A0 =C2=A0@retval EFI_SUCCESS=C2=A0 =C2=A0 Smbios data successful= ly installed
> +=C2=A0 =C2=A0@retval Other=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Smbios = data was not installed
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +SmbiosPlatformDriverEntryPoint (
> +=C2=A0 IN EFI_HANDLE=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ImageHa= ndle,
> +=C2=A0 IN EFI_SYSTEM_TABLE=C2=A0 =C2=A0 =C2=A0*SystemTable
> +=C2=A0 )
> +{
> +=C2=A0 EFI_STATUS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 Status;
> +=C2=A0 EFI_SMBIOS_PROTOCOL=C2=A0 =C2=A0 =C2=A0 =C2=A0*Smbios;
> +
> +=C2=A0 //
> +=C2=A0 // Find the SMBIOS protocol
> +=C2=A0 //
> +=C2=A0 Status =3D gBS->LocateProtocol (&gEfiSmbiosProtocolGui= d,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 NULL,=
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (VOID= **)&Smbios);
> +=C2=A0 if (EFI_ERROR (Status)) {
> +=C2=A0 =C2=A0 return Status;
> +=C2=A0 }
> +
> +=C2=A0 Status =3D SmbiosInstallAllStructures (Smbios);
> +
> +=C2=A0 return Status;
> +}
>




--000000000000ac27a4058a32d814--