On 04/29/14 19:32, Laszlo Ersek wrote:
> Hi,
> 
> when the BootOrder variable doesn't exist (for example, during the very
> first boot of an OVMF platform), the following ASSERT() triggers:
> 
> ASSERT_EFI_ERROR (Status = Not Found)
> ASSERT .../IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c(636):
> !EFI_ERROR
> 
> This comes from
> 
>   BdsLibEnumerateAllBootOption()
>     REFRESH_LEGACY_BOOT_OPTIONS
>       BdsDeleteAllInvalidLegacyBootOptions()
> 
> The last function listed above calls
> BdsLibGetVariableAndSize(L"BootOrder", ...). Since the "BootOrder" nvvar
> doesn't exist (the variable store is completely empty), BootOrderSize is
> set to zero, and BootOrder (the buffer) is set to NULL.
> 
> Hence the subsequent loop is skipped in full, and we reach
> 
>   //
>   // Adjust the number of boot options.
>   //
>   Status = gRT->SetVariable (
>                   L"BootOrder",
>                   &gEfiGlobalVariableGuid,
>                   EFI_VARIABLE_BOOTSERVICE_ACCESS | 
> EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,
>                   BootOrderSize,
>                   BootOrder
>                   );
>   //
>   // Shrinking variable with existing variable implementation shouldn't fail.
>   //
>   ASSERT_EFI_ERROR (Status);
> 
> The BootOrderSize==0 argument here, in combination with the used
> Attributes, amounts to a variable deletion request. Which fails, because
> the variable didn't exist in the first place:
> 
>   EFI_NOT_FOUND -- The variable trying to be updated or deleted was not
>                    found.
> 
> This triggers the ASSERT().

Ah, apologies, I just noticed you had fixed this bug yesterday, in r15489.

Thanks
Laszlo


------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to