Date   

Re: Reconnect item in form browser

Li, Walon
 

Attach demo code again.


Reconnect item in form browser

Li, Walon
 

Attachment removed as per the following specifications:
https://hpe.sharepoint.com/sites/F4/OGC/cybersecurity/Pages/dangerous-attachment-blocking-specification.aspx

======================================================================
Hi edk2 guys,

I have a question about edk2-formbrowser.
According to UEFI 2.8 spec p.1858, system reconnects controller when EFI_IFR_FLAG_RESET_REQUIRED is set. The timing of reconnecting is exiting formset which would happen with moving to different driver page normally.
However, it may happen with form-callback, some driver's callback would update form inside. It sets UI_ACTION_REFRESH_FORMSET and driver will be reconnected as above mention. After reconnecting driver, this is a new driver for BIOS so system can't back to original destination page (Dynamic Form) and then back to its parent page (Device Manager).
This issue is reproducible on edk2-emulater as well but I'm not sure that is valid coding convention or edk2 implementation bug. Could you check my demo code (HiiFormTestDxe_0406.zip) for helping?

Reproducible step.
1. Press F2 to enter Setup.
2. Go to Device Manager => Form Test Formset
3-1. Go to Dynamic Form, can see "Dynamic Item1" => PASS
3-2. Change "Item 1 - RECONNECT" to "Option 2". Press F10 for save. Go to Dynamic Form, system will return to Device Manager => FAIL

Thanks,
Walon


Re: Load Option passing. Either bugs or my confusion.

valerij zaporogeci
 

Now looking closer to the supposed to be Attributes and FilePathListLength fileds of the Load Option descriptor, I noticed that it's just first 3 characters of the string. the string that with the Boot Manager case, you create as an "optional data" and with the UEFI shell, it's image file path string (that's why it started with a colon ":", because "fs0" was omitted because of thinking it's a descriptor and thus first 3 16 bit words got omitted (UINT32 + UINT16)).

So, the LoadOptions pointer of the Loaded Image Protocol doesn't point to Load Options. Is it normal?

And then the question arises, - if this is "normal", then how does the loader obtain its real Load Option? Yeah, the device from which it has been loaded is reported by another field, the file path part to the loader itself as well, but how about FilePathList[1] element, - "an OSV specific" and needed. for pointing to the OS boot volume e.g.?


Re: Load Option passing. Either bugs or my confusion.

valerij zaporogeci
 

anyone, please?

The more I try to figure it out, the more it reveals that it's a bug. After that unsuccess with the LoadOptions in the image's Loaded Image Protocol instance, I went and enumerated BootXXXX variables, dumping their Attributes, FilePathListLength, Description and FilePathList[] itself. And this way, it worked - the load option has all those descriptor fields valid and the FilePathList is there and valid. So now, in comparison, when I take a Load Option through the Loaded Image Protocol LoadOptions field, I get:
1) wrong Attributes
2) invalid FilePathListLength (since FilePath is not present at all)
3) Description field has not the human readable name of the option (say "My OS") as is with when you get the option through GetValue() but what Boot Mahager suggests to enter as "optional data". btw, when these data are omitted during the Load Option creation, then the LoadOptions field in the Loaded Image Protocol is NULL at all, see the first post.
4) FilePathList[] is absent
again, when I get the same option by enumerating all the created BootXXXX variables with the GetValue(), all the fields are valid.

So, please tell me, is the LoadOptions pointer of the Loaded Image Protocol instance of the OSL image supposed to point to the Load Option descriptor in the format described in the Boot Manager section? If yes, then this behavior described is clearly a bug and it's not only important for me to figure this out, but for the edk2 as well.


Load Option passing. Either bugs or my confusion.

valerij zaporogeci
 

Hello. Do I understand correctly, that LoadOptions field of the LOADED_IMAGE_PROTOCOL instance of an OS loader image, points to the Load Option descriptor, the format of which is described in the Boot Manager section of the spec? If yes, then I faced a behavior, that looks like bugs. It's on OVMF x64 (qemu) (and arm64 too, but only from the UEFI shell, since "ramfb" device shows broken view of what Boot Manager draws, that makes it unusable).
1) when I start my OSL from the UEFI shell, the LoadOptions field is not NULL, but the "load option" referenced, has only Description field valid, Attributes field doesn't seem valid, it contains 0x00730066. Most importantly, - FilePathListLength field is set to a nonzero value (48), but, - there is no valid FilePathList[] Device Path array after the Decsription field. Scanning memory there, reveals all zeros. Isn't it a bug?
2) when I create a Load Option in the Boot Manager, pointing to the same OSL and don't add "optional data" during the creation, the LoadOptions field is NULL. Why? How my OSL is supposed to get FilePathList[] then? For distinction between preinstallation run and postinstallation one, the OSL relies on the presence or absence of the Load Option or if there is one, - on the presence or absence FilePathList[1] Device Path, which points to the OS boot volume for postinstallation or is absent otherwise. But I cannot find FilePathList at all.
3) If I create a Load Option as in 2), but with "optional data", LoadOptions is not NULL, those "optional data" turn to be a "Description" field of the Load Option descriptor reported, and still, there is no FilePathList.
In all the above cases, where LoadOptions is not NULL, LoadOptionsSize equals exactly sizeof(Attributes) + sizeof(FilePathListLength) + sizeof(Description) + 2. the latter is NULL CHAR16. there is no FilePathList. Still FilePathListLength field reports some values.

Is it normal or it's bugs? Plus, there is yet one wierdness: DeviceHandle field (of the same LOADED_IMAGE_PROTOCOL instance for the OSL), which is a device handle (hard drive in this case - Type 4, Subtype - 1), doesn't have EFI_DEVICE_PATH_TO_TEXT_PROTOCOL instance on itself. but shouldn't it have it?

The main question is why there is no FilePathList[] part of the Load Option passed to the OSL in any scenario of its launch? It should be there at least for the case of the Load Option, created via the Boot Manager menu, right?


Re: Submit patch to devel@edk2.groups.io.

Keysound Chang
 

Hi Guomin,

Looks like it works. Thanks for your friendly reminder.

Keysound

-----Original Message-----
From: Jiang, Guomin <guomin.jiang@intel.com>
Sent: Thursday, April 9, 2020 3:50 PM
To: discuss@edk2.groups.io; Keysound Chang <Keysound_Chang@phoenix.com>
Subject: RE: [edk2-discuss] Submit patch to devel@edk2.groups.io.

Hi keysound,

I have ever encountered the issue.

The reason is that you are the NuM(New user Moderated). you will need be approved by moderator and then you can see you mail normally.
Please be patient for the process.

Best Regards
guomin
-----Original Message-----
From: discuss@edk2.groups.io <discuss@edk2.groups.io> On Behalf Of
Keysound Chang
Sent: Thursday, April 9, 2020 3:20 PM
To: discuss@edk2.groups.io
Subject: [edk2-discuss] Submit patch to devel@edk2.groups.io.

Hi,

I encountered an issue when trying to send a patch mail to
devel@edk2.groups.io.

The SMTP server returned 250 after I issue sendmail through git, and I
also received cc. But I didn't see my post appeared on edk2-devel. I
also checked
this:

https://github.com/tianocore/tianocore.github.io/wiki/Commit-Message-
Format

Looks like my format is appropriate.

I append my mail here. Your advice/suggestion will be greatly appreciated.

Keysound
==========================================================
=

Subject: [PATCH] NetworkPkg/TlsAuthConfigDxe: Use HiiPopUp() instead
of
CreatePopUp()

From: Keysound Chang <Keysound_Chang@phoenix.com>

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2635

According to EDK2 Driver Writer's Guide For UEFI 2.3.1, 4.2.18 Offer
alternatives to function keys. Configuration of drivers should be
accomplished via HII and via OS-present interfaces.

Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Signed-off-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
---
.../TlsAuthConfigDxe/TlsAuthConfigDxe.inf | 1 +
.../TlsAuthConfigDxeStrings.uni | 2 ++
.../TlsAuthConfigDxe/TlsAuthConfigImpl.c | 20 +++++++++++++------
.../TlsAuthConfigDxe/TlsAuthConfigImpl.h | 1 +
4 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
index 3fc924a1d4..0ada835252 100644
--- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
+++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
@@ -52,6 +52,7 @@
[Protocols] gEfiDevicePathProtocolGuid ## PRODUCES
gEfiHiiConfigAccessProtocolGuid ## PRODUCES+
gEfiHiiPopupProtocolGuid ## CONSUMES [Guids]
gTlsAuthConfigGuid ## PRODUCES ## GUIDdiff --git
a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
index 973b8b7716..2b4a27d24e 100644
--- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
+++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
@@ -28,6 +28,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#string STR_TLS_AUTH_CONFIG_SAVE_AND_EXIT #language en-US
"Commit Changes and Exit" #string
STR_TLS_AUTH_CONFIG_NO_SAVE_AND_EXIT #language en-US
"Discard Changes and Exit" +#string STR_TLS_AUTH_ENROLL_CERT_FAILURE
#language en-US "Enroll Cert Failure!"+ #string
STR_CERT_TYPE_PCKS_GUID #language en-US "GUID for CERT" #string
STR_NULL #language en-US ""diff --git
a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
index 2481d1098f..0ef96dfaf2 100644
--- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
+++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
@@ -1383,7 +1383,6 @@ TlsAuthConfigAccessCallback (
OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest ) {-
EFI_INPUT_KEY Key; EFI_STATUS Status;
RETURN_STATUS RStatus; TLS_AUTH_CONFIG_PRIVATE_DATA
*Private;@@ -1391,6 +1390,8 @@ TlsAuthConfigAccessCallback (
TLS_AUTH_CONFIG_IFR_NVDATA *IfrNvData; UINT16
LabelId; EFI_DEVICE_PATH_PROTOCOL *File;+
EFI_HII_POPUP_PROTOCOL *HiiPopUp;+ EFI_HII_POPUP_SELECTION
PopUpSelect; Status = EFI_SUCCESS; File = NULL;@@ -1402,6
+1403,11 @@ TlsAuthConfigAccessCallback (
Private = TLS_AUTH_CONFIG_PRIVATE_FROM_THIS (This);
mTlsAuthPrivateData = Private;+ Status = gBS->LocateProtocol
(&gEfiHiiPopupProtocolGuid, NULL, &HiiPopUp);+ if (EFI_ERROR
(Status)) {+ DEBUG ((DEBUG_ERROR, "Can't find Form PopUp protocol. Exit (%r)\n",
Status));+ return Status;+ } // // Retrieve uncommitted data from
Browser@@ -1460,11 +1466,13 @@ TlsAuthConfigAccessCallback (
if (EFI_ERROR (Status)) { CleanFileContext (Private); -
CreatePopUp (- EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,-
&Key,- L"ERROR: Enroll Cert Failure!",- NULL+ HiiPopUp-
CreatePopup(+ HiiPopUp,+ EfiHiiPopupStyleError,+
EfiHiiPopupTypeOk,+ Private->RegisteredHandle,+
STRING_TOKEN(STR_TLS_AUTH_ENROLL_CERT_FAILURE),+
&PopUpSelect ); } break;diff --git
a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
index e9af492893..68c16845b3 100644
--- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
+++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
@@ -14,6 +14,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <Protocol/HiiConfigAccess.h> #include
<Protocol/SimpleFileSystem.h>+#include <Protocol/HiiPopup.h> // //
Libraries--
2.23.0.windows.1


Re: Submit patch to devel@edk2.groups.io.

Guomin Jiang
 

Hi keysound,

I have ever encountered the issue.

The reason is that you are the NuM(New user Moderated). you will need be approved by moderator and then you can see you mail normally.
Please be patient for the process.

Best Regards
guomin

-----Original Message-----
From: discuss@edk2.groups.io <discuss@edk2.groups.io> On Behalf Of
Keysound Chang
Sent: Thursday, April 9, 2020 3:20 PM
To: discuss@edk2.groups.io
Subject: [edk2-discuss] Submit patch to devel@edk2.groups.io.

Hi,

I encountered an issue when trying to send a patch mail to
devel@edk2.groups.io.

The SMTP server returned 250 after I issue sendmail through git, and I also
received cc. But I didn't see my post appeared on edk2-devel. I also checked
this:

https://github.com/tianocore/tianocore.github.io/wiki/Commit-Message-
Format

Looks like my format is appropriate.

I append my mail here. Your advice/suggestion will be greatly appreciated.

Keysound
==========================================================
=

Subject: [PATCH] NetworkPkg/TlsAuthConfigDxe: Use HiiPopUp() instead of
CreatePopUp()

From: Keysound Chang <Keysound_Chang@phoenix.com>

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2635

According to EDK2 Driver Writer's Guide For UEFI 2.3.1, 4.2.18 Offer
alternatives to function keys. Configuration of drivers should be
accomplished via HII and via OS-present interfaces.

Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Signed-off-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
---
.../TlsAuthConfigDxe/TlsAuthConfigDxe.inf | 1 +
.../TlsAuthConfigDxeStrings.uni | 2 ++
.../TlsAuthConfigDxe/TlsAuthConfigImpl.c | 20 +++++++++++++------
.../TlsAuthConfigDxe/TlsAuthConfigImpl.h | 1 +
4 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
index 3fc924a1d4..0ada835252 100644
--- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
+++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
@@ -52,6 +52,7 @@
[Protocols] gEfiDevicePathProtocolGuid ## PRODUCES
gEfiHiiConfigAccessProtocolGuid ## PRODUCES+
gEfiHiiPopupProtocolGuid ## CONSUMES [Guids]
gTlsAuthConfigGuid ## PRODUCES ## GUIDdiff --git
a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
index 973b8b7716..2b4a27d24e 100644
--- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
+++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
@@ -28,6 +28,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#string STR_TLS_AUTH_CONFIG_SAVE_AND_EXIT #language en-US
"Commit Changes and Exit" #string
STR_TLS_AUTH_CONFIG_NO_SAVE_AND_EXIT #language en-US
"Discard Changes and Exit" +#string STR_TLS_AUTH_ENROLL_CERT_FAILURE
#language en-US "Enroll Cert Failure!"+ #string STR_CERT_TYPE_PCKS_GUID
#language en-US "GUID for CERT" #string STR_NULL
#language en-US ""diff --git
a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
index 2481d1098f..0ef96dfaf2 100644
--- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
+++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
@@ -1383,7 +1383,6 @@ TlsAuthConfigAccessCallback (
OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest ) {-
EFI_INPUT_KEY Key; EFI_STATUS Status;
RETURN_STATUS RStatus; TLS_AUTH_CONFIG_PRIVATE_DATA
*Private;@@ -1391,6 +1390,8 @@ TlsAuthConfigAccessCallback (
TLS_AUTH_CONFIG_IFR_NVDATA *IfrNvData; UINT16
LabelId; EFI_DEVICE_PATH_PROTOCOL *File;+
EFI_HII_POPUP_PROTOCOL *HiiPopUp;+ EFI_HII_POPUP_SELECTION
PopUpSelect; Status = EFI_SUCCESS; File = NULL;@@ -1402,6
+1403,11 @@ TlsAuthConfigAccessCallback (
Private = TLS_AUTH_CONFIG_PRIVATE_FROM_THIS (This);
mTlsAuthPrivateData = Private;+ Status = gBS->LocateProtocol
(&gEfiHiiPopupProtocolGuid, NULL, &HiiPopUp);+ if (EFI_ERROR (Status)) {+
DEBUG ((DEBUG_ERROR, "Can't find Form PopUp protocol. Exit (%r)\n",
Status));+ return Status;+ } // // Retrieve uncommitted data from
Browser@@ -1460,11 +1466,13 @@ TlsAuthConfigAccessCallback (
if (EFI_ERROR (Status)) { CleanFileContext (Private); -
CreatePopUp (- EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,-
&Key,- L"ERROR: Enroll Cert Failure!",- NULL+ HiiPopUp-
CreatePopup(+ HiiPopUp,+ EfiHiiPopupStyleError,+
EfiHiiPopupTypeOk,+ Private->RegisteredHandle,+
STRING_TOKEN(STR_TLS_AUTH_ENROLL_CERT_FAILURE),+
&PopUpSelect ); } break;diff --git
a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
index e9af492893..68c16845b3 100644
--- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
+++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
@@ -14,6 +14,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <Protocol/HiiConfigAccess.h> #include
<Protocol/SimpleFileSystem.h>+#include <Protocol/HiiPopup.h> // //
Libraries--
2.23.0.windows.1


Submit patch to devel@edk2.groups.io.

Keysound Chang
 

Hi,

I encountered an issue when trying to send a patch mail to devel@edk2.groups.io.

The SMTP server returned 250 after I issue sendmail through git, and I also received cc. But I didn't see my post appeared on edk2-devel. I also checked this:

https://github.com/tianocore/tianocore.github.io/wiki/Commit-Message-Format

Looks like my format is appropriate.

I append my mail here. Your advice/suggestion will be greatly appreciated.

Keysound
===========================================================

Subject: [PATCH] NetworkPkg/TlsAuthConfigDxe: Use HiiPopUp() instead of CreatePopUp()

From: Keysound Chang <Keysound_Chang@phoenix.com>

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2635

According to EDK2 Driver Writer's Guide For UEFI 2.3.1, 4.2.18 Offer alternatives to function keys. Configuration of drivers should be accomplished via HII and via OS-present interfaces.

Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Signed-off-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
---
.../TlsAuthConfigDxe/TlsAuthConfigDxe.inf | 1 +
.../TlsAuthConfigDxeStrings.uni | 2 ++
.../TlsAuthConfigDxe/TlsAuthConfigImpl.c | 20 +++++++++++++------
.../TlsAuthConfigDxe/TlsAuthConfigImpl.h | 1 +
4 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
index 3fc924a1d4..0ada835252 100644
--- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
+++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
@@ -52,6 +52,7 @@
[Protocols] gEfiDevicePathProtocolGuid ## PRODUCES gEfiHiiConfigAccessProtocolGuid ## PRODUCES+ gEfiHiiPopupProtocolGuid ## CONSUMES [Guids] gTlsAuthConfigGuid ## PRODUCES ## GUIDdiff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
index 973b8b7716..2b4a27d24e 100644
--- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
+++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
@@ -28,6 +28,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#string STR_TLS_AUTH_CONFIG_SAVE_AND_EXIT #language en-US "Commit Changes and Exit" #string STR_TLS_AUTH_CONFIG_NO_SAVE_AND_EXIT #language en-US "Discard Changes and Exit" +#string STR_TLS_AUTH_ENROLL_CERT_FAILURE #language en-US "Enroll Cert Failure!"+ #string STR_CERT_TYPE_PCKS_GUID #language en-US "GUID for CERT" #string STR_NULL #language en-US ""diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
index 2481d1098f..0ef96dfaf2 100644
--- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
+++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
@@ -1383,7 +1383,6 @@ TlsAuthConfigAccessCallback (
OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest ) {- EFI_INPUT_KEY Key; EFI_STATUS Status; RETURN_STATUS RStatus; TLS_AUTH_CONFIG_PRIVATE_DATA *Private;@@ -1391,6 +1390,8 @@ TlsAuthConfigAccessCallback (
TLS_AUTH_CONFIG_IFR_NVDATA *IfrNvData; UINT16 LabelId; EFI_DEVICE_PATH_PROTOCOL *File;+ EFI_HII_POPUP_PROTOCOL *HiiPopUp;+ EFI_HII_POPUP_SELECTION PopUpSelect; Status = EFI_SUCCESS; File = NULL;@@ -1402,6 +1403,11 @@ TlsAuthConfigAccessCallback (
Private = TLS_AUTH_CONFIG_PRIVATE_FROM_THIS (This); mTlsAuthPrivateData = Private;+ Status = gBS->LocateProtocol (&gEfiHiiPopupProtocolGuid, NULL, &HiiPopUp);+ if (EFI_ERROR (Status)) {+ DEBUG ((DEBUG_ERROR, "Can't find Form PopUp protocol. Exit (%r)\n", Status));+ return Status;+ } // // Retrieve uncommitted data from Browser@@ -1460,11 +1466,13 @@ TlsAuthConfigAccessCallback (
if (EFI_ERROR (Status)) { CleanFileContext (Private); - CreatePopUp (- EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,- &Key,- L"ERROR: Enroll Cert Failure!",- NULL+ HiiPopUp->CreatePopup(+ HiiPopUp,+ EfiHiiPopupStyleError,+ EfiHiiPopupTypeOk,+ Private->RegisteredHandle,+ STRING_TOKEN(STR_TLS_AUTH_ENROLL_CERT_FAILURE),+ &PopUpSelect ); } break;diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
index e9af492893..68c16845b3 100644
--- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
+++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
@@ -14,6 +14,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <Protocol/HiiConfigAccess.h> #include <Protocol/SimpleFileSystem.h>+#include <Protocol/HiiPopup.h> // // Libraries--
2.23.0.windows.1


Re: [edk2-devel] Debug UEFI Event

Andrew Fish <afish@...>
 

Stanley,

There is not much to debug with EFI events and that is why there are not a lot of DEBUG_EVENT DEBUG prints. The only thing that can block your event is for the current TPL level being >= to the TPL level of your event, but that also blocks all forward progress in EFI. 

Usually the problem is one of these:
1) The event was no created properly and thus never gets signaled. 
2) The more generic issue is people code EFI events like threads, and that is not how it works. EFI has a cooperative event model and there is only one thread and that is the main thread. Events are dispatched when gBS->RestoreTPL() [1] is called. Higher priority (TPL) events dispatch 1st. So the only way your event can get blocked is for another chunk of code to gBS->RaiseTPL() to the level of your event or higher. If you put a while (TRUE) loop in an event it will deadlock the system. 

So hopefully it is 1) and you are not error checking the return codes when you create and hook in the event, or you are missing the call to hook in your event to get called. If it is a more subtle problem it is usually related to 2). 

On Apr 3, 2020, at 5:48 PM, Stanley Gan <stanley.ganyezu@...> wrote:

I have an event callback function not called. So, I want to track event execution in UEFI. There is a "DEBUG_EVENT" debug level in EDKII. But no module in EDKII actually use this debug level.
I add some debug print in "CoreCreateEventInternal" and "CoredispatchEventNotifies",it cause TPL ASSERT. Can anybody give me some constructive debug suggestion?


回复: [edk2-discuss] debug UEFI Event

Liu Yu
 

Firstly, you should check the status return form CreateEvent function and what’s the parameters you filled in.

发送自 Windows 10 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>应用

发件人: stanley.ganyezu@gmail.com<mailto:stanley.ganyezu@gmail.com>
发送时间: 2020年4月4日 8:31
收件人: discuss@edk2.groups.io<mailto:discuss@edk2.groups.io>
主题: [edk2-discuss] debug UEFI Event

Hello All,
I have an event callback function not called. So, I want to track event execution in UEFI. There is a "DEBUG_EVENT" debug level in EDKII. But no module in EDKII actually use this debug level.
I add some debug print in "CoreCreateEventInternal" and "CoredispatchEventNotifies",it cause TPL ASSERT. Can anybody give me some constructive debug suggestion?


Debug UEFI Event

Stanley Gan
 

I have an event callback function not called. So, I want to track event
execution in UEFI. There is a "DEBUG_EVENT" debug level in EDKII. But no
module in EDKII actually use this debug level.
I add some debug print in "CoreCreateEventInternal" and
"CoredispatchEventNotifies",it cause TPL ASSERT. Can anybody give me some
constructive debug suggestion?


debug UEFI Event

Stanley Gan
 

Hello All,
I have an event callback function not called. So, I want to track event execution in UEFI. There is a "DEBUG_EVENT" debug level in EDKII. But no module in EDKII actually use this debug level.
I add some debug print in "CoreCreateEventInternal" and "CoredispatchEventNotifies",it cause TPL ASSERT. Can anybody give me some constructive debug suggestion?


Re: Query: Add GCD IO Space Map

Ni, Ray
 

I am not sure the open source community is aligned on what mails go to "discuss" mailing list. CC to "devel" mailing list.

Please read the PI spec on how the IO space is converted from different states.

The initial non-exist IO space is created based on the IO address width in the CPU INFO HOB.
You cannot add a non-exist IO space using GCD services.

Thanks,
Ray

From: Wasim Khan <wasim.khan@nxp.com>
Sent: Friday, April 3, 2020 12:25 PM
To: discuss@edk2.groups.io; Ni, Ray <ray.ni@intel.com>; Bi, Dandan <dandan.bi@intel.com>; Gao, Liming <liming.gao@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; leif.lindholm@linaro.org
Subject: Re: Query: Add GCD IO Space Map

Hi ,

Any clue on this ?

Get Outlook for Android<https://aka.ms/ghei36>
________________________________
From: discuss@edk2.groups.io<mailto:discuss@edk2.groups.io> <discuss@edk2.groups.io<mailto:discuss@edk2.groups.io>> on behalf of Wasim Khan via groups.io <wasim.khan=nxp.com@groups.io<mailto:wasim.khan=nxp.com@groups.io>>
Sent: Friday, April 3, 2020 1:18:13 AM
To: discuss@edk2.groups.io<mailto:discuss@edk2.groups.io> <discuss@edk2.groups.io<mailto:discuss@edk2.groups.io>>; ruiyu.ni@intel.com<mailto:ruiyu.ni@intel.com> <ruiyu.ni@intel.com<mailto:ruiyu.ni@intel.com>>; dandan.bi@intel.com<mailto:dandan.bi@intel.com> <dandan.bi@intel.com<mailto:dandan.bi@intel.com>>; liming.gao@intel.com<mailto:liming.gao@intel.com> <liming.gao@intel.com<mailto:liming.gao@intel.com>>; hao.a.wu@intel.com<mailto:hao.a.wu@intel.com> <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>
Subject: [edk2-discuss] Query: Add GCD IO Space Map

Hi All,

The Initial GCD I/O Space Map printed from DxeMain is :

GCD:Initial GCD I/O Space Map
GCDIoType Range
========== =================================
NonExist 0000000000000000-00000000000FFFFF


I require some IO memory (for PciHostBridgeDxe) , i need NonExist IO chuck from 0x90_00010000 - 0x90_0001ffff , for which I tried BuildResourceDescriptorHob() from PEI Phase

BuildResourceDescriptorHob (
EFI_RESOURCE_IO,
ResourceAttributes,
0x9000010000,
0x10000
);

And gDS->AddIoSpace (EfiGcdIoTypeIo, 0x9000010000, 0x10000) from a DXE driver . But in both case GCD AddIoSpace fails with Status as Unsupported.

GCD:AddIoSpace(Base=0000009000010000,Length=0000000000010000)
GcdIoType = I/O
Status = Unsupported
GCDIoType Range
========== =================================
NonExist 0000000000000000-00000000000FFFFF



Can someone help that how can I add a NonExist GCDIoType memory ?




Also, why does the initial GCD I/O space map shows small range as compared with GCD Memory Space Map?

GCD:Initial GCD Memory Space Map
GCDMemType Range Capabilities Attributes
========== ================================= ================ ================
NonExist 0000000000000000-00000FFFFFFFFFFF 0000000000000000 0000000000000000

GCD:Initial GCD I/O Space Map
GCDIoType Range
========== =================================
NonExist 0000000000000000-00000000000FFFFF


Regards,
Wasim


Re: Query: Add GCD IO Space Map

Wasim Khan
 

Hi ,

Any clue on this ?

Get Outlook for Android<https://aka.ms/ghei36>
________________________________
From: discuss@edk2.groups.io <discuss@edk2.groups.io> on behalf of Wasim Khan via groups.io <wasim.khan=nxp.com@groups.io>
Sent: Friday, April 3, 2020 1:18:13 AM
To: discuss@edk2.groups.io <discuss@edk2.groups.io>; ruiyu.ni@intel.com <ruiyu.ni@intel.com>; dandan.bi@intel.com <dandan.bi@intel.com>; liming.gao@intel.com <liming.gao@intel.com>; hao.a.wu@intel.com <hao.a.wu@intel.com>
Subject: [edk2-discuss] Query: Add GCD IO Space Map

Hi All,

The Initial GCD I/O Space Map printed from DxeMain is :

GCD:Initial GCD I/O Space Map
GCDIoType Range
========== =================================
NonExist 0000000000000000-00000000000FFFFF


I require some IO memory (for PciHostBridgeDxe) , i need NonExist IO chuck from 0x90_00010000 - 0x90_0001ffff , for which I tried BuildResourceDescriptorHob() from PEI Phase

BuildResourceDescriptorHob (
EFI_RESOURCE_IO,
ResourceAttributes,
0x9000010000,
0x10000
);

And gDS->AddIoSpace (EfiGcdIoTypeIo, 0x9000010000, 0x10000) from a DXE driver . But in both case GCD AddIoSpace fails with Status as Unsupported.

GCD:AddIoSpace(Base=0000009000010000,Length=0000000000010000)
GcdIoType = I/O
Status = Unsupported
GCDIoType Range
========== =================================
NonExist 0000000000000000-00000000000FFFFF



Can someone help that how can I add a NonExist GCDIoType memory ?




Also, why does the initial GCD I/O space map shows small range as compared with GCD Memory Space Map?

GCD:Initial GCD Memory Space Map
GCDMemType Range Capabilities Attributes
========== ================================= ================ ================
NonExist 0000000000000000-00000FFFFFFFFFFF 0000000000000000 0000000000000000

GCD:Initial GCD I/O Space Map
GCDIoType Range
========== =================================
NonExist 0000000000000000-00000000000FFFFF


Regards,
Wasim


Query: Add GCD IO Space Map

Wasim Khan
 

Hi All,

The Initial GCD I/O Space Map printed from DxeMain is :

GCD:Initial GCD I/O Space Map
GCDIoType Range
========== =================================
NonExist 0000000000000000-00000000000FFFFF


I require some IO memory (for PciHostBridgeDxe) , i need NonExist IO chuck from 0x90_00010000 - 0x90_0001ffff , for which I tried BuildResourceDescriptorHob() from PEI Phase

BuildResourceDescriptorHob (
EFI_RESOURCE_IO,
ResourceAttributes,
0x9000010000,
0x10000
);

And gDS->AddIoSpace (EfiGcdIoTypeIo, 0x9000010000, 0x10000) from a DXE driver . But in both case GCD AddIoSpace fails with Status as Unsupported.

GCD:AddIoSpace(Base=0000009000010000,Length=0000000000010000)
GcdIoType = I/O
Status = Unsupported
GCDIoType Range
========== =================================
NonExist 0000000000000000-00000000000FFFFF



Can someone help that how can I add a NonExist GCDIoType memory ?




Also, why does the initial GCD I/O space map shows small range as compared with GCD Memory Space Map?

GCD:Initial GCD Memory Space Map
GCDMemType Range Capabilities Attributes
========== ================================= ================ ================
NonExist 0000000000000000-00000FFFFFFFFFFF 0000000000000000 0000000000000000

GCD:Initial GCD I/O Space Map
GCDIoType Range
========== =================================
NonExist 0000000000000000-00000000000FFFFF


Regards,
Wasim


EmulatorPkg: Authenticated UEFI Variables not working

Eugene Khoruzhenko
 

For some reason after Variable initialization, mVariableModuleGlobal->VariableGlobal.AuthFormat = FALSE and VariableServiceQueryVariableInfo() returns EFI_UNSUPPORTED for authenticated variables. Nt32Pkg used to work well with Authenticated variables - are there special settings to configure EmulatorPkg properly?


Re: Trouble building EmulatorPkg

Sean
 

Eugene,

I actually haven't played with EmulatorPkg until 3 days ago when trying to stand up Platform Ci. I too used the old NT32 environment from time to time but am not well versed in the features of the EmulatorPkg. I found the readme lacking and was able to understand more from looking at the build.sh, buildVs.bat scripts, and DSC/FDF file.
Hopefully someone on the mailing list can help.

Thanks


Re: SMBIOS: are there any fields which hold be negative values?

Laszlo Ersek
 

On 04/01/20 20:50, Rebecca Cran wrote:
Before I send a patch, I wanted to check if anyone knew whether there
are any fields in the SMBIOS specification which can be negative? I
haven't across any, and the current code for smbiosview prints struct
fields with "%d", which can cause large values (such as DIMM sizes) to
be printed incorrectly.
I agree only %u / %x, and %lu / %lx should be used, for printing DWORD
and QWORD fields from SMBIOS tables (respectively). WORD and BYTE are
fine to print with %d, if the output should be decimal.

Thanks
Laszlo


Re: Trouble building EmulatorPkg

Eugene Khoruzhenko
 

Hi Sean, does EmulatorPkg support Authenticated UEFI variables? For some reason after initialization mVariableModuleGlobal->VariableGlobal.AuthFormat = FALSE and VariableServiceQueryVariableInfo() returns EFI_UNSUPPORTED. Nt32Pkg used to work well with Authenticated variables, maybe I do not configure EmulatorPkg properly? Thanks!


Re: Trouble building EmulatorPkg

Eugene Khoruzhenko
 

To build under VS2013 I had to add these two lines in \EmulatorPkg\Win\Host\WinHost.inf, for IA32 and X64 respectfully:

MSFT:*_VS2013_IA32_DLINK_FLAGS = /LIBPATH:"%VS2013_PREFIX%Lib" /LIBPATH:"%VS2013_PREFIX%VC\Lib" /LIBPATH:"%UniversalCRTSdkDir%lib\%UCRTVersion%\ucrt\x86" /LIBPATH:"%WindowsSdkDir%lib\%WindowsSDKLibVersion%\um\x86" /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /MAP /OPT:REF /DEBUG /MACHINE:I386 /LTCG Kernel32.lib MSVCRTD.lib Gdi32.lib User32.lib Winmm.lib Advapi32.lib

MSFT:*_VS2013_X64_DLINK_FLAGS = /LIBPATH:"%VS2013_PREFIX%VC\Lib\AMD64" /LIBPATH:"%UniversalCRTSdkDir%lib\%UCRTVersion%\ucrt\x64" /LIBPATH:"%WindowsSdkDir%lib\%WindowsSDKLibVersion%\um\x64" /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /MAP /OPT:REF /DEBUG /MACHINE:AMD64 /LTCG Kernel32.lib MSVCRTD.lib Gdi32.lib User32.lib Winmm.lib Advapi32.lib

With VS2013 and probably below, it turned out to be very important that an X64 build must start from either "VS2013 x64 Native Tools Command Prompt" or "VS2013 x64 Cross Tools Command Prompt"; an IA32 build would have to start in either "VS2013 x86 Native Tools Command Prompt" or "Developer Command Prompt for VS2013". My build was by default choosing "Developer Command Prompt" and I got build errors.

641 - 660 of 834