diff --git a/UefiCpuPkg/Library/MpInitLib/Microcode.c b/UefiCpuPkg/Library/MpInitLib/Microcode.c
index 3da5bfb9cf..a9d06dd409 100644
--- a/UefiCpuPkg/Library/MpInitLib/Microcode.c
+++ b/UefiCpuPkg/Library/MpInitLib/Microcode.c
@@ -1,7 +1,7 @@
/** @file
Implementation of loading microcode on processors.
- Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.
+ Copyright (c) 2015 - 2020, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -397,16 +397,7 @@ LoadMicrocodePatchWorker (
Patches[Index].Size
);
- //
- // Zero-fill the padding area
- // Please note that AlignedSize will be no less than Size
- //
- ZeroMem (
- Walker + Patches[Index].Size,
- Patches[Index].AlignedSize - Patches[Index].Size
- );
-
- Walker += Patches[Index].AlignedSize;
+ Walker += Patches[Index].Size;
}
//
@@ -578,14 +569,9 @@ LoadMicrocodePatch (
//
// Store the information of this microcode patch
//
- if (TotalSize > ALIGN_VALUE (TotalSize, SIZE_1KB) ||
- ALIGN_VALUE (TotalSize, SIZE_1KB) > MAX_UINTN - TotalLoadSize) {
- goto OnExit;
- }
- PatchInfoBuffer[PatchCount - 1].Address = (UINTN) MicrocodeEntryPoint;
- PatchInfoBuffer[PatchCount - 1].Size = TotalSize;
- PatchInfoBuffer[PatchCount - 1].AlignedSize = ALIGN_VALUE (TotalSize, SIZE_1KB);
- TotalLoadSize += PatchInfoBuffer[PatchCount - 1].AlignedSize;
+ PatchInfoBuffer[PatchCount - 1].Address = (UINTN) MicrocodeEntryPoint;
+ PatchInfoBuffer[PatchCount - 1].Size = TotalSize;
+ TotalLoadSize += TotalSize;
}
//
diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.h b/UefiCpuPkg/Library/MpInitLib/MpLib.h
index 6609c958ce..b6e5a1afab 100644
--- a/UefiCpuPkg/Library/MpInitLib/MpLib.h
+++ b/UefiCpuPkg/Library/MpInitLib/MpLib.h
@@ -1,7 +1,7 @@
/** @file
Common header file for MP Initialize Library.
- Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.
+ Copyright (c) 2016 - 2020, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -54,7 +54,6 @@
typedef struct {
UINTN Address;
UINTN Size;
- UINTN AlignedSize;
} MICROCODE_PATCH_INFO;
//