[edk2-devel] [PATCH v2 1/1] OvmfPkg:Add variable store is full debug info

Zhenyu Zhang zhenyzha at redhat.com
Thu Sep 7 11:11:17 UTC 2023


From: "Zhenyu Zhang" <zhenyzha at redhat.com>

When the variable store is full, edk2 will directly assert.
Add debug information to help users understand what caused
the assertion.

 Actual results:
 RecordVarErrorFlag (0xEF) 9A144FE2A47E:937FE521-95AE-4D1A-8929-
 48BCD90AD31A - 0x00000003 - 0x7E
 CommonVariableSpace = 0x3FF9C - CommonVariableTotalSize =
 0x3FF98
 RecordVarErrorFlag (0xEF) 9A144FE2A47E:937FE521-95AE-4D1A-8929-
 48BCD90AD31A - 0x00000003 - 0x92
 CommonVariableSpace = 0x3FF9C - CommonVariableTotalSize = 0x3FF98

 Synchronous Exception at 0x000000023CA60374
 ......
 ASSERT_EFI_ERROR (Status = Out of Resources)
 ASSERT /builddir/build/BUILD/edk2-ba91d0292e59/OvmfPkg/Library/
 PlatformBootManagerLib/BdsPlatform.c(142): !(((INTN)(RETURN_
 STATUS)(Status)) < 0)

Cc: Oliver Steffen <osteffen at redhat.com>
Cc: Gerd Hoffmann <kraxel at redhat.com>                      
Cc: Marc-André Lureau <marcandre.lureau at redhat.com>
Cc: Stefan Berger <stefanb at linux.ibm.com>
Cc: Anthony Perard <anthony.perard at citrix.com>
Cc: Julien Grall <julien at xen.org>
Signed-off-by: Zhenyu Zhang <zhenyzha at redhat.com>
---
 OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
index 8dc2bbf97371..c95c7931a3f5 100644
--- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
+++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
@@ -139,6 +139,7 @@ PlatformRegisterFvBootOption (
 
   if (OptionIndex == -1) {
     Status = EfiBootManagerAddLoadOptionVariable (&NewOption, MAX_UINTN);
+    DEBUG ((DEBUG_ERROR, "ERROR: Variable store is full.\n"));
     ASSERT_EFI_ERROR (Status);
   }
 
-- 
2.39.3



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108374): https://edk2.groups.io/g/devel/message/108374
Mute This Topic: https://groups.io/mt/101211889/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list