* [PATCH v2 1/1] IntelSiliconPkg/ShadowMicrocodePei: Fix return value in ShadowMicrocode.
@ 2020-12-09 6:59 Aaron Li
2020-12-09 12:58 ` Ni, Ray
0 siblings, 1 reply; 2+ messages in thread
From: Aaron Li @ 2020-12-09 6:59 UTC (permalink / raw)
To: devel; +Cc: Ray Ni, Rangasai V Chaganty, Siyuan Fu
ShadowMicrocode should return EFI_NOT_FOUND when no valid Microcode found
in FIT table.
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3110
Signed-off-by: Aaron Li <aaron.li@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
---
Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicrocodePei.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicrocodePei.c b/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicrocodePei.c
index 5c7ee6910c8e..1494397a8e36 100644
--- a/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicrocodePei.c
+++ b/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicrocodePei.c
@@ -377,6 +377,9 @@ IsValidFitTable (
with microcode patches data in it.
@retval EFI_SUCCESS The microcode has been shadowed to memory.
+ @retval EFI_INVALID_PARAMETER BufferSize or Buffer is NULL.
+ @retval EFI_INVALID_PARAMETER CpuIdCount not equal to 0 and MicrocodeCpuId is NULL.
+ @retval EFI_NOT_FOUND No valid microcode found.
@retval EFI_OUT_OF_RESOURCES The operation fails due to lack of resources.
**/
@@ -390,6 +393,7 @@ ShadowMicrocode (
OUT VOID **Buffer
)
{
+ EFI_STATUS Status;
UINT64 FitPointer;
FIRMWARE_INTERFACE_TABLE_ENTRY *FitEntry;
UINT32 EntryNum;
@@ -460,10 +464,13 @@ ShadowMicrocode (
));
ShadowMicrocodePatchWorker (PatchInfoBuffer, PatchCount, TotalLoadSize, BufferSize, Buffer);
+ Status = EFI_SUCCESS;
+ } else {
+ Status = EFI_NOT_FOUND;
}
FreePool (PatchInfoBuffer);
- return EFI_SUCCESS;
+ return Status;
}
--
2.29.2.windows.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 1/1] IntelSiliconPkg/ShadowMicrocodePei: Fix return value in ShadowMicrocode.
2020-12-09 6:59 [PATCH v2 1/1] IntelSiliconPkg/ShadowMicrocodePei: Fix return value in ShadowMicrocode Aaron Li
@ 2020-12-09 12:58 ` Ni, Ray
0 siblings, 0 replies; 2+ messages in thread
From: Ni, Ray @ 2020-12-09 12:58 UTC (permalink / raw)
To: Li, Aaron, devel@edk2.groups.io; +Cc: Chaganty, Rangasai V, Fu, Siyuan
Reviewed-by: Ray Ni <ray.ni@intel.com>
> -----Original Message-----
> From: Li, Aaron <aaron.li@intel.com>
> Sent: Wednesday, December 9, 2020 3:00 PM
> To: devel@edk2.groups.io
> Cc: Ni, Ray <ray.ni@intel.com>; Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>
> Subject: [PATCH v2 1/1] IntelSiliconPkg/ShadowMicrocodePei: Fix return value in ShadowMicrocode.
>
> ShadowMicrocode should return EFI_NOT_FOUND when no valid Microcode found
> in FIT table.
>
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3110
>
> Signed-off-by: Aaron Li <aaron.li@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
> Cc: Siyuan Fu <siyuan.fu@intel.com>
> ---
> Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicrocodePei.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicrocodePei.c
> b/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicrocodePei.c
> index 5c7ee6910c8e..1494397a8e36 100644
> --- a/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicrocodePei.c
> +++ b/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicrocodePei.c
> @@ -377,6 +377,9 @@ IsValidFitTable (
> with microcode patches data in it.
>
>
>
> @retval EFI_SUCCESS The microcode has been shadowed to memory.
>
> + @retval EFI_INVALID_PARAMETER BufferSize or Buffer is NULL.
>
> + @retval EFI_INVALID_PARAMETER CpuIdCount not equal to 0 and MicrocodeCpuId is NULL.
>
> + @retval EFI_NOT_FOUND No valid microcode found.
>
> @retval EFI_OUT_OF_RESOURCES The operation fails due to lack of resources.
>
>
>
> **/
>
> @@ -390,6 +393,7 @@ ShadowMicrocode (
> OUT VOID **Buffer
>
> )
>
> {
>
> + EFI_STATUS Status;
>
> UINT64 FitPointer;
>
> FIRMWARE_INTERFACE_TABLE_ENTRY *FitEntry;
>
> UINT32 EntryNum;
>
> @@ -460,10 +464,13 @@ ShadowMicrocode (
> ));
>
>
>
> ShadowMicrocodePatchWorker (PatchInfoBuffer, PatchCount, TotalLoadSize, BufferSize, Buffer);
>
> + Status = EFI_SUCCESS;
>
> + } else {
>
> + Status = EFI_NOT_FOUND;
>
> }
>
>
>
> FreePool (PatchInfoBuffer);
>
> - return EFI_SUCCESS;
>
> + return Status;
>
> }
>
>
>
>
>
> --
> 2.29.2.windows.2
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-09 12:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-09 6:59 [PATCH v2 1/1] IntelSiliconPkg/ShadowMicrocodePei: Fix return value in ShadowMicrocode Aaron Li
2020-12-09 12:58 ` Ni, Ray
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox