Questions tagged [edk2]

Questions with this tag should be about working with the edk2 codebase or build system. Do NOT use for questions relating to PI or UEFI specifications.

edk2 is a modern, feature-rich, cross-platform firmware development environment for the UEFI and PI specifications from www.uefi.org. ([source])(https://github.com/tianocore/edk2)

It serves as the reference implementation of the UEFI and PI firmware specifications, developed as part of the TianoCore project.

Questions under this tag should be ones about working with the edk2 codebase or build system - not questions specific to PI or UEFI specifications.

65 questions
0
votes
1 answer

Including edk2-libc in efi shell application

How would one approach adding support for https://github.com/tianocore/edk2-libc, say I want to include stdio and use printf in my edk2 application? I followed StdLib/Readme.txt, and am able to successfully build examples in the AppPkg, however,…
Mroov
  • 23
  • 1
  • 5
0
votes
0 answers

Could not retrieve UEFI variable with EDK2 GetVariable2() while variable exists

I've created a nonvolatile UEFI variable via Linux efivarfs interface. I can get the value of the variable with efivar command line. But when I try to get the value of that variable during boot phase via EDK2 GetVariable2() I got "Not Found"…
Ali Shirvani
  • 533
  • 6
  • 15
0
votes
1 answer

How to create multiprocess with edk2?

i have create a timer like this, and it work will, but when I want to create two timer work together, only one timer' call back function can work, please help, thanks: EFI_STATUS TimerInit() { EFI_STATUS Status; EFI_HANDLE TimerOne =…
Jason
  • 13
  • 6
0
votes
1 answer

Realtek UEFI UNDI Driver not loaded

I am developing efi application that should work with network. I changed EFI\Boot\bootx64.efi file to efi shell to make starting efi shell on system start by default for convenience. When shell starts I run command ifconfig -l to view available…
0
votes
0 answers

error when comping project using make -j4 but passes when compiling using make j1

I am compiling a C language project on ubuntu v20.4 it is failing. but When I build same project on ubuntu v18.04 then it passes '''make -j 4'''. But when I build using '''make -j 1''' then build passes of ubuntu v20.04 too. Also verified make…
0
votes
1 answer

DebugPrint pushes empty line (Serial connection)

Upon deciding to write a simple "Hello World!" program in EDK2, I stumbled upon the following problem: As I am using a serial connection for debugging, the output of the debug functions like DebugPrint successfully get redirected to my serial…
Dalex
  • 61
  • 1
  • 5
0
votes
0 answers

ARMv8 AARCH64 - Error: immediate out of range

I'm start programming assembly for ARMv8 and I'm facing an error to compare a value to create a conditional code: First approach: #include var1 .8byte 0xdedededef1f1f1f1 ASM_FUNC(CompareValues) ldr x1,=var1 cmp…
Davy Souza
  • 31
  • 4
0
votes
2 answers

Is that possible to use standard libc features in GNU-EFI with Visual Studio?

I am using gnu-efi as Visual Studio 2019 project. My UEFI program works as expected on real hardware. Next step, I need C features like "pow(...);". Naturally, when working with efi all of these features are disabled. When I directly include…
0
votes
1 answer

Adding CHAR16 variable to String

I am a novice in C and trying to amend and compile an EDK2 EFI program. The program portion I want to change has a function MsgLog which takes a Char16 * variable and uses this to write to a log file. The current code has this MsgLog("SomeText…
Dayo
  • 12,413
  • 5
  • 52
  • 67
0
votes
1 answer

AllocatePages return EFI_INVALID_PARAMETER for memory type as EfiConventionalMemory?

Hi I'm using edk2 to write a boot service for a kernel and need to apply AllocatePages service to apply memory with type as EfiConventionalMemory. However, it returns an error code of EFI_INVALID_PARAMETER. I looked into the source code from git,…
Shore
  • 827
  • 9
  • 24
0
votes
0 answers

Does CloseProtocol service necessary after LocateProtocol service?

Hi I'm a beginner in learning UEFI and trying to find out the logic of using protocols. I've read the source code of CoreOpenProtocol, CoreCloseProtocol and CoreLocateProtocol. What I've found that while CoreOpenProtocol will create a…
Shore
  • 827
  • 9
  • 24
0
votes
0 answers

Can't get file using "GetSectionFromAnyFv" or going over all files using firmware volume protocol->GetNextFile

I donwloaded BIOS rom and get list of files using UEFITool: ROM Structure So i know "names" of all files that exist. Then i tried to get file using "GetSectionFromAnyFv" but can't get all files, just files in volume under red arrow. For example…
away228
  • 31
  • 4
0
votes
1 answer

EFI Application Erorr Write Protected

I tried to do some write/read operations on filesystems that I have enumerated for. The problem is when I want to write to other volumes rather than my self (fs0), it will return WRITE PROTECTED Error. ... Enumerated and opened all available…
Ali Sepehri-Amin
  • 493
  • 1
  • 6
  • 18
0
votes
1 answer

RSA key generation error in RSA_generate_key_ex function call

I'm trying to generate RSA keys using openssl. I've got error on RSA_generate_key_ex and have no idea why the error occures. I combine ERR_get_error() and ERR_error_string() and I've got next message: error:2506906C:lib(37):func(105):reason(108).…
0
votes
1 answer

The best way to create signed certificate request and verify certificate from UEFI

I'm trying to create signed certificate request from C code in UEFI (I use edk2). I know how to do it using openssl in Linux C code. I know there is CryptoPkg in edk2. But I didn't find functions to create request and check certificate. Is there any…