UefiCpuPkg/MicrocodeUpdate: Fix GetImage API
Current GetImage API forgets to return data to caller. Add code to fix it. Cc: Jeff Fan <jeff.fan@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
This commit is contained in:
parent
e50f951286
commit
bcc6a38f4c
|
@ -255,6 +255,16 @@ MicrocodeRead (
|
||||||
TotalSize = MicrocodeEntryPoint->TotalSize;
|
TotalSize = MicrocodeEntryPoint->TotalSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ImageIndex == Count + 1) {
|
||||||
|
if (*ImageSize < TotalSize) {
|
||||||
|
*ImageSize = TotalSize;
|
||||||
|
return EFI_BUFFER_TOO_SMALL;
|
||||||
|
}
|
||||||
|
*ImageSize = TotalSize;
|
||||||
|
CopyMem (Image, MicrocodeEntryPoint, TotalSize);
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// It is the padding data between the microcode patches for microcode patches alignment.
|
// It is the padding data between the microcode patches for microcode patches alignment.
|
||||||
|
|
Loading…
Reference in New Issue