Date   

Re: Different methods for declaring UNI files

Andrew Fish
 

On Oct 10, 2021, at 5:12 AM, Konstantin Aladyshev <aladyshev22@gmail.com> wrote:

Hello!

I was investigating EDKII database and have found 3 ways of declaring UNI files:

1) Sources section within the INF file:
```
[Sources]
InventoryStrings.uni
VfrStrings.uni
...
```

Example:
https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf


2) MODULE_UNI_FILE/[UserExtensions.TianoCore."ExtraFiles"] within the INF file:
```
[Defines]
...
MODULE_UNI_FILE = ResetSystemPei.uni

...

[UserExtensions.TianoCore."ExtraFiles"]
ResetSystemPeiExtra.uni
```
Example: https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Universal/ResetSystemPei/ResetSystemPei.inf

3) PACKAGE_UNI_FILE/[UserExtensions.TianoCore."ExtraFiles"] within the DEC file:
```
[Defines]
PACKAGE_UNI_FILE = MdeModulePkg.uni

...

[UserExtensions.TianoCore."ExtraFiles"]
MdeModulePkgExtra.uni
```
Example: https://github.com/tianocore/edk2/blob/master/MdeModulePkg/MdeModulePkg.dec

_______________________

Could someone provide me some info about all these different methods?

As I understand, all the translation strings for HII should be defined
within method 1. Am I correct?
What is the purpose of methods 2 and 3 then?
Konstantin,

Your 2) and 3) are associated with the UEFI Packaging Specification [1]. You can read up on what things in the INF file mean here [2]. I think 2.16.1 will answer your questions.

TL;DR these files are not processed by the build system and used for other things.

[1] https://uefi.org/sites/default/files/resources/Dist_Package_Spec_1_1.pdf

[2] https://tianocore-docs.github.io/edk2-InfSpecification/release-1.27/2_inf_overview/216_[userextensions]_section.html#216-userextensions-section

Thanks,

Andrew Fish

I see that these methods define strings like:
STR_MODULE_ABSTRACT
STR_MODULE_DESCRIPTION
STR_PROPERTIES_MODULE_NAME

STR_PACKAGE_ABSTRACT
STR_PACKAGE_DESCRIPTION
STR_PROPERTIES_PACKAGE_NAME

When are these strings printed? What is the point of putting
STR_MODULE_ABSTRACT/STR_MODULE_DESCRIPTION in one file and
STR_PROPERTIES_MODULE_NAME in the other "extra" file? Seems redundant.

Also I've found more strange strings in the
https://github.com/tianocore/edk2/blob/master/MdeModulePkg/MdeModulePkg.uni

STR_gEfiMdeModulePkgTokenSpaceGuid_PcdLoadModuleAtFixAddressEnable_PROMPT
STR_gEfiMdeModulePkgTokenSpaceGuid_PcdLoadModuleAtFixAddressEnable_HELP
STR_gEfiMdeModulePkgTokenSpaceGuid_ERR_80000001

How are they used?

Best regards,
Konstantin Aladyshev





Different methods for declaring UNI files

Konstantin Aladyshev
 

Hello!

I was investigating EDKII database and have found 3 ways of declaring UNI files:

1) Sources section within the INF file:
```
[Sources]
InventoryStrings.uni
VfrStrings.uni
...
```

Example:
https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf


2) MODULE_UNI_FILE/[UserExtensions.TianoCore."ExtraFiles"] within the INF file:
```
[Defines]
...
MODULE_UNI_FILE = ResetSystemPei.uni

...

[UserExtensions.TianoCore."ExtraFiles"]
ResetSystemPeiExtra.uni
```
Example: https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Universal/ResetSystemPei/ResetSystemPei.inf

3) PACKAGE_UNI_FILE/[UserExtensions.TianoCore."ExtraFiles"] within the DEC file:
```
[Defines]
PACKAGE_UNI_FILE = MdeModulePkg.uni

...

[UserExtensions.TianoCore."ExtraFiles"]
MdeModulePkgExtra.uni
```
Example: https://github.com/tianocore/edk2/blob/master/MdeModulePkg/MdeModulePkg.dec

_______________________

Could someone provide me some info about all these different methods?

As I understand, all the translation strings for HII should be defined
within method 1. Am I correct?
What is the purpose of methods 2 and 3 then?
I see that these methods define strings like:
STR_MODULE_ABSTRACT
STR_MODULE_DESCRIPTION
STR_PROPERTIES_MODULE_NAME

STR_PACKAGE_ABSTRACT
STR_PACKAGE_DESCRIPTION
STR_PROPERTIES_PACKAGE_NAME

When are these strings printed? What is the point of putting
STR_MODULE_ABSTRACT/STR_MODULE_DESCRIPTION in one file and
STR_PROPERTIES_MODULE_NAME in the other "extra" file? Seems redundant.

Also I've found more strange strings in the
https://github.com/tianocore/edk2/blob/master/MdeModulePkg/MdeModulePkg.uni

STR_gEfiMdeModulePkgTokenSpaceGuid_PcdLoadModuleAtFixAddressEnable_PROMPT
STR_gEfiMdeModulePkgTokenSpaceGuid_PcdLoadModuleAtFixAddressEnable_HELP
STR_gEfiMdeModulePkgTokenSpaceGuid_ERR_80000001

How are they used?

Best regards,
Konstantin Aladyshev


Guid.xref file

Konstantin Aladyshev
 

Hello!

Sometimes it's useful to transform GUID values to their names from the
codebase. For example when you investigate the boot log.
Usually I just use key/value pairs from the generated build file
`Build/OvmfX64/DEBUG_GCC5/FV/Guid.xref, and perform necessary
substitutions in the log file through the simple custom python script.
This Guid.xref file has associations like this:
```
6302D008-7F9B-4F30-87AC-60C9FEF5DA4E gEfiShellProtocolGuid
```
So it is easy to construct a dictionary with GUID/Name pairs with it.
But the problem is that this file doesn't contain all the GUID/Name pairs.
For example gShellNetwork1HiiGuid/gShellLevel2HiiGuid/gEfiComponentNameProtocolGuid
are not present in this file.
Which GUIDs go to the `Build/OvmfX64/RELEASE_GCC5/FV/Guid.xref` file
and which don't?

Best regards,
Konstantin Aladyshev


Re: Coreboot+UEFI to boot Linux -memory issue

Ghorai, Sukumar
 

Hi,
I am able to boot Linux using (coreboot+ TianoCore).
however Kernel always see the total available memory as 2GB only.

I feel coreboot pass the memory information to UEFI payload, which forwarded to Kernel init.

1. is that any acpi table missing in coreboot?
2. and how memory information passed from coreboot to UEFI payload.

pls let me know what are the steps to debug this issue!!

Thx & rgds,
Sukumar


Some codes in EDKII do not obey the EDK II C Coding Standards Specification

than1@...
 

Hello there,

I am new to EDKII and reading some standards published by the EDKII project. There is a item that says,

5.6.1.2 The use of int, unsigned, char, void, static, long is a violation of the coding convention,

But I found some place in current newest master branch that use static keywords to define EFI functions like

CryptoPkg\Library\BaseCryptLibOnProtocolPpi\CryptLib.c, line 88
CryptoPkg\Driver\Crypto.c, line 79,97

Also, some codes in BaseTools and git submodules use the static keyword, which I think they are out of question,
since they are not EDKII packages.

Do anyone share the similar opinion with me, or do someone know whether the maintainer has the plan to fix these code?

Thanks,
Toyoharu


Re: Make HII browser engine render faster and change font Size in HII

Kiet Pham
 

Dear Liming

What a pitty that edk2 cannot change font size natively. Thanks for your
response, anyway

Kiet

-----Original Message-----
From: gaoliming [mailto:gaoliming@byosoft.com.cn]
Sent: Wednesday, September 29, 2021 9:36 AM
To: discuss@edk2.groups.io; kiet.pham@xelex.vn
Cc: 'shenjiabin' <shenjiabin@byosoft.com.cn>
Subject: 回复: [edk2-discuss] Make HII browser engine render faster and
change font Size in HII

Kiet:
Each font is specified as EFI_NARROW_GLYPH that has a preferred dimension
(w x h) of 8 x 19 pixels.

So, font size is not changed.

Thanks
Liming
-----邮件原件-----
发件人: discuss@edk2.groups.io <discuss@edk2.groups.io> 代表 Kiet Pham
发送时间: 2021年9月24日 18:19
收件人: discuss@edk2.groups.io
主题: [edk2-discuss] Make HII browser engine render faster and change
font Size in HII

Hello All,



I'm currently develop BIOS Setup Utilities. The monitor resolution is
too big 1920 x 1080 so when I try to set BIOS setup full screen, it
took short but noticeable render time to render the BIOS Setup. Also,
I cannot find
any
way to modify font size, most are just changing character "container"
size without changing character size.



So I'd like to ask how to make HII Browser Engine render faster and
technique to adjust font size.



Thanks in advance,

Kiet







回复: [edk2-discuss] Make HII browser engine render faster and change font Size in HII

gaoliming
 

Kiet:
Each font is specified as EFI_NARROW_GLYPH that has a preferred dimension
(w x h) of 8 x 19 pixels.

So, font size is not changed.

Thanks
Liming
-----邮件原件-----
发件人: discuss@edk2.groups.io <discuss@edk2.groups.io> 代表 Kiet Pham
发送时间: 2021年9月24日 18:19
收件人: discuss@edk2.groups.io
主题: [edk2-discuss] Make HII browser engine render faster and change font
Size in HII

Hello All,



I'm currently develop BIOS Setup Utilities. The monitor resolution is too
big 1920 x 1080 so when I try to set BIOS setup full screen, it took short
but noticeable render time to render the BIOS Setup. Also, I cannot find
any
way to modify font size, most are just changing character "container" size
without changing character size.



So I'd like to ask how to make HII Browser Engine render faster and
technique to adjust font size.



Thanks in advance,

Kiet







Re: a question about X509 flag

Marvin Häuser
 

Hey Wenyi,

Sorry, I cannot help with the time one, but "partial chain" is how virtually any other crypto-solution works out-of-the-box. Basically there is a disagreement about what defines a root certificate, and while some think it is the OpenSSL default of requiring a self-signed certificate for root, many people including myself strongly disagree and do not believe it follows from the RFCs. I'm not aware of any bad security implications of either model. So, this merely allows any certificate in the chain (the top one may be self-signed *if* it even is a certificate, it may just as well be a trusted public key for all we know) to be eligible to be added to the trust store and root a trust chain.

Further reading: https://github.com/openssl/openssl/issues/7871

Cc CryptoPkg maintainers and edk2-devel for further feedback

Best regards,
Marvin

On 27/09/2021 10:53, wenyi,xie via groups.io wrote:
Hello,

I have a question about flag set in X509_STORE. Does anyone know why need to set flags X509_V_FLAG_PARTIAL_CHAIN and X509_V_FLAG_NO_CHECK_TIME to X509Store in TlsNew() (CryptoPkg\Library\TlsLib\TlsInit.c)

Thanks
Wenyi




Make HII browser engine render faster and change font Size in HII

Kiet Pham
 

Hello All,



I'm currently develop BIOS Setup Utilities. The monitor resolution is too
big 1920 x 1080 so when I try to set BIOS setup full screen, it took short
but noticeable render time to render the BIOS Setup. Also, I cannot find any
way to modify font size, most are just changing character "container" size
without changing character size.



So I'd like to ask how to make HII Browser Engine render faster and
technique to adjust font size.



Thanks in advance,

Kiet


Is the QemuVideoDXE GOP gone after S3

Joel
 

I was wondering if anyone knew if the Graphical Output Protocol that creates the framebuffer for the guests is no longer instantiated after OVMF comes back from S3 resume. If I uninstall my guest PV driver for display, I no longer get screen updates after the guest has gone to sleep. It will fall back to the GOP framebuffer correctly before S3. Is there a large amount of work that needs to be done to get this type of thing working? I'm unsure if we just need to add the tables to the LockBox for the GOP during EndOfDxe events or something. Any help would be great.

-Joel


Writing to QemuVideoDxe Framebuffer after sleep

Joel
 

I have been working with the Xen platform, and while I have gotten sleep working, I have run into a bug that I need help understanding. We use our own PV drivers for display, and if we disable the driver or uninstall before the guest has gone to sleep, the video will switch over to the GOP QemuVideo (using the Bochs protocol) without issue. However if a sleep has been done and an uninstall performed, I am seeing the last image before the framebuffer switched to the PV buffer (so Windows boot screen), and the framebuffer isn't updated beyond that. From what it appears, it would seem that after the guest has gone to sleep, the framebuffer setup by QemuVideo is destroyed and not set back up on return. From what I have read the GOP gets setup and is just never torn down after the end of DXE. Does anyone have any idea what it would take to get the GOP running after sleep, or does anyone know that it is most definitely running and therefore my problem exists elsewhere?

This is my first post to the group, so any help would be fantastic!

-Joel


EDK2 Shell does not work on headless machine

tom.ty89@...
 

Hi,

I'm trying to use the EDK2 shell on my old machine to side-load an NVMe DXE driver (with a startup.nsh) for grub to be able to boot / chainload OSes on an NVMe drive. The plan works, except that it works only if the machine has a monitor attached. If it is booted headless, the shell appears to just stall and fail to run the script at all (even if it is changed to just run grub that is configured to boot system on non-NVMe drive).

Any pointer to what might be blocking it? Or is it defected by design that it cannot be used without a monitor?


Re: a question about X509 flag

wenyi,xie
 

On 2021/9/27 17:21, Marvin Häuser wrote:
Hey Wenyi,

Sorry, I cannot help with the time one, but "partial chain" is how virtually any other crypto-solution works out-of-the-box. Basically there is a disagreement about what defines a root certificate, and while some think it is the OpenSSL default of requiring a self-signed certificate for root, many people including myself strongly disagree and do not believe it follows from the RFCs. I'm not aware of any bad security implications of either model. So, this merely allows any certificate in the chain (the top one may be self-signed *if* it even is a certificate, it may just as well be a trusted public key for all we know) to be eligible to be added to the trust store and root a trust chain.
Thank you for your explanation in detail, it helps a lot. X509_V_FLAG_PARTIAL_CHAIN is clear to me now.

Wenyi

Further reading: https://github.com/openssl/openssl/issues/7871

Cc CryptoPkg maintainers and edk2-devel for further feedback

Best regards,
Marvin

On 27/09/2021 10:53, wenyi,xie via groups.io wrote:
Hello,

I have a question about flag set in X509_STORE. Does anyone know why need to set flags X509_V_FLAG_PARTIAL_CHAIN and X509_V_FLAG_NO_CHECK_TIME to X509Store in TlsNew() (CryptoPkg\Library\TlsLib\TlsInit.c)

Thanks
Wenyi




.


a question about X509 flag

wenyi,xie
 

Hello,

I have a question about flag set in X509_STORE. Does anyone know why need to set flags X509_V_FLAG_PARTIAL_CHAIN and X509_V_FLAG_NO_CHECK_TIME to X509Store in TlsNew() (CryptoPkg\Library\TlsLib\TlsInit.c)

Thanks
Wenyi


Re: History of Driver/Features in edk2-platforms

Nate DeSimone
 

Hi Jeff,



The general idea behind putting the drivers and feature code into edk2-platforms came from the concept of advanced feature packages from the MinPlatform specification<https://tianocore-docs.github.io/edk2-MinimumPlatformSpecification/draft/8_stage_6_advanced_feature_selection/#8-stage-6-advanced-feature-selection>.



[cid:image001.jpg@01D7ABE6.E0405820]



So edk2-platforms/Features provides the catalog of available features. Use of these features is convenient due to AdvancedFeaturePkg providing easy to use FixedAtBuild PCDs for turning individual features on and off: https://github.com/tianocore/edk2-platforms/blob/master/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc



Another benefit to this layout is having AdvancedFeaturePkg and MinPlatformPkg co-located enables greater simplicity in our build scripts.



With regard to the idea of pairing down the packages in your formal release repo, that is certainly one method of focusing the codebase on your platform. However, we have found that doing that can make cherry-picks from upstream to downstream (or vice versa) to be more difficult than desirable. At Intel we use git’s sparse checkout feature in lieu of wholesale deletion of packages from the repository.



The usage of several git repositories in a typical modern EDK II project has made fetching code somewhat tedious in general. To make this easier we created the EdkRepo tool, which automates many of these common workflows. In addition to automating cloning and fetching across multiple repositories, EdkRepo manages the git sparse checkout list, automates deployment of client side git hooks and commit templates, and several other useful features.



If you would like to give it a try, the newest release is available here: https://github.com/tianocore/edk2-edkrepo/releases/tag/edkrepo-v2.1.2

To install EdkRepo, the following software is needed:


* Git 2.13.x or later (Git 2.27.0<https://github.com/git-for-windows/git/releases/download/v2.27.0.windows.1/Git-2.27.0-64-bit.exe> recommended)
* Python 3.5 or later (Python 3.8.10<https://www.python.org/ftp/python/3.8.10/python-3.8.10-amd64.exe> recommended)

After you have EdkRepo, run the following command:


edkrepo clone <path-to-some-folder> Intel-MinPlatform

After that is done, change to the directory edk2-platforms/Platform/Intel and run the following command:

build_bios.py -p WilsonCityRvp -t VS2015x85 -d
Or
build_bios.py -p WilsonCityRvp -t VS2015x86 -r

-d is for debug, -r is for release. You can also use -t VS2017/VS2019 if you prefer. On Linux, use -t GCC5.

I hope that helps. Thank you again for reaching out, let us know if you have any questions!

With Best Regards,
Nate

-----Original Message-----
From: discuss@edk2.groups.io <discuss@edk2.groups.io> On Behalf Of Jeff Brasen via groups.io
Sent: Thursday, September 16, 2021 9:37 AM
To: discuss@edk2.groups.io
Subject: [edk2-discuss] History of Driver/Features in edk2-platforms



Was curious if there was a reason why the top level drivers and features code was added into edk2-platforms instead of edk2 or a new repo. These modules seem different than the rest of the code in edk2-platforms as they are not really platform or silicon related code but general features. We are looking at how to both release support for our platforms into tianocore as well as a separate fork that will be used for our actual formal release and it may be preferable to not have all of the other platform/silicon code that is not relevant to our project.



Thanks,

Jeff


History of Driver/Features in edk2-platforms

Jeff Brasen
 

Was curious if there was a reason why the top level drivers and features code was added into edk2-platforms instead of edk2 or a new repo. These modules seem different than the rest of the code in edk2-platforms as they are not really platform or silicon related code but general features. We are looking at how to both release support for our platforms into tianocore as well as a separate fork that will be used for our actual formal release and it may be preferable to not have all of the other platform/silicon code that is not relevant to our project.

Thanks,
Jeff


MicroPythonPkg: How to import/compile uefi module?

Buhrow, Simon
 

Hi,

following the instructions on https://github.com/tianocore/edk2-staging/tree/MicroPythonTestFramework/MicroPythonPkg , I can successfully run micropython.efi (using VS2015x86 instead of VS2017).

However importing the uefi module as given in the example on the above link fails:

```
FS0:\EFI\Python\> micropython.efi
MicroPython v1.9.4 on 2018-07-30; uefi version
Use Ctrl-D to exit, Ctrl-E for paste mode
import Lib.Uefi.uefi as uefi
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'Lib.Uefi'
```

MicroPythonDxe.efi is in the same folder as micropython.efi.

How do I do to compile the uefi module (and other modules) into MicroPythonDxe.efi? (i.e. what changes do I have to make as the default way did not work?)


Regards,

Simon

PS: I posted this question some weeks ago on Stackoverflow:
https://stackoverflow.com/questions/68573311/how-to-import-compile-uefi-module-using-micropython



SIEB & MEYER AG
Simon Buhrow
Entwicklung CNC
Auf dem Schmaarkamp 21
21339 Lüneburg
Germany
Tel.: +49-4131-203-1258
Fax.: +49-4131-203-2000
E-mail: simon.buhrow@sieb-meyer.de
https://www.sieb-meyer.de

Vorstand: Markus Meyer, Torsten Blankenburg
Aufsichtsratsvorsitzender: Michael Semrau
Amtsgericht Lüneburg: HRB 1805
Umsatzsteuer-ID-Nr.: DE 116085664


PCI-Express version 1.1 doesn't support link training error

giovane.anhaia@...
 

Hi,
I'm working with PCI-Express diagnostics on UEFI using edk2. On PCI-Express Base Specification 1.0a there's a bit defined as "Link Training Error" on "Link Status Register (Offset 12h)".
Specs from 1.1 up define the same bit as "Undefined".
Does somebody know if there's an alternative way to check a link training error in these newer PCI-Express specs?


Re: UefiPayloadPkg: assert error in PeiPcdLib

King Sumo
 


Re: UefiPayloadPkg: assert error in PeiPcdLib

King Sumo
 

On Fri, Aug 20, 2021 at 04:52 PM, Andrew Fish wrote:


If you move gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress back to being a
compile time constant (location in the DSC file matters) that might get you
past your ASSERT as a work around?
Yes, it works. Moved from PcdsDynamicDefault to PcdsFixedAtBuild and added hardcoded values.
I think Ray Ni <ray.ni@intel.com> must be contacted to provide a fix...
The build is done using:
build -a IA32 -a X64 -p UefiPayloadPkg/UefiPayloadPkg.dsc -b DEBUG -t GCC5 -D BOOTLOADER=COREBOOT
(IA32 is also required for coreboot)

Perhaps the issue is related to the IA32 target? Calling PcdSet64S() is allowed?
./UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c:
if (GuidHob != NULL) {
AcpiBoardInfo = (ACPI_BOARD_INFO *)GET_GUID_HOB_DATA (GuidHob);
Status = PcdSet64S (PcdPciExpressBaseAddress, AcpiBoardInfo->PcieBaseAddress);
ASSERT_EFI_ERROR (Status);
Status = PcdSet64S (PcdPciExpressBaseSize, AcpiBoardInfo->PcieBaseSize);
ASSERT_EFI_ERROR (Status);
}

Thanks,
Sumo

41 - 60 of 888