Re: [edk2] [RFC PATCH edk2-platforms 4/6] Silicon/SynQuacer: make lowest supported f/w version PCD configurable

2018-03-19 Thread Zeng, Star
It is to be used to fill the structure with 
EDKII_SYSTEM_FIRMWARE_IMAGE_DESCRIPTOR type, right?
EDKII_SYSTEM_FIRMWARE_IMAGE_DESCRIPTOR is defined in SignedCapsulePkg.
Is it better to define this PCD in SignedCapsulePkg if needed?


Thanks,
Star
-Original Message-
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Ard 
Biesheuvel
Sent: Monday, March 19, 2018 4:19 PM
To: Leif Lindholm <leif.lindh...@linaro.org>; Zeng, Star <star.z...@intel.com>; 
Ni, Ruiyu <ruiyu...@intel.com>; Dong, Eric <eric.d...@intel.com>
Cc: edk2-devel@lists.01.org
Subject: Re: [edk2] [RFC PATCH edk2-platforms 4/6] Silicon/SynQuacer: make 
lowest supported f/w version PCD configurable

On 19 March 2018 at 16:12, Leif Lindholm <leif.lindh...@linaro.org> wrote:
> On Fri, Mar 16, 2018 at 04:13:20PM +, Ard Biesheuvel wrote:
>> Allow the lowest supported firmware version to be configured by PCD 
>> so that each platform can set it individually.
>
> Is there a case for adding this PCD to MdeModulePkg?
>

Given that generic Capsule support is implemented there, I agree this should 
probably be added to MdeModulePkg instead.



>> Contributed-under: TianoCore Contribution Agreement 1.1
>> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org>
>> ---
>>  
>> Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf
>>| 2 ++
>>  
>> Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc
>>  | 2 +-
>>  Silicon/Socionext/SynQuacer/SynQuacer.dec   
>> | 3 +++
>>  3 files changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git 
>> a/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirm
>> wareDescriptor.inf 
>> b/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirm
>> wareDescriptor.inf index 95a5e482a713..db0c9c43b2e5 100644
>> --- 
>> a/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirm
>> wareDescriptor.inf
>> +++ b/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/System
>> +++ FirmwareDescriptor.inf
>> @@ -29,6 +29,7 @@ [Packages]
>>MdeModulePkg/MdeModulePkg.dec
>>MdePkg/MdePkg.dec
>>SignedCapsulePkg/SignedCapsulePkg.dec
>> +  Silicon/Socionext/SynQuacer/SynQuacer.dec
>>
>>  [LibraryClasses]
>>DebugLib
>> @@ -39,6 +40,7 @@ [LibraryClasses]
>>  [FixedPcd]
>>gArmTokenSpaceGuid.PcdFdSize
>>gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision
>> +  gSynQuacerTokenSpaceGuid.PcdLowestSupportedFirmwareVersion
>>
>>  [Pcd]
>>
>> gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareImageDescrip
>> tor diff --git 
>> a/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirm
>> wareDescriptorTable.aslc 
>> b/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirm
>> wareDescriptorTable.aslc index fb69de078313..12a56315a5ab 100644
>> --- 
>> a/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirm
>> wareDescriptorTable.aslc
>> +++ b/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/System
>> +++ FirmwareDescriptorTable.aslc
>> @@ -25,7 +25,7 @@
>>  #define BUILD_STRING(x) L"build #" __BUILD_STRING(x)
>>  #define CURRENT_FIRMWARE_VERSIONFixedPcdGet32 
>> (PcdFirmwareRevision)
>>  #define CURRENT_FIRMWARE_VERSION_STRING BUILD_STRING (FixedPcdGet32 
>> (PcdFirmwareRevision))
>> -#define LOWEST_SUPPORTED_FIRMWARE_VERSION   0x0001
>> +#define LOWEST_SUPPORTED_FIRMWARE_VERSION   FixedPcdGet32 
>> (PcdLowestSupportedFirmwareVersion)
>>
>>  #define IMAGE_IDSIGNATURE_64('S', 'N', 'D', 
>> 'E', 'V', 'B', 'O', 'X')
>>  #define IMAGE_ID_STRING L"Socionext Developer Box"
>> diff --git a/Silicon/Socionext/SynQuacer/SynQuacer.dec 
>> b/Silicon/Socionext/SynQuacer/SynQuacer.dec
>> index eb4fc4ace2f7..ccaf80def06b 100644
>> --- a/Silicon/Socionext/SynQuacer/SynQuacer.dec
>> +++ b/Silicon/Socionext/SynQuacer/SynQuacer.dec
>> @@ -44,6 +44,9 @@ [PcdsFixedAtBuild]
>>
>>
>> gSynQuacerTokenSpaceGuid.PcdI2cReferenceClock|6250|UINT32|0x0
>> 005
>>
>> +  # for capsule update
>> +  
>> + gSynQuacerTokenSpaceGuid.PcdLowestSupportedFirmwareVersion|1|UINT32
>> + |0x0009
>> +
>>  [PcdsPatchableInModule, PcdsDynamic]
>># Enable both RC #0 and RC #1 by default
>>gSynQuacerTokenSpaceGuid.PcdPcieEnableMask|0x3|UINT8|0x0007
>> --
>> 2.15.1
>>
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [RFC PATCH edk2-platforms 4/6] Silicon/SynQuacer: make lowest supported f/w version PCD configurable

2018-03-19 Thread Ard Biesheuvel
On 19 March 2018 at 16:12, Leif Lindholm  wrote:
> On Fri, Mar 16, 2018 at 04:13:20PM +, Ard Biesheuvel wrote:
>> Allow the lowest supported firmware version to be configured by PCD
>> so that each platform can set it individually.
>
> Is there a case for adding this PCD to MdeModulePkg?
>

Given that generic Capsule support is implemented there, I agree this
should probably be added to MdeModulePkg instead.



>> Contributed-under: TianoCore Contribution Agreement 1.1
>> Signed-off-by: Ard Biesheuvel 
>> ---
>>  
>> Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf
>>| 2 ++
>>  
>> Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc
>>  | 2 +-
>>  Silicon/Socionext/SynQuacer/SynQuacer.dec   
>> | 3 +++
>>  3 files changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git 
>> a/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf
>>  
>> b/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf
>> index 95a5e482a713..db0c9c43b2e5 100644
>> --- 
>> a/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf
>> +++ 
>> b/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf
>> @@ -29,6 +29,7 @@ [Packages]
>>MdeModulePkg/MdeModulePkg.dec
>>MdePkg/MdePkg.dec
>>SignedCapsulePkg/SignedCapsulePkg.dec
>> +  Silicon/Socionext/SynQuacer/SynQuacer.dec
>>
>>  [LibraryClasses]
>>DebugLib
>> @@ -39,6 +40,7 @@ [LibraryClasses]
>>  [FixedPcd]
>>gArmTokenSpaceGuid.PcdFdSize
>>gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision
>> +  gSynQuacerTokenSpaceGuid.PcdLowestSupportedFirmwareVersion
>>
>>  [Pcd]
>>gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareImageDescriptor
>> diff --git 
>> a/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc
>>  
>> b/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc
>> index fb69de078313..12a56315a5ab 100644
>> --- 
>> a/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc
>> +++ 
>> b/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc
>> @@ -25,7 +25,7 @@
>>  #define BUILD_STRING(x) L"build #" __BUILD_STRING(x)
>>  #define CURRENT_FIRMWARE_VERSIONFixedPcdGet32 
>> (PcdFirmwareRevision)
>>  #define CURRENT_FIRMWARE_VERSION_STRING BUILD_STRING (FixedPcdGet32 
>> (PcdFirmwareRevision))
>> -#define LOWEST_SUPPORTED_FIRMWARE_VERSION   0x0001
>> +#define LOWEST_SUPPORTED_FIRMWARE_VERSION   FixedPcdGet32 
>> (PcdLowestSupportedFirmwareVersion)
>>
>>  #define IMAGE_IDSIGNATURE_64('S', 'N', 'D', 
>> 'E', 'V', 'B', 'O', 'X')
>>  #define IMAGE_ID_STRING L"Socionext Developer Box"
>> diff --git a/Silicon/Socionext/SynQuacer/SynQuacer.dec 
>> b/Silicon/Socionext/SynQuacer/SynQuacer.dec
>> index eb4fc4ace2f7..ccaf80def06b 100644
>> --- a/Silicon/Socionext/SynQuacer/SynQuacer.dec
>> +++ b/Silicon/Socionext/SynQuacer/SynQuacer.dec
>> @@ -44,6 +44,9 @@ [PcdsFixedAtBuild]
>>
>>gSynQuacerTokenSpaceGuid.PcdI2cReferenceClock|6250|UINT32|0x0005
>>
>> +  # for capsule update
>> +  
>> gSynQuacerTokenSpaceGuid.PcdLowestSupportedFirmwareVersion|1|UINT32|0x0009
>> +
>>  [PcdsPatchableInModule, PcdsDynamic]
>># Enable both RC #0 and RC #1 by default
>>gSynQuacerTokenSpaceGuid.PcdPcieEnableMask|0x3|UINT8|0x0007
>> --
>> 2.15.1
>>
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [RFC PATCH edk2-platforms 4/6] Silicon/SynQuacer: make lowest supported f/w version PCD configurable

2018-03-19 Thread Leif Lindholm
On Fri, Mar 16, 2018 at 04:13:20PM +, Ard Biesheuvel wrote:
> Allow the lowest supported firmware version to be configured by PCD
> so that each platform can set it individually.

Is there a case for adding this PCD to MdeModulePkg?

/
Leif

> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ard Biesheuvel 
> ---
>  
> Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf
>| 2 ++
>  
> Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc
>  | 2 +-
>  Silicon/Socionext/SynQuacer/SynQuacer.dec
>| 3 +++
>  3 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git 
> a/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf
>  
> b/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf
> index 95a5e482a713..db0c9c43b2e5 100644
> --- 
> a/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf
> +++ 
> b/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf
> @@ -29,6 +29,7 @@ [Packages]
>MdeModulePkg/MdeModulePkg.dec
>MdePkg/MdePkg.dec
>SignedCapsulePkg/SignedCapsulePkg.dec
> +  Silicon/Socionext/SynQuacer/SynQuacer.dec
>  
>  [LibraryClasses]
>DebugLib
> @@ -39,6 +40,7 @@ [LibraryClasses]
>  [FixedPcd]
>gArmTokenSpaceGuid.PcdFdSize
>gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision
> +  gSynQuacerTokenSpaceGuid.PcdLowestSupportedFirmwareVersion
>  
>  [Pcd]
>gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareImageDescriptor
> diff --git 
> a/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc
>  
> b/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc
> index fb69de078313..12a56315a5ab 100644
> --- 
> a/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc
> +++ 
> b/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc
> @@ -25,7 +25,7 @@
>  #define BUILD_STRING(x) L"build #" __BUILD_STRING(x)
>  #define CURRENT_FIRMWARE_VERSIONFixedPcdGet32 
> (PcdFirmwareRevision)
>  #define CURRENT_FIRMWARE_VERSION_STRING BUILD_STRING (FixedPcdGet32 
> (PcdFirmwareRevision))
> -#define LOWEST_SUPPORTED_FIRMWARE_VERSION   0x0001
> +#define LOWEST_SUPPORTED_FIRMWARE_VERSION   FixedPcdGet32 
> (PcdLowestSupportedFirmwareVersion)
>  
>  #define IMAGE_IDSIGNATURE_64('S', 'N', 'D', 'E', 
> 'V', 'B', 'O', 'X')
>  #define IMAGE_ID_STRING L"Socionext Developer Box"
> diff --git a/Silicon/Socionext/SynQuacer/SynQuacer.dec 
> b/Silicon/Socionext/SynQuacer/SynQuacer.dec
> index eb4fc4ace2f7..ccaf80def06b 100644
> --- a/Silicon/Socionext/SynQuacer/SynQuacer.dec
> +++ b/Silicon/Socionext/SynQuacer/SynQuacer.dec
> @@ -44,6 +44,9 @@ [PcdsFixedAtBuild]
>  
>gSynQuacerTokenSpaceGuid.PcdI2cReferenceClock|6250|UINT32|0x0005
>  
> +  # for capsule update
> +  
> gSynQuacerTokenSpaceGuid.PcdLowestSupportedFirmwareVersion|1|UINT32|0x0009
> +
>  [PcdsPatchableInModule, PcdsDynamic]
># Enable both RC #0 and RC #1 by default
>gSynQuacerTokenSpaceGuid.PcdPcieEnableMask|0x3|UINT8|0x0007
> -- 
> 2.15.1
> 
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [RFC PATCH edk2-platforms 4/6] Silicon/SynQuacer: make lowest supported f/w version PCD configurable

2018-03-16 Thread Ard Biesheuvel
Allow the lowest supported firmware version to be configured by PCD
so that each platform can set it individually.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel 
---
 
Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf
   | 2 ++
 
Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc
 | 2 +-
 Silicon/Socionext/SynQuacer/SynQuacer.dec  
 | 3 +++
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git 
a/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf
 
b/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf
index 95a5e482a713..db0c9c43b2e5 100644
--- 
a/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf
+++ 
b/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf
@@ -29,6 +29,7 @@ [Packages]
   MdeModulePkg/MdeModulePkg.dec
   MdePkg/MdePkg.dec
   SignedCapsulePkg/SignedCapsulePkg.dec
+  Silicon/Socionext/SynQuacer/SynQuacer.dec
 
 [LibraryClasses]
   DebugLib
@@ -39,6 +40,7 @@ [LibraryClasses]
 [FixedPcd]
   gArmTokenSpaceGuid.PcdFdSize
   gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision
+  gSynQuacerTokenSpaceGuid.PcdLowestSupportedFirmwareVersion
 
 [Pcd]
   gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareImageDescriptor
diff --git 
a/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc
 
b/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc
index fb69de078313..12a56315a5ab 100644
--- 
a/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc
+++ 
b/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc
@@ -25,7 +25,7 @@
 #define BUILD_STRING(x) L"build #" __BUILD_STRING(x)
 #define CURRENT_FIRMWARE_VERSIONFixedPcdGet32 (PcdFirmwareRevision)
 #define CURRENT_FIRMWARE_VERSION_STRING BUILD_STRING (FixedPcdGet32 
(PcdFirmwareRevision))
-#define LOWEST_SUPPORTED_FIRMWARE_VERSION   0x0001
+#define LOWEST_SUPPORTED_FIRMWARE_VERSION   FixedPcdGet32 
(PcdLowestSupportedFirmwareVersion)
 
 #define IMAGE_IDSIGNATURE_64('S', 'N', 'D', 'E', 
'V', 'B', 'O', 'X')
 #define IMAGE_ID_STRING L"Socionext Developer Box"
diff --git a/Silicon/Socionext/SynQuacer/SynQuacer.dec 
b/Silicon/Socionext/SynQuacer/SynQuacer.dec
index eb4fc4ace2f7..ccaf80def06b 100644
--- a/Silicon/Socionext/SynQuacer/SynQuacer.dec
+++ b/Silicon/Socionext/SynQuacer/SynQuacer.dec
@@ -44,6 +44,9 @@ [PcdsFixedAtBuild]
 
   gSynQuacerTokenSpaceGuid.PcdI2cReferenceClock|6250|UINT32|0x0005
 
+  # for capsule update
+  
gSynQuacerTokenSpaceGuid.PcdLowestSupportedFirmwareVersion|1|UINT32|0x0009
+
 [PcdsPatchableInModule, PcdsDynamic]
   # Enable both RC #0 and RC #1 by default
   gSynQuacerTokenSpaceGuid.PcdPcieEnableMask|0x3|UINT8|0x0007
-- 
2.15.1

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