* [Patch] BaseTools: Add checking to EFI variable attribute.
@ 2018-11-01 15:07 BobCF
2018-11-02 1:43 ` Gao, Liming
0 siblings, 1 reply; 2+ messages in thread
From: BobCF @ 2018-11-01 15:07 UTC (permalink / raw)
To: edk2-devel; +Cc: Bob Feng, Liming Gao
This patch is going to add a check that only if the
attribute of a EFI variable include 'NV', it will be
added into PcdNvStoreDefaultValueBuffer.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 9c3759c0f5..a1c8dc7efb 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -1163,10 +1163,12 @@ class PlatformAutoGen(AutoGen):
Sku = Pcd.SkuInfoList[SkuName]
SkuId = Sku.SkuId
if SkuId is None or SkuId == '':
continue
if len(Sku.VariableName) > 0:
+ if Sku.VariableAttribute and 'NV' not in Sku.VariableAttribute:
+ continue
VariableGuidStructure = Sku.VariableGuidValue
VariableGuid = GuidStructureStringToGuidString(VariableGuidStructure)
for StorageName in Sku.DefaultStoreDict:
VariableInfo.append_variable(var_info(Index, pcdname, StorageName, SkuName, StringToArray(Sku.VariableName), VariableGuid, Sku.VariableOffset, Sku.VariableAttribute, Sku.HiiDefaultValue, Sku.DefaultStoreDict[StorageName] if Pcd.DatumType in TAB_PCD_NUMERIC_TYPES else StringToArray(Sku.DefaultStoreDict[StorageName]), Pcd.DatumType, Pcd.CustomAttribute['DscPosition'], Pcd.CustomAttribute.get('IsStru',False)))
Index += 1
--
2.18.0.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Patch] BaseTools: Add checking to EFI variable attribute.
2018-11-01 15:07 [Patch] BaseTools: Add checking to EFI variable attribute BobCF
@ 2018-11-02 1:43 ` Gao, Liming
0 siblings, 0 replies; 2+ messages in thread
From: Gao, Liming @ 2018-11-02 1:43 UTC (permalink / raw)
To: Feng, Bob C, edk2-devel@lists.01.org
Reviewed-by: Liming Gao <liming.gao@intel.com>
>-----Original Message-----
>From: Feng, Bob C
>Sent: Thursday, November 01, 2018 11:07 PM
>To: edk2-devel@lists.01.org
>Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>
>Subject: [Patch] BaseTools: Add checking to EFI variable attribute.
>
>This patch is going to add a check that only if the
>attribute of a EFI variable include 'NV', it will be
>added into PcdNvStoreDefaultValueBuffer.
>
>Contributed-under: TianoCore Contribution Agreement 1.1
>Signed-off-by: Bob Feng <bob.c.feng@intel.com>
>Cc: Liming Gao <liming.gao@intel.com>
>---
> BaseTools/Source/Python/AutoGen/AutoGen.py | 2 ++
> 1 file changed, 2 insertions(+)
>
>diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py
>b/BaseTools/Source/Python/AutoGen/AutoGen.py
>index 9c3759c0f5..a1c8dc7efb 100644
>--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
>+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
>@@ -1163,10 +1163,12 @@ class PlatformAutoGen(AutoGen):
> Sku = Pcd.SkuInfoList[SkuName]
> SkuId = Sku.SkuId
> if SkuId is None or SkuId == '':
> continue
> if len(Sku.VariableName) > 0:
>+ if Sku.VariableAttribute and 'NV' not in Sku.VariableAttribute:
>+ continue
> VariableGuidStructure = Sku.VariableGuidValue
> VariableGuid =
>GuidStructureStringToGuidString(VariableGuidStructure)
> for StorageName in Sku.DefaultStoreDict:
> VariableInfo.append_variable(var_info(Index, pcdname,
>StorageName, SkuName, StringToArray(Sku.VariableName), VariableGuid,
>Sku.VariableOffset, Sku.VariableAttribute, Sku.HiiDefaultValue,
>Sku.DefaultStoreDict[StorageName] if Pcd.DatumType in
>TAB_PCD_NUMERIC_TYPES else
>StringToArray(Sku.DefaultStoreDict[StorageName]), Pcd.DatumType,
>Pcd.CustomAttribute['DscPosition'], Pcd.CustomAttribute.get('IsStru',False)))
> Index += 1
>--
>2.18.0.windows.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-02 1:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-01 15:07 [Patch] BaseTools: Add checking to EFI variable attribute BobCF
2018-11-02 1:43 ` Gao, Liming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox