Silicon/Intel/Tools/FitGen/FitGen.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
From: Dakota Chiang <dakota.chiang@intel.com>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4198
After commit 1e1e35bb3b2fceea75ad97968da4b31f059dcb4c,
FIT Type 2 ACM entry is not generated as expected with given -I arguments.
FMS/FMS value is overridden by GetAcmFms().
This patch detects whether FMS/FMS Mask is already assigned
with -I argument. If it's not zero, skip invoking GetAcmFms().
Signed-off-by: Dakota Chiang <dakota.chiang@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Jason1 Lin <jason1.lin@intel.com>
Cc: Rahul R Kumar <rahul.r.kumar@intel.com>
---
Silicon/Intel/Tools/FitGen/FitGen.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/Silicon/Intel/Tools/FitGen/FitGen.c b/Silicon/Intel/Tools/FitGen/FitGen.c
index 4ba07945a6..16c8b9b026 100644
--- a/Silicon/Intel/Tools/FitGen/FitGen.c
+++ b/Silicon/Intel/Tools/FitGen/FitGen.c
@@ -3745,9 +3745,14 @@ FitGen (
DumpAcm((ACM_FORMAT *)AcmBuffer);
if (gFitTableContext.StartupAcm[Index].Version >= 0x200) {
- GetAcmFms((ACM_FORMAT *)AcmBuffer, &gFitTableContext.StartupAcm[Index].FMS, &gFitTableContext.StartupAcm[Index].FMSMask);
- printf("ACM FMS:%08x\n", gFitTableContext.StartupAcm[Index].FMS);
- printf("ACM FMS Mask:%08x\n", gFitTableContext.StartupAcm[Index].FMSMask);
+ if ((gFitTableContext.StartupAcm[Index].FMS == 0) && (gFitTableContext.StartupAcm[Index].FMSMask == 0)) {
+ //
+ // FMS and FMSMask is not assigned via -I argument. Get it from ACM
+ //
+ GetAcmFms((ACM_FORMAT *)AcmBuffer, &gFitTableContext.StartupAcm[Index].FMS, &gFitTableContext.StartupAcm[Index].FMSMask);
+ printf("ACM FMS:%08x\n", gFitTableContext.StartupAcm[Index].FMS);
+ printf("ACM FMS Mask:%08x\n", gFitTableContext.StartupAcm[Index].FMSMask);
+ }
}
}
else {
--
2.38.1.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#97765): https://edk2.groups.io/g/devel/message/97765
Mute This Topic: https://groups.io/mt/95906183/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
-----Original Message-----
From: Chiang, Dakota <dakota.chiang@intel.com>
Sent: Tuesday, December 27, 2022 5:23 PM
To: devel@edk2.groups.io
Cc: Chiang, Dakota <dakota.chiang@intel.com>; Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Lin, Jason1 <jason1.lin@intel.com>; Kumar, Rahul R <rahul.r.kumar@intel.com>
Subject: [PATCH] S-ACM entry ver 0x200 does not contain requested FMS&mask
From: Dakota Chiang <dakota.chiang@intel.com>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4198
After commit 1e1e35bb3b2fceea75ad97968da4b31f059dcb4c,
FIT Type 2 ACM entry is not generated as expected with given -I arguments.
FMS/FMS value is overridden by GetAcmFms().
This patch detects whether FMS/FMS Mask is already assigned with -I argument. If it's not zero, skip invoking GetAcmFms().
Signed-off-by: Dakota Chiang <dakota.chiang@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Jason1 Lin <jason1.lin@intel.com>
Cc: Rahul R Kumar <rahul.r.kumar@intel.com>
---
Silicon/Intel/Tools/FitGen/FitGen.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/Silicon/Intel/Tools/FitGen/FitGen.c b/Silicon/Intel/Tools/FitGen/FitGen.c
index 4ba07945a6..16c8b9b026 100644
--- a/Silicon/Intel/Tools/FitGen/FitGen.c
+++ b/Silicon/Intel/Tools/FitGen/FitGen.c
@@ -3745,9 +3745,14 @@ FitGen (
DumpAcm((ACM_FORMAT *)AcmBuffer); if (gFitTableContext.StartupAcm[Index].Version >= 0x200) {- GetAcmFms((ACM_FORMAT *)AcmBuffer, &gFitTableContext.StartupAcm[Index].FMS, &gFitTableContext.StartupAcm[Index].FMSMask);- printf("ACM FMS:%08x\n", gFitTableContext.StartupAcm[Index].FMS);- printf("ACM FMS Mask:%08x\n", gFitTableContext.StartupAcm[Index].FMSMask);+ if ((gFitTableContext.StartupAcm[Index].FMS == 0) && (gFitTableContext.StartupAcm[Index].FMSMask == 0)) {+ //+ // FMS and FMSMask is not assigned via -I argument. Get it from ACM+ //+ GetAcmFms((ACM_FORMAT *)AcmBuffer, &gFitTableContext.StartupAcm[Index].FMS, &gFitTableContext.StartupAcm[Index].FMSMask);+ printf("ACM FMS:%08x\n", gFitTableContext.StartupAcm[Index].FMS);+ printf("ACM FMS Mask:%08x\n", gFitTableContext.StartupAcm[Index].FMSMask);+ } } } else {--
2.38.1.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#97802): https://edk2.groups.io/g/devel/message/97802
Mute This Topic: https://groups.io/mt/95906183/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2026 Red Hat, Inc.