[edk2-devel] [PATCH v4 2/6] UefiCpuPkg/MpInitLib: Reduce the size when loading microcode patches
Wu, Hao A
hao.a.wu at intel.com
Mon Dec 30 01:58:13 UTC 2019
> > +
> > + 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
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#52602): https://edk2.groups.io/g/devel/message/52602
Mute This Topic: https://groups.io/mt/69283205/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list