/** @file\r
Implementation of loading microcode on processors.\r
\r
- Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2015 - 2020, Intel Corporation. All rights reserved.<BR>\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
Patches[Index].Size\r
);\r
\r
- //\r
- // Zero-fill the padding area\r
- // Please note that AlignedSize will be no less than Size\r
- //\r
- ZeroMem (\r
- Walker + Patches[Index].Size,\r
- Patches[Index].AlignedSize - Patches[Index].Size\r
- );\r
-\r
- Walker += Patches[Index].AlignedSize;\r
+ Walker += Patches[Index].Size;\r
}\r
\r
//\r
//\r
// Store the information of this microcode patch\r
//\r
- if (TotalSize > ALIGN_VALUE (TotalSize, SIZE_1KB) ||\r
- ALIGN_VALUE (TotalSize, SIZE_1KB) > MAX_UINTN - TotalLoadSize) {\r
- goto OnExit;\r
- }\r
- PatchInfoBuffer[PatchCount - 1].Address = (UINTN) MicrocodeEntryPoint;\r
- PatchInfoBuffer[PatchCount - 1].Size = TotalSize;\r
- PatchInfoBuffer[PatchCount - 1].AlignedSize = ALIGN_VALUE (TotalSize, SIZE_1KB);\r
- TotalLoadSize += PatchInfoBuffer[PatchCount - 1].AlignedSize;\r
+ PatchInfoBuffer[PatchCount - 1].Address = (UINTN) MicrocodeEntryPoint;\r
+ PatchInfoBuffer[PatchCount - 1].Size = TotalSize;\r
+ TotalLoadSize += TotalSize;\r
}\r
\r
//\r