From: Shenglei Zhang <shenglei.zhang@intel.com>
To: edk2-devel@lists.01.org
Subject: [PATCH v2] IntelSiliconPkg/MicrocodeUpdateDxe: Error message enhancement
Date: Tue, 19 Feb 2019 15:56:44 +0800 [thread overview]
Message-ID: <20190219075644.20320-1-shenglei.zhang@intel.com> (raw)
The error message of ExtendedTableCount is not clear. Add the count
number into the debug message.
https://bugzilla.tianocore.org/show_bug.cgi?id=1500
v2: Change the judgment condition to return error message when
ExtendedTableCount is not equal to target value.
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
---
.../Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/IntelSiliconPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdate.c b/IntelSiliconPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdate.c
index 9098712c2f..037b2433a6 100644
--- a/IntelSiliconPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdate.c
+++ b/IntelSiliconPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdate.c
@@ -517,8 +517,8 @@ VerifyMicrocode (
// Checksum correct
//
ExtendedTableCount = ExtendedTableHeader->ExtendedSignatureCount;
- if (ExtendedTableCount > (ExtendedTableLength - sizeof(CPU_MICROCODE_EXTENDED_TABLE_HEADER)) / sizeof(CPU_MICROCODE_EXTENDED_TABLE)) {
- DEBUG((DEBUG_ERROR, "VerifyMicrocode - ExtendedTableCount too big\n"));
+ if (ExtendedTableCount != (ExtendedTableLength - sizeof(CPU_MICROCODE_EXTENDED_TABLE_HEADER)) / sizeof(CPU_MICROCODE_EXTENDED_TABLE)) {
+ DEBUG((DEBUG_ERROR, "VerifyMicrocode - ExtendedTableCount %d is incorrect\n", ExtendedTableCount));
} else {
ExtendedTable = (CPU_MICROCODE_EXTENDED_TABLE *)(ExtendedTableHeader + 1);
for (Index = 0; Index < ExtendedTableCount; Index++) {
--
2.18.0.windows.1
next reply other threads:[~2019-02-19 7:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-19 7:56 Shenglei Zhang [this message]
2019-02-19 9:38 ` [PATCH v2] IntelSiliconPkg/MicrocodeUpdateDxe: Error message enhancement Ni, Ray
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190219075644.20320-1-shenglei.zhang@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox