Bug 6719

Summary: Gummiboot "Reboot Into Firmware Interface" does not work
Product: [Hardware Platforms] MinnowBoard MAX Firmware Reporter: Marcel Holtmann <marcel>
Component: minnowboard-firmwareAssignee: John 'Warthog9' Hawley <warthog9>
Status: RESOLVED MOVED QA Contact:
Severity: normal    
Priority: Medium CC: danders, david.wei, dvhart, michael.p.krau, mike.wu, shifeix.a.lu, sjolley.yp.pm, yoctoproject
Version: 2C A1   
Target Milestone: Production Release   
Hardware: MinnowBoard Max   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
Gummiboot"Reboot Into Firmware Interface" none

Description Marcel Holtmann 2014-09-12 20:40:58 UTC
The Gummiboot UEFI boot loader has an option to boot into the firmware interface. However that option does not work. It just reboots the systems and does not enter firmware interface.

From the Gummiboot source code it sets OsIndications to EFI_OS_INDICATIONS_BOOT_TO_FW_UI and then issues a ResetSystem.

Looks like Gummiboot is doing the correct thing here. What is the firmware suppose to be doing here?

The only way to get back to the BIOS (in case fastboot has been enabled) is to use "efibootmgr --bootnext 0000". That does drop me into the EFI shell. And from there I can exit into BIOS if I have to. However I would expect that I can do the same from Gummiboot as well.
Comment 1 Darren Hart 2014-09-12 20:57:47 UTC
I don't see anything in the UEFI 2.3.1 specification about EFI_OS_INDICATIONS_BOOT_TO_FW_UI. Tim, are you familiar with this variable or where we might find a listing for such variables if it is not in the specification itself?

This is a common complaint with the firmware. It tends to be fairly difficult for a user to get it to boot what they want it to without unplugging hardware, which is obviously unacceptable.
Comment 2 Michael Krau 2014-09-12 23:38:32 UTC
According to the UEFI SPecification rev 2.4 section 7.5.4 " Exchanging information between the OS and Firmware":

"The OsIndications variable returns a UINT64 bit mask owned by the OS and is used to indicate which features the OS wants firmware to enable or which actions the OS wants the firmware to take. The OS will supply this data with a SetVariable()call."

the important corollary:

"The OsIndicationsSupported variable returns a UINT64 bit mask owned by the 
firmware and indicates which of the OS indication features and actions that the firmware supports. This variable is recreated by firmware every boot, and cannot be modified by the OS."

However, it also notes:
"The EFI_OS_INDICATIONS_BOOT_TO_FW_UI bit can be set in the 
OsIndicationsSupported variable by the firmware, if the firmware supports OS requests to stop at a firmware user interface."

It matters little if the GummiBoot is doing the right thing, if the feature is not supported in the firmware. 

So first the question: Does the MinnowBoard MAX firmware actually supports this option?  (It is not a required feature to the specification, but if it is marked as supported, then it should work).   
  
The use of the term "BIOS" at this point is ambiguous.

So my second question is what is meant by "get back to the BIOS"?  
Would that be the boot manager, hardware manager?  what functional interface is expected?
Comment 3 Marcel Holtmann 2014-09-13 02:06:06 UTC
So Gummiboot checks OsIndicationsSupported and if EFI_OS_INDICATIONS_BOOT_TO_FW_UI is set, then menu options "Reboot Into Firmware Interface" is added to its boot menu.

When you select it, then it reads OsIndications, adds EFI_OS_INDICATIONS_BOOT_TO_FW_UI into it and writes it back out. And then triggers ResetSystem.

From what I can tell, Gummiboot is doing this all by the book. Since the firmware indicates support for it. For me this sounds like a firmware bug.

When it comes to the BIOS question, I am not the expert on UEFI, but I would at least expect that when this boot option is selected that I am dropped in the EFI shell.

Should it go one step further and drop is into the configuration and boot manager, I can not tell. However exiting EFI shell always gets you there, so if this option boots us into EFI shell, it should be fine.

This would also be in line with what efibootmgr --bootnext 0000 triggers.
Comment 4 David_Wei 2014-11-19 06:33:41 UTC
Need Marcel to proivde Gummiboot for Shifei to reproduce this issue.
Comment 5 Darren Hart 2014-11-19 06:54:13 UTC
I'll assign this to me and get you an image.
Comment 6 Lu_Shifei 2014-11-19 07:06:47 UTC
Thanks,Darren.
I will try this image.
Comment 7 Lu_Shifei 2014-11-27 09:22:27 UTC
Created attachment 2262 [details]
Gummiboot"Reboot Into Firmware Interface"

Firmware should sets “EFI_OS_INDICATIONS_BOOT_TO_FW_UI “bit  in OsIndicationsSupported  Variable and checks bit “EFI_OS_INDICATIONS_BOOT_TO_FW_UI “ in OSIndication Variable and decides to whether or not boot to Firmware Interface. Finally, BIOS should clear “EFI_OS_INDICATIONS_BOOT_TO_FW_UI “ in OSIndication Variable to acknowledge OS.
Comment 8 David_Wei 2014-11-27 09:33:48 UTC
Hi Darren and Marcel,

Shifei tested his BIOS image with Yocto image from 
http://eywa-builder.ostc.intel.com/eywa/20141118-1/machines/intel-corei7-64/eywa-image-systemdev-xfce-sdk-intel-corei7-64-20141118214621.hddimg  ;

We are not sure if this Yocto image uses Gummiboot as boot loader, but its boot loader does present "Reboot Into Firmware Interface" option.  That's why we use this OS image for test.

Please help check if Shifei's BIOS image does fix this bug.
Comment 9 Stephen K Jolley 2017-06-13 18:04:12 UTC
We are no longer tracking in Yocto Project Bugzilla MinnowBoard and MinnowBoard-MAX HW and firmware bugs.