From: "wang xiaofeng" <winggundum82@163.com>
To: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: seems a minor logic error in UpdateCapsule of MdeModulePkg\Universal\CapsuleRuntimeDxe
Date: Fri, 13 Jan 2017 13:33:13 +0800 (CST) [thread overview]
Message-ID: <3d6f0ddd.45de.1599650c94c.Coremail.winggundum82@163.com> (raw)
In-Reply-To: <74D8A39837DF1E4DA445A8C0B3885C503A8DEFEE@shsmsx102.ccr.corp.intel.com>
Hi All.
In UpdateCapsule of MdeModulePkg\Universal\CapsuleRuntimeDxe,TempVarName is initlized but not used. I guess the author tends to set
TempVarName instead of CapsuleVarName if user calls UpdateCapsule multiple times. The two name are same for the first call .
StrCpyS (CapsuleVarName, sizeof(CapsuleVarName)/sizeof(CHAR16), EFI_CAPSULE_VARIABLE_NAME);
TempVarName = CapsuleVarName + StrLen (CapsuleVarName);
if (mTimes > 0) {
UnicodeValueToString (TempVarName, 0, mTimes, 0);
}
//
// ScatterGatherList is only referenced if the capsules are defined to persist across
// system reset. Set its value into NV storage to let pre-boot driver to pick it up
// after coming through a system reset.
//
Status = EfiSetVariable (
CapsuleVarName,
&gEfiCapsuleVendorGuid,
EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS,
sizeof (UINTN),
(VOID *) &ScatterGatherList
);
\x16�&
next prev parent reply other threads:[~2017-01-13 5:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-04 7:13 unable to build update capsule image Iddamsetty, Aravind (Artesyn)
2017-01-04 8:00 ` Yao, Jiewen
2017-01-04 8:14 ` Yao, Jiewen
2017-01-04 8:51 ` Iddamsetty, Aravind (Artesyn)
2017-01-12 3:02 ` how to update capsule image with CapsuleApp wang xiaofeng
2017-01-12 3:26 ` Yao, Jiewen
2017-01-13 5:33 ` wang xiaofeng [this message]
2017-01-24 7:56 ` SetUnicodeMem in DisplayEngineDxe seems unsafe wang xiaofeng
2017-01-25 0:54 ` Gao, Liming
2017-01-25 2:21 ` wang xiaofeng
2017-01-25 2:29 ` Dong, Eric
2017-01-25 2:48 ` wang xiaofeng
2017-01-25 2:29 ` Gao, Liming
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=3d6f0ddd.45de.1599650c94c.Coremail.winggundum82@163.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