* [edk2-platforms: PATCH v5 8/9] Marvell/Drivers: SmbiosPlatformDxe: Load SMBIOS strings from PCD
@ 2019-10-14 13:25 Marcin Wojtas
2019-10-15 18:07 ` Leif Lindholm
0 siblings, 1 reply; 3+ messages in thread
From: Marcin Wojtas @ 2019-10-14 13:25 UTC (permalink / raw)
To: devel; +Cc: leif.lindholm, ard.biesheuvel, mw, jsd, jaz, kostap, Patryk Duda
From: Patryk Duda <pdk@semihalf.com>
This patch implements convenient way of changing strings included
in SMBIOS Table1, Table2, Table3.
Strings can be altered by defining following PCDs:
gMarvellTokenSpaceGuid.PcdProductManufacturer
gMarvellTokenSpaceGuid.PcdProductPlatformName
gMarvellTokenSpaceGuid.PcdProductSerial
gMarvellTokenSpaceGuid.PcdProductVersion
Signed-off-by: Patryk Duda <pdk@semihalf.com>
---
Changelog:
v4->v5
* Cast PCD strings as 'CONST CHAR *'
The updated branch with entire patchset was pushed to the github:
https://github.com/MarvellEmbeddedProcessors/edk2-open-platform/commits/cn913x-upstream-r20191014
Silicon/Marvell/Marvell.dec | 6 ++++++
Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf | 4 ++++
Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c | 22 ++++++++++----------
3 files changed, 21 insertions(+), 11 deletions(-)
diff --git a/Silicon/Marvell/Marvell.dec b/Silicon/Marvell/Marvell.dec
index d337d3e..cdf8154 100644
--- a/Silicon/Marvell/Marvell.dec
+++ b/Silicon/Marvell/Marvell.dec
@@ -169,6 +169,12 @@
gMarvellTokenSpaceGuid.PcdPciEAhci|{ 0x0 }|VOID*|0x3000034
gMarvellTokenSpaceGuid.PcdPciESdhci|{ 0x0 }|VOID*|0x3000035
+#Platform description
+ gMarvellTokenSpaceGuid.PcdProductManufacturer|"Marvell"|VOID*|0x50000100
+ gMarvellTokenSpaceGuid.PcdProductPlatformName|"Marvell Development Board"|VOID*|0x50000101
+ gMarvellTokenSpaceGuid.PcdProductSerial|"Serial Not Set"|VOID*|0x50000103
+ gMarvellTokenSpaceGuid.PcdProductVersion|"Revision unknown"|VOID*|0x50000102
+
#RTC
gMarvellTokenSpaceGuid.PcdRtcBaseAddress|0x0|UINT64|0x40000052
diff --git a/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf b/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
index 8b4586c..7722146 100644
--- a/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
+++ b/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
@@ -36,6 +36,10 @@
[FixedPcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision
+ gMarvellTokenSpaceGuid.PcdProductManufacturer
+ gMarvellTokenSpaceGuid.PcdProductPlatformName
+ gMarvellTokenSpaceGuid.PcdProductSerial
+ gMarvellTokenSpaceGuid.PcdProductVersion
[Protocols]
gEfiSmbiosProtocolGuid # PROTOCOL ALWAYS_CONSUMED
diff --git a/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c b/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c
index 08f4fa7..3b909f3 100644
--- a/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c
+++ b/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c
@@ -101,10 +101,10 @@ STATIC SMBIOS_TABLE_TYPE1 mArmadaDefaultType1 = {
};
STATIC CHAR8 CONST *mArmadaDefaultType1Strings[] = {
- "Marvell \0",/* Manufacturer */
- "Armada 7k/8k Family Board \0",/* Product Name placeholder*/
- "Revision unknown \0",/* Version placeholder */
- " \0",/* 32 character buffer */
+ (CHAR8 CONST *)PcdGetPtr (PcdProductManufacturer),
+ (CHAR8 CONST *)PcdGetPtr (PcdProductPlatformName),
+ (CHAR8 CONST *)PcdGetPtr (PcdProductVersion),
+ (CHAR8 CONST *)PcdGetPtr (PcdProductSerial),
NULL
};
@@ -129,10 +129,10 @@ STATIC SMBIOS_TABLE_TYPE2 mArmadaDefaultType2 = {
};
STATIC CHAR8 CONST *mArmadaDefaultType2Strings[] = {
- "Marvell \0",/* Manufacturer */
- "Armada 7k/8k Family Board \0",/* Product Name placeholder*/
- "Revision unknown \0",/* Version placeholder */
- "Serial Not Set \0",/* Serial */
+ (CHAR8 CONST *)PcdGetPtr (PcdProductManufacturer),
+ (CHAR8 CONST *)PcdGetPtr (PcdProductPlatformName),
+ (CHAR8 CONST *)PcdGetPtr (PcdProductVersion),
+ (CHAR8 CONST *)PcdGetPtr (PcdProductSerial),
"Base of Chassis \0",/* Board location */
NULL
};
@@ -160,9 +160,9 @@ STATIC SMBIOS_TABLE_TYPE3 mArmadaDefaultType3 = {
};
STATIC CHAR8 CONST *mArmadaDefaultType3Strings[] = {
- "Marvell \0",/* Manufacturer placeholder */
- "Revision unknown \0",/* Version placeholder */
- "Serial Not Set \0",/* Serial placeholder */
+ (CHAR8 CONST *)PcdGetPtr (PcdProductManufacturer),
+ (CHAR8 CONST *)PcdGetPtr (PcdProductVersion),
+ (CHAR8 CONST *)PcdGetPtr (PcdProductSerial),
NULL
};
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [edk2-platforms: PATCH v5 8/9] Marvell/Drivers: SmbiosPlatformDxe: Load SMBIOS strings from PCD
2019-10-14 13:25 [edk2-platforms: PATCH v5 8/9] Marvell/Drivers: SmbiosPlatformDxe: Load SMBIOS strings from PCD Marcin Wojtas
@ 2019-10-15 18:07 ` Leif Lindholm
2019-10-16 6:01 ` Marcin Wojtas
0 siblings, 1 reply; 3+ messages in thread
From: Leif Lindholm @ 2019-10-15 18:07 UTC (permalink / raw)
To: Marcin Wojtas; +Cc: devel, ard.biesheuvel, jsd, jaz, kostap, Patryk Duda
On Mon, Oct 14, 2019 at 03:25:04PM +0200, Marcin Wojtas wrote:
> From: Patryk Duda <pdk@semihalf.com>
>
> This patch implements convenient way of changing strings included
> in SMBIOS Table1, Table2, Table3.
>
> Strings can be altered by defining following PCDs:
> gMarvellTokenSpaceGuid.PcdProductManufacturer
> gMarvellTokenSpaceGuid.PcdProductPlatformName
> gMarvellTokenSpaceGuid.PcdProductSerial
> gMarvellTokenSpaceGuid.PcdProductVersion
>
> Signed-off-by: Patryk Duda <pdk@semihalf.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Series pushed as cd022cf92de8..48a95de81ede.
Thanks!
/
Leif
> ---
> Changelog:
> v4->v5
>
> * Cast PCD strings as 'CONST CHAR *'
>
> The updated branch with entire patchset was pushed to the github:
> https://github.com/MarvellEmbeddedProcessors/edk2-open-platform/commits/cn913x-upstream-r20191014
>
> Silicon/Marvell/Marvell.dec | 6 ++++++
> Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf | 4 ++++
> Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c | 22 ++++++++++----------
> 3 files changed, 21 insertions(+), 11 deletions(-)
>
> diff --git a/Silicon/Marvell/Marvell.dec b/Silicon/Marvell/Marvell.dec
> index d337d3e..cdf8154 100644
> --- a/Silicon/Marvell/Marvell.dec
> +++ b/Silicon/Marvell/Marvell.dec
> @@ -169,6 +169,12 @@
> gMarvellTokenSpaceGuid.PcdPciEAhci|{ 0x0 }|VOID*|0x3000034
> gMarvellTokenSpaceGuid.PcdPciESdhci|{ 0x0 }|VOID*|0x3000035
>
> +#Platform description
> + gMarvellTokenSpaceGuid.PcdProductManufacturer|"Marvell"|VOID*|0x50000100
> + gMarvellTokenSpaceGuid.PcdProductPlatformName|"Marvell Development Board"|VOID*|0x50000101
> + gMarvellTokenSpaceGuid.PcdProductSerial|"Serial Not Set"|VOID*|0x50000103
> + gMarvellTokenSpaceGuid.PcdProductVersion|"Revision unknown"|VOID*|0x50000102
> +
> #RTC
> gMarvellTokenSpaceGuid.PcdRtcBaseAddress|0x0|UINT64|0x40000052
>
> diff --git a/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf b/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
> index 8b4586c..7722146 100644
> --- a/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
> +++ b/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
> @@ -36,6 +36,10 @@
>
> [FixedPcd]
> gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision
> + gMarvellTokenSpaceGuid.PcdProductManufacturer
> + gMarvellTokenSpaceGuid.PcdProductPlatformName
> + gMarvellTokenSpaceGuid.PcdProductSerial
> + gMarvellTokenSpaceGuid.PcdProductVersion
>
> [Protocols]
> gEfiSmbiosProtocolGuid # PROTOCOL ALWAYS_CONSUMED
> diff --git a/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c b/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c
> index 08f4fa7..3b909f3 100644
> --- a/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c
> +++ b/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c
> @@ -101,10 +101,10 @@ STATIC SMBIOS_TABLE_TYPE1 mArmadaDefaultType1 = {
> };
>
> STATIC CHAR8 CONST *mArmadaDefaultType1Strings[] = {
> - "Marvell \0",/* Manufacturer */
> - "Armada 7k/8k Family Board \0",/* Product Name placeholder*/
> - "Revision unknown \0",/* Version placeholder */
> - " \0",/* 32 character buffer */
> + (CHAR8 CONST *)PcdGetPtr (PcdProductManufacturer),
> + (CHAR8 CONST *)PcdGetPtr (PcdProductPlatformName),
> + (CHAR8 CONST *)PcdGetPtr (PcdProductVersion),
> + (CHAR8 CONST *)PcdGetPtr (PcdProductSerial),
> NULL
> };
>
> @@ -129,10 +129,10 @@ STATIC SMBIOS_TABLE_TYPE2 mArmadaDefaultType2 = {
> };
>
> STATIC CHAR8 CONST *mArmadaDefaultType2Strings[] = {
> - "Marvell \0",/* Manufacturer */
> - "Armada 7k/8k Family Board \0",/* Product Name placeholder*/
> - "Revision unknown \0",/* Version placeholder */
> - "Serial Not Set \0",/* Serial */
> + (CHAR8 CONST *)PcdGetPtr (PcdProductManufacturer),
> + (CHAR8 CONST *)PcdGetPtr (PcdProductPlatformName),
> + (CHAR8 CONST *)PcdGetPtr (PcdProductVersion),
> + (CHAR8 CONST *)PcdGetPtr (PcdProductSerial),
> "Base of Chassis \0",/* Board location */
> NULL
> };
> @@ -160,9 +160,9 @@ STATIC SMBIOS_TABLE_TYPE3 mArmadaDefaultType3 = {
> };
>
> STATIC CHAR8 CONST *mArmadaDefaultType3Strings[] = {
> - "Marvell \0",/* Manufacturer placeholder */
> - "Revision unknown \0",/* Version placeholder */
> - "Serial Not Set \0",/* Serial placeholder */
> + (CHAR8 CONST *)PcdGetPtr (PcdProductManufacturer),
> + (CHAR8 CONST *)PcdGetPtr (PcdProductVersion),
> + (CHAR8 CONST *)PcdGetPtr (PcdProductSerial),
> NULL
> };
>
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [edk2-platforms: PATCH v5 8/9] Marvell/Drivers: SmbiosPlatformDxe: Load SMBIOS strings from PCD
2019-10-15 18:07 ` Leif Lindholm
@ 2019-10-16 6:01 ` Marcin Wojtas
0 siblings, 0 replies; 3+ messages in thread
From: Marcin Wojtas @ 2019-10-16 6:01 UTC (permalink / raw)
To: Leif Lindholm
Cc: edk2-devel-groups-io, Ard Biesheuvel, jsd@semihalf.com,
Grzegorz Jaszczyk, Kostya Porotchkin, Patryk Duda
Hi Leif,
wt., 15 paź 2019 o 20:07 Leif Lindholm <leif.lindholm@linaro.org> napisał(a):
>
> On Mon, Oct 14, 2019 at 03:25:04PM +0200, Marcin Wojtas wrote:
> > From: Patryk Duda <pdk@semihalf.com>
> >
> > This patch implements convenient way of changing strings included
> > in SMBIOS Table1, Table2, Table3.
> >
> > Strings can be altered by defining following PCDs:
> > gMarvellTokenSpaceGuid.PcdProductManufacturer
> > gMarvellTokenSpaceGuid.PcdProductPlatformName
> > gMarvellTokenSpaceGuid.PcdProductSerial
> > gMarvellTokenSpaceGuid.PcdProductVersion
> >
> > Signed-off-by: Patryk Duda <pdk@semihalf.com>
>
> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
> Series pushed as cd022cf92de8..48a95de81ede.
>
Thanks a lot!
Marcin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-10-16 6:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-14 13:25 [edk2-platforms: PATCH v5 8/9] Marvell/Drivers: SmbiosPlatformDxe: Load SMBIOS strings from PCD Marcin Wojtas
2019-10-15 18:07 ` Leif Lindholm
2019-10-16 6:01 ` Marcin Wojtas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox