From 96390bb8a51519a0dc564a63186d4955f2521459 Mon Sep 17 00:00:00 2001 From: Crystal Lee Date: Mon, 22 Jul 2024 14:19:51 +0800 Subject: [PATCH] UefiCpuPkg: Update return status to follow spec SplitPage may return OUT_OF_RESOURCES if no memory resource to split page entry. ConvertMemoryPageAttributes should also return OUT_OF_RESOURCES instead of override the status to UNSUPPORTED. Then EfiSetMemoryAttributes and EfiClearMemoryAttributes can return correct status of OUT_OF_RESOURCES when requested attributes cannot be applied due to lack of system resource. Cc: Felix Polyudov Cc: David Hsieh Cc: James Wang Signed-off-by: Crystal Lee --- UefiCpuPkg/CpuDxe/CpuPageTable.c | 1 - 1 file changed, 1 deletion(-) diff --git a/UefiCpuPkg/CpuDxe/CpuPageTable.c b/UefiCpuPkg/CpuDxe/CpuPageTable.c index 52c50b073b..9a519bcb7e 100644 --- a/UefiCpuPkg/CpuDxe/CpuPageTable.c +++ b/UefiCpuPkg/CpuDxe/CpuPageTable.c @@ -849,7 +849,6 @@ ConvertMemoryPageAttributes ( Status = SplitPage (PageEntry, PageAttribute, SplitAttribute, AllocatePagesFunc); if (RETURN_ERROR (Status)) { - Status = RETURN_UNSUPPORTED; goto Done; }