From: "Wu, Hao A" <hao.a.wu@intel.com>
To: "Dong, Eric" <eric.dong@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Ni, Ray" <ray.ni@intel.com>, Laszlo Ersek <lersek@redhat.com>,
"Zeng, Star" <star.zeng@intel.com>,
"Fu, Siyuan" <siyuan.fu@intel.com>,
"Kinney, Michael D" <michael.d.kinney@intel.com>
Subject: Re: [PATCH v4 2/6] UefiCpuPkg/MpInitLib: Reduce the size when loading microcode patches
Date: Mon, 30 Dec 2019 01:58:13 +0000 [thread overview]
Message-ID: <B80AF82E9BFB8E4FBD8C89DA810C6A093C9806B3@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <ED077930C258884BBCB450DB737E662259F76DFB@shsmsx102.ccr.corp.intel.com>
> > +
> > + if (NeedLoad) {
> > + PatchCount++;
>
> [[Eric]] This logic seems not good. Image one case when PatchCount == 7 and
> MaxPatchNumber == 8. In this case, current logic needs to allocate new buffer
> for PatchInfoBuffer, but actually PatchInfoBuffer should be enough for this case.
> So I think "PatchCount++;" code should move after " TotalLoadSize +=
> PatchInfoBuffer[PatchCount - 1].AlignedSize;" and later " PatchCount - 1" should
> be " PatchCount".
>
> Thanks,
> Eric
Agree, how about changing the logic to:
if (NeedLoad) {
PatchCount++;
if (PatchCount > MaxPatchNumber) {
...
Best Regards,
Hao Wu
next prev parent reply other threads:[~2019-12-30 1:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-27 7:32 [PATCH v4 0/6] Microcode related optimizations Wu, Hao A
2019-12-27 7:32 ` [PATCH v4 1/6] UefiCpuPkg/MpInitLib: Collect processors' CPUID & Platform ID info Wu, Hao A
2019-12-27 8:12 ` Dong, Eric
2019-12-27 7:32 ` [PATCH v4 2/6] UefiCpuPkg/MpInitLib: Reduce the size when loading microcode patches Wu, Hao A
2019-12-30 1:52 ` Dong, Eric
2019-12-30 1:58 ` Wu, Hao A [this message]
2019-12-27 7:32 ` [PATCH v4 3/6] UefiCpuPkg: Add definitions for EDKII microcode patch HOB Wu, Hao A
2019-12-30 3:05 ` [edk2-devel] " Dong, Eric
2019-12-27 7:32 ` [PATCH v4 4/6] UefiCpuPkg/MpInitLib: Produce " Wu, Hao A
2019-12-30 6:17 ` Dong, Eric
2019-12-30 8:20 ` Wu, Hao A
2019-12-27 7:32 ` [PATCH v4 5/6] UefiCpuPkg/MpInitLib: Relocate microcode patch fields in CPU_MP_DATA Wu, Hao A
2019-12-30 6:47 ` Dong, Eric
2019-12-27 7:32 ` [PATCH v4 6/6] UefiCpuPkg/MpInitLib: Remove redundant microcode " Wu, Hao A
2019-12-30 6:19 ` Dong, Eric
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=B80AF82E9BFB8E4FBD8C89DA810C6A093C9806B3@SHSMSX104.ccr.corp.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