Wouldn't having a variable that we create and delete on every boot put 
unnecessary stress on the SPI-NOR that the variable store lives on?
What about the alternative approach where we allow the platform code to modify 
the attributes of the auto created variable to disable it with hidden/!active 
but still match for detection purposes so that it doesn't delete and recreate 
the modified variable each boot? That way all the logic on what to disable can 
still be in the platform code and all the existing logic in the boot manager 
can stay basically the same?

What changes every boot that forces the variable to need to get modified?

I would assume the NOR driver is smart enough to not update a variable that is 
not changing.

The custom BDS could could only create the variable for this device if it does 
not exist.

[JB] The current flow with no changes in the boot manager would be as follows


  1.  Scan for instance of the boot option in the variables
  2.  It will not be found, so create a new boot option store it to a variable 
and update BootOrder
  3.  Platform code runs creates the options for the boot option it wants and 
writes those to variable store
  4.  Delete/disable the boot option in the variable store

When you reboot it won't find the variable so 1/2/4 will re-occur

The code that does this (1/2) is EfiBootManagerRefreshAllBootOption in BmBoot.c

If you modify the variable to disable it with hidden/not active it would delete 
that and create a new one as well as the code wouldn't recognize that is the 
same boot option.

If however we modify EfiBootManagerFindLoadOption to not compare the attributes 
(at least allow for differences in active and hidden) then the when it 
refreshes every thing it would see the match and not delete/create a new 
variable in the store and thus we wouldn't have changes every boot.


Thanks,

Andrew Fish

Thanks,

Jeff



-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may 
contain
confidential information.  Any unauthorized review, use, disclosure or 
distribution
is prohibited.  If you are not the intended recipient, please contact the 
sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#50029): https://edk2.groups.io/g/devel/message/50029
Mute This Topic: https://groups.io/mt/39747302/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to