-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autoboot timeout fix #94
Conversation
…utoboot timeout fix Signed-off-by: Filip Lewiński <[email protected]>
17c5e65
to
eb87d9e
Compare
@@ -1093,6 +1094,15 @@ BootMaintCallback ( | |||
|
|||
Private = BMM_CALLBACK_DATA_FROM_THIS (This); | |||
|
|||
if (Action == EFI_BROWSER_ACTION_DEFAULT_FIRMWARE) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (Action == EFI_BROWSER_ACTION_DEFAULT_FIRMWARE) { | |
if (Action == EFI_BROWSER_ACTION_RESET_TO_DEFAULT) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@miczyg1 It won't compile with EFI_BROWSER_ACTION_RESET_TO_DEFAULT. Does that mean I'm missing something or is EFI_BROWSER_ACTION_REQUEST_RESET, as suggested by the compiler, valid?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually the proper define for that is EFI_BROWSER_ACTION_DEFAULT_STANDARD
and EFI_BROWSER_ACTION_DEFAULT_MANUFACTURING
@@ -1093,6 +1094,15 @@ BootMaintCallback ( | |||
|
|||
Private = BMM_CALLBACK_DATA_FROM_THIS (This); | |||
|
|||
if (Action == EFI_BROWSER_ACTION_DEFAULT_FIRMWARE) { | |||
//gotta find something like Private.BmmDefaultValues.BootTimeOut; | |||
CurrentFakeNVMap->BootTimeOut = defaultValue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have to filter for Auto Boot TImeout QuestionID. For other it has to return EFI_UNSUPPORTED.
The value is being set using the IN EFI_IFR_TYPE_VALUE *Value,
parameter. So you should probably do Value->u16 = PcdGet16 (PcdPlatformBootTimeOut);
If this doesn't work, then CurrentFakeNVMap->BootTimeOut = PcdGet16 (PcdPlatformBootTimeOut);
will probably be the way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@miczyg1 both Value->u16 = PcdGet16 (PcdPlatformBootTimeOut);
and CurrentFakeNVMap->BootTimeOut = PcdGet16 (PcdPlatformBootTimeOut);
still cause the timeout value to be restored to 0
. Could the default value returned by PcdGet16
really be 0
?
CurrentFakeNVMap->BootTimeOut = defaultValue | ||
|
||
// Update the value in the HII database | ||
HiiSetBrowserData (&mBootMaintGuid, mBootMaintStorageName, sizeof (BMM_FAKE_NV_DATA), (UINT8 *) CurrentFakeNVMap, NULL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is called at the end of BootMaintCallback . The value will be saved when the save hotkey is pressed (also handled in separate action most likely).
|
||
// Update the value in the HII database | ||
HiiSetBrowserData (&mBootMaintGuid, mBootMaintStorageName, sizeof (BMM_FAKE_NV_DATA), (UINT8 *) CurrentFakeNVMap, NULL); | ||
return EFI_SUCCESS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to return here as the other IF branches will protect fro executing any other code, i.e. if Action
is EFI_BROWSER_ACTION_RESET_TO_DEFAULT
, it will not have any other value in given call of BootMaintCallback unless you explicitly change it.
95ff59b
to
e9931ed
Compare
Signed-off-by: Filip Lewiński <[email protected]>
65e636c
to
8487a62
Compare
Signed-off-by: Filip Lewiński <[email protected]>
8487a62
to
8fac045
Compare
I have prepared an alternative approach how to add default value support for dynamically generated IFR opcodes: It looks like the last parameter of HiiCreateNumericOpCode can take any Opcode which is appended to the primary opcode generated by HiiCreateNumericOpCode. In this case I have created a Default value opcode with HiiCreateDefaultOpCode |
Merged the #96 so this PR is obsolete. |
No description provided.