Re: [edk2] [PATCH 3/3] ArmPlatformPkg/ArmJunoPkg: Create SMBIOS/DMI data for Juno

2015-11-24 Thread Jeremy Linton

On 11/24/2015 11:08 AM, Leif Lindholm wrote:

+// Memory device
>+STATIC CONST ARM_TYPE17 mArmDefaultType17 = {
>+  {
>+{ // 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)
>+64, //data width of this device (64-bits)
>+0x2000, //8GB
>+0x0B,   //row of chips
>+0,  //not part of a set
>+1,  //right side of board
>+2,  //bank 0
>+//  MemoryTypeLpddr3, //LP DDR3, isn't defined yet

Unsure of the meaning of the above commented-out line?


>+MemoryTypeDdr3,  //LP DDR3


Leif,

Thanks for taking a look at this.

LPDDR3 != DDR3/L.

I need to double check, but when I was filling in this information I 
didn't find a definition for LPDDR3 RAM. So the MemoryTypeDdr3 is 
technically incorrect.


I will apply the other formatting changes.

This module was initially derived from OvmfPkg/SmbiosPlatformDxe, that 
is why the copyrights are maintained in the .inf which is still very 
similar to its source. The .c file ended up being a rewrite and only 
shares the EDK copyright and name of the setup function with the 
original. I will clarify that in the .inf file.



Jeremy,


___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 3/3] ArmPlatformPkg/ArmJunoPkg: Create SMBIOS/DMI data for Juno

2015-11-24 Thread Leif Lindholm
On Fri, Nov 20, 2015 at 04:18:53PM -0600, Jeremy Linton wrote:
> SMBIOS data is consumed by a wide range of enterprise applications.
> 
> Fill in the basic requirements of the SMBIOS specification by hardcoding
> the minimum required structures and data using Juno information. With
> this change both the EFI shell and linux dmidecode commands return useful
> information.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jeremy Linton 
> ---
>  ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc  |  12 +
>  ArmPlatformPkg/ArmJunoPkg/ArmJuno.fdf  |   6 +
>  .../SmbiosPlatformDxe/SmbiosPlatformDxe.c  | 781 
> +
>  .../SmbiosPlatformDxe/SmbiosPlatformDxe.inf|  69 ++
>  4 files changed, 868 insertions(+)
>  create mode 100644 
> ArmPlatformPkg/ArmJunoPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c
>  create mode 100644 
> ArmPlatformPkg/ArmJunoPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
> 
> diff --git a/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc 
> b/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc
> index f5af426..7a26cd8 100644
> --- a/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc
> +++ b/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc
> @@ -161,6 +161,12 @@
>gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|5000
>gEmbeddedTokenSpaceGuid.PcdMetronomeTickPeriod|1000
>  
> +  #
> +  # SMBIOS entry point version
> +  #
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0300
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0
> +
>  [PcdsPatchableInModule]
># Console Resolution (Full HD)
>gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|1920
> @@ -286,6 +292,12 @@
>ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.inf
>  
>#
> +  # SMBIOS/DMI
> +  #
> +  MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
> +  ArmPlatformPkg/ArmJunoPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
> +
> +  #
># Bds
>#
>MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
> diff --git a/ArmPlatformPkg/ArmJunoPkg/ArmJuno.fdf 
> b/ArmPlatformPkg/ArmJunoPkg/ArmJuno.fdf
> index c8f5831..136ab30 100644
> --- a/ArmPlatformPkg/ArmJunoPkg/ArmJuno.fdf
> +++ b/ArmPlatformPkg/ArmJunoPkg/ArmJuno.fdf
> @@ -198,6 +198,12 @@ FvNameGuid = B73FE497-B92E-416e-8326-45AD0D270092
>INF ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.inf
>  
>#
> +  # SMBIOS/DMI
> +  #
> +  INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
> +  INF ArmPlatformPkg/ArmJunoPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
> +
> +  #
># Bds
>#
>INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
> diff --git a/ArmPlatformPkg/ArmJunoPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c 
> b/ArmPlatformPkg/ArmJunoPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c
> new file mode 100644
> index 000..7298c42
> --- /dev/null
> +++ b/ArmPlatformPkg/ArmJunoPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c
> @@ -0,0 +1,781 @@
> +/** @file
> +  This driver installs SMBIOS information for ARM Juno platforms
> +
> +  Copyright (c) 2015, ARM Limited. All rights reserved.
> +
> +  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" BASIS,
> +  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
> IMPLIED.
> +
> +**/

Could the license header be <= 80 character wrapped, please?

> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +
> +#define TYPE0_STRINGS\
> +  "EFI Development Kit II / ARM LTD\0" /* Vendor */  \
> +  "EDK II\0"   /* BiosVersion */ \
> +  __DATE__"\0" /* BiosReleaseDate */
> +
> +#define TYPE1_STRINGS   \
> +  "ARM LTD\0"/* Manufacturer */ \
> +  "ARM Juno Development Platform\0"  /* Product Name */ \
> +  "None\0"   /* Version */  \
> +  "\0"   /* 20 character buffer */
> +
> +#define TYPE2_STRINGS \
> +  "ARM LTD\0"/* Manufacturer */   \
> +  "ARM Juno Development Platform\0"  /* Product Name */   \
> +  "R0\0" /* Version */\
> +  "Serial Not Set\0" /* Serial */ \
> +  "Base of Chassis\0"/* board location */ \
> +  "R1\0" /* Version */
> +
> +#define TYPE3_STRINGS   \
> +  "ARM LTD\0"/* Manufacturer */ \
> +  "None\0"   /* Version */  \
> +  "Serial Not Set\0" /* Serial  */
> +

[edk2] [PATCH 3/3] ArmPlatformPkg/ArmJunoPkg: Create SMBIOS/DMI data for Juno

2015-11-20 Thread Jeremy Linton
SMBIOS data is consumed by a wide range of enterprise applications.

Fill in the basic requirements of the SMBIOS specification by hardcoding
the minimum required structures and data using Juno information. With
this change both the EFI shell and linux dmidecode commands return useful
information.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeremy Linton 
---
 ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc  |  12 +
 ArmPlatformPkg/ArmJunoPkg/ArmJuno.fdf  |   6 +
 .../SmbiosPlatformDxe/SmbiosPlatformDxe.c  | 781 +
 .../SmbiosPlatformDxe/SmbiosPlatformDxe.inf|  69 ++
 4 files changed, 868 insertions(+)
 create mode 100644 
ArmPlatformPkg/ArmJunoPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c
 create mode 100644 
ArmPlatformPkg/ArmJunoPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf

diff --git a/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc 
b/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc
index f5af426..7a26cd8 100644
--- a/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc
+++ b/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc
@@ -161,6 +161,12 @@
   gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|5000
   gEmbeddedTokenSpaceGuid.PcdMetronomeTickPeriod|1000
 
+  #
+  # SMBIOS entry point version
+  #
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0300
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0
+
 [PcdsPatchableInModule]
   # Console Resolution (Full HD)
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|1920
@@ -286,6 +292,12 @@
   ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.inf
 
   #
+  # SMBIOS/DMI
+  #
+  MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
+  ArmPlatformPkg/ArmJunoPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
+
+  #
   # Bds
   #
   MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
diff --git a/ArmPlatformPkg/ArmJunoPkg/ArmJuno.fdf 
b/ArmPlatformPkg/ArmJunoPkg/ArmJuno.fdf
index c8f5831..136ab30 100644
--- a/ArmPlatformPkg/ArmJunoPkg/ArmJuno.fdf
+++ b/ArmPlatformPkg/ArmJunoPkg/ArmJuno.fdf
@@ -198,6 +198,12 @@ FvNameGuid = B73FE497-B92E-416e-8326-45AD0D270092
   INF ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.inf
 
   #
+  # SMBIOS/DMI
+  #
+  INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
+  INF ArmPlatformPkg/ArmJunoPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
+
+  #
   # Bds
   #
   INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
diff --git a/ArmPlatformPkg/ArmJunoPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c 
b/ArmPlatformPkg/ArmJunoPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c
new file mode 100644
index 000..7298c42
--- /dev/null
+++ b/ArmPlatformPkg/ArmJunoPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c
@@ -0,0 +1,781 @@
+/** @file
+  This driver installs SMBIOS information for ARM Juno platforms
+
+  Copyright (c) 2015, ARM Limited. All rights reserved.
+
+  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" BASIS,
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+
+#define TYPE0_STRINGS\
+  "EFI Development Kit II / ARM LTD\0" /* Vendor */  \
+  "EDK II\0"   /* BiosVersion */ \
+  __DATE__"\0" /* BiosReleaseDate */
+
+#define TYPE1_STRINGS   \
+  "ARM LTD\0"/* Manufacturer */ \
+  "ARM Juno Development Platform\0"  /* Product Name */ \
+  "None\0"   /* Version */  \
+  "\0"   /* 20 character buffer */
+
+#define TYPE2_STRINGS \
+  "ARM LTD\0"/* Manufacturer */   \
+  "ARM Juno Development Platform\0"  /* Product Name */   \
+  "R0\0" /* Version */\
+  "Serial Not Set\0" /* Serial */ \
+  "Base of Chassis\0"/* board location */ \
+  "R1\0" /* Version */
+
+#define TYPE3_STRINGS   \
+  "ARM LTD\0"/* Manufacturer */ \
+  "None\0"   /* Version */  \
+  "Serial Not Set\0" /* Serial  */
+
+#define TYPE4_STRINGS   \
+  "BGA-1156\0"   /* socket type */  \
+  "ARM LTD\0"/* manufactuer */  \
+  "Cortex-A57\0" /* processor 1 description */  \
+  "Cortex-A53\0" /* processor 2 description */  \
+  "0xd03\0"