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
0 answers

EDK2 Error 3FFF: Sources is not a valid section Name, Fix?

This is in my Dsc file [Sources] UEFI.c This is my error while compiling Error 3FFF: Sources is not a valid section Name I tried moving My [Sources] Section checking for any errors But It still wont compile
0
votes
0 answers

How UEFI drivers use the content in the ACPI tables

I came across this project on gibhub https://github.com/UEFI4Phone/edk2sdm/tree/master/Sdm835/SamsungS8Pkg/AcpiTables This is my first time trying to dig into some non C written files in EDK2. Please excuse me if I did not make it clear. I realized…
0
votes
0 answers

How to modify the Handle order in the UEFI Handle Database?

In the code, the following boot service is being used to obtain an array of Handles with the array size equals HandleCount. gBS->LocateHandleBuffer ( ByProtocol, &gEfiSomeProtocolGuid, NULL, …
0
votes
0 answers

How to access kallsyms from outside operational system (edk2 SMM driver)?

I'm using EDK2 to write a System Management Mode (SMM) driver. I think it uses "Pure C", given the fact that I'm not able to use standard C library like stdio. Even if I #include it throws me an error undefined reference to "fopen" when I…
Allan Almeida
  • 13
  • 1
  • 5
0
votes
0 answers

How to open and read file from outside the OS / non-OS environment (SMM driver)?

I'm running linux and I want to access /proc/kallsyms from outside the OS. I'm writing an SMM driver (EDK2) that's written in C, but I cannot use stdio functions like fopen, because compiler (GCC) says undefined reference to "fopen" even though I…
Allan Almeida
  • 13
  • 1
  • 5
0
votes
0 answers

How to set I2C host controller address/input clock frequency for MinnowBoard?

In 'MdeModulePkg\Bus\I2c\I2cDxe', since the following protocol is not installed: gEfiI2cMasterProtocolGuid gEfiI2cEnumerateProtocolGuid gEfiI2cBusConfigurationManagementProtocolGuid So I refer to the example of…
gordontcp
  • 31
  • 2
0
votes
1 answer

How to access efi executable present in another partition using gnu-efi?

I have to create 2 fat16 partitions in a disk and place one of the efi binary in another fat16 partition. To begin with, wrote a basic HelloWorld.efi application (second stage) and for the first stage, used below-mentioned 2 apis to execute the…
Santi
  • 67
  • 7
0
votes
1 answer

How to make a .efi program execute at boot

I have written a .efi executable using Edk2 and have been able to successfully execute the file in the UEFI Shell. I'm attempting to have my file execute as my device, which is running Ubuntu, boots up. Is there any way to accomplish this objective?
silkyskate
  • 11
  • 2
0
votes
0 answers

Writing to Pins using EFI_PCI_IO_PROTOCOL

I am trying to write a UEFI application to write to a device through EFI_PCI_IO_PROTOCOL. To do this I am calling Io.Write and Io.Read but I cannot seem to find the Offset/"Bar relative base address". Data = 1; Status = PciIo->Io.Write( …
silkyskate
  • 11
  • 2
0
votes
1 answer

EDK2 failed to build in Win11

I started with Visual Studio 2019 Professional, but there were some errors. I thought it was a compiler error at first, so I changed to Visual Studio 2019 Community. Error 7000 (edk2) : Microsoft Visual Studio \2019\ Professional \VC nmake.exe…
0
votes
1 answer

edk2 cannot find i2c bus

I am new to UEFI and I am attempting to talk to an i2c bus on an Up eXtreme board. I have tried following people trying similar things with USB online but gBS->LocateHandleBuffer does not seem to find the i2c bus. I am led to assume that since i2c…
silkyskate
  • 11
  • 2
0
votes
0 answers

UEFI (UGA) Graphics After exiting Boot Services

I was writing an Operating System and testing it on an emulator in my primary computer (HP Z420), i tested it sometimes on that computer but i was always in a boot/shutdown loop that taked a long time. So i had an old pc (HP 620) Which has an old…
git_lk1
  • 76
  • 1
  • 8
0
votes
0 answers

Using EFI_TCG2_PROTOCOL in UEFI

I try to use EFI_TCG2_PROTOCOL in UEFI to access TPM functionality. I create persistent key in user space, using TSS API in this way: // We will make a key in the "null hierarchy". TPMT_PUBLIC primTempl(TPM_ALG_ID::SHA1, TPMA_OBJECT::decrypt |…
0
votes
1 answer

edk2: basetool building failure with gcc 11

Hi I just updated edk2 package and trying to build a BaseTools module. But it reported an error like the following brotli/c/dec/decode.c:2033:41: error:argument 2 of type ‘const uint8_t *’ {或称 ‘const unsigned char *’} declared as a pointer…
Shore
  • 827
  • 9
  • 24
0
votes
1 answer

How do I start UEFI shell with parameters programmatically?

I'm using EDKII to write a UEFI module. I want this module to load and start UEFI shell with parameters (to use its command lines capabilities). So far I have the following code, which successfully loads and starts the UEFI shell, but I can't seem…