On 10/22/14 10:25, Dong, Eric wrote:
> Laszlo,
> 
> The OsIndications will be processed before boot  the first boot
> option, detail process is in PlatformBdsEnterFrontPage function.
> (IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c)
> BdsEntry() -> PlatformBdsPolicyBehavior() ->
> PlatformBdsEnterFrontPage().

That's interesting!

I've been aware that PlatformBdsEnterFrontPage() processes
"OsIndications". However, at least in the OVMF build,
PlatformBdsEnterFrontPage() is never reached automatically, under the
circumstances I described. Here's the call tree again (this time more
densely, without the comments):

BdsEntry()                        [Intel BDS]
  BdsFormalizeEfiGlobalVariable() [Intel BDS]
  PlatformBdsPolicyBehavior()     [OVMF]
  BdsBootDeviceSelect()           [Intel BDS]
    PlatformBdsEnterFrontPage()   [Intel BDS] -- never reached

Apparently, it is the responsibility of PlatformBdsPolicyBehavior() to
call PlatformBdsEnterFrontPage()!

At the moment, OVMF's PlatformBdsPolicyBehavior() only calls
PlatformBdsEnterFrontPage() if the user presses a key on the TianoCore
splash screen.

I'm experimenting with this.

Thanks a lot,
Laszlo

> 
>   //
>   // goto FrontPage directly when EFI_OS_INDICATIONS_BOOT_TO_FW_UI is set
>   //
>   OsIndication = 0;
>   DataSize = sizeof(UINT64);
>   Status = gRT->GetVariable (
>                   L"OsIndications",
>                   &gEfiGlobalVariableGuid,
>                   NULL,
>                   &DataSize,
>                   &OsIndication
>                   );
> 
>   //
>   // goto FrontPage directly when EFI_OS_INDICATIONS_BOOT_TO_FW_UI is set. 
> Skip HotkeyBoot
>   //
>   if (!EFI_ERROR(Status) && ((OsIndication & 
> EFI_OS_INDICATIONS_BOOT_TO_FW_UI) != 0)) {       
>     ......
> 
> Thanks,
> Eric
> 
> -----Original Message-----
> From: Laszlo Ersek [mailto:ler...@redhat.com] 
> Sent: Tuesday, October 21, 2014 7:14 PM
> To: edk2-devel list
> Subject: [edk2] BDS: should BootOrder or OsIndications take priority?
> 
> Section "7.5.4 Exchanging information between the OS and Firmware" in the 
> UEFI spec seems to imply that if bit 0 is set in both OsIndicationsSupported 
> and OsIndications, then at next boot the firmware should stop at the firmware 
> UI. It appears that this OS-side request is independent of, and prevails 
> over, any BootOrder and Boot#### settings.
> 
> Is the above interpretation correct? And if so, does the Intel BDS driver 
> diverge from it?
> 
> Namely,
> 
> BdsEntry()                              
> [IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c]
>   BdsFormalizeEfiGlobalVariable()
>     // verifies the size, contents, and
>     // attributes of "OsIndications",
>     // but doesn't act upon it
>   PlatformBdsPolicyBehavior()           [...]
>     // might rework Boot#### and
>     // BootOrder
>   BdsBootDeviceSelect()                 
> [IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c]
>     // invokes the firmware UI only if:
>     // - no active boot option, or
>     // - all active boot options
>     //   failed to boot, or
>     // - an active boot option
>     //   succeded, and returned to the
>     //   firmware.
>     PlatformBdsEnterFrontPage()         
> [IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c]
>       // looks at OsIndications
> 
> That is, the driver seems to enforce a "formal correctness" of 
> "OsIndications" early enough, but the code that would *act* upon it is never 
> reached if there is at least one active and successful boot option that boots 
> an OS.
> 
> In other words, the Intel BDS code seems to favor BootOrder and Boot#### 
> above OsIndications. Is that a divergence from the UEFI spec?
> 
> Thanks,
> Laszlo
> 
> ------------------------------------------------------------------------------
> Comprehensive Server Monitoring with Site24x7.
> Monitor 10 servers for $9/Month.
> Get alerted through email, SMS, voice calls or mobile push notifications.
> Take corrective actions from your mobile device.
> http://p.sf.net/sfu/Zoho
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
> 
> ------------------------------------------------------------------------------
> Comprehensive Server Monitoring with Site24x7.
> Monitor 10 servers for $9/Month.
> Get alerted through email, SMS, voice calls or mobile push notifications.
> Take corrective actions from your mobile device.
> http://p.sf.net/sfu/Zoho
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
> 


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to