Questions tagged [gnu-efi]

This tag is used for questions related to use of the gnu-efi toolkit to build UEFI applications, as opposed to generic questions around UEFI.

gnu-efi is a set of libraries and scripts used to build UEFI applications in a Linux environment.

50 questions
4
votes
1 answer

What is the correct way to load a UEFI protocol?

Apologies if this doesn't fit the StackOverflow format. I'm currently learning about writing UEFI applications. I've been reading the UEFI standard as well as a wealth of tutorials online and I can't seem to figure out what is the correct method for…
ajxs
  • 3,347
  • 2
  • 18
  • 33
3
votes
1 answer

How to read LBA (UEFI)

I wanted to list the content of the root directory in UEFI, but I didn't find any protocol to do that; therefore I wanted to print the content of the directory file, but the EFI_FILE_PROTOCOL can't read direcory files. The only other thing that I…
3
votes
1 answer

EFI format string reference

Could someone please point me to some reference documentation about EFI "printf" format reference? I mean it's not like regular printf, as it supports %g as GUID, and prints a question mark for %llu. My best Google-bet was "efi" "print" "format"…
YaniMan
  • 293
  • 2
  • 13
3
votes
1 answer

Most UEFI protocols are reported as "unsupported"

I'm writing an EFI executable on a SoC device (Up Board) to help us automate BIOS updates and PXE boots for installating our software on numerous devices. The problem I have is that seemingly most of the protocols in the specification are…
SirDifferential
  • 142
  • 1
  • 12
3
votes
1 answer

How to read a file of the EFI partition using gnu-efi

I used gnu-efi. I do not understand how to simply read file. I understand about using the BlockIOProtocol. Could you tell us along with a simple example?
2
votes
1 answer

UEFI Resolve full path

I'm working on a bootloader of sorts using GNU-EFI. So far I've been able to read the Boot#### NVRAM variable, so I have a semi-populated FilePathList[], which looks like this (printed with DevicePathToStr): HD(Part2,…
2
votes
1 answer

UEFI simple example of using ExitBootServices (with gnu-efi)

I'm trying to write a hello world kind of program using gnu-efi, but without the Boot Services, because they become unavailable after ExitBootServices. Writing directly to video memory before calling ExitBootServices does not display anything. For…
andrei-n
  • 87
  • 2
  • 5
2
votes
2 answers

How to compile uefi application using gnu-efi?

I tried to compile uefi code using gnu-efi. But I don't understand how to compile my uefi application code. I get gnu-efi 3.0.2, decompress and type make && make install. I write hello world code: #include #include EFI_STATUS…
1
vote
0 answers

GNU-EFI: How to do callbacks properly (calling convention incompatibilities)?

I'm using GNU-EFI and calling UEFI functions works like a charm, thanks to the uefi_call_wrapper() macro, which ensures that differences in calling conventions won't be an issue. But: What to do in the reverse case, when I want the system firmware…
arngineer
  • 105
  • 1
  • 1
  • 8
1
vote
0 answers

Odd (possibly) gnu-efi specific data type `UINTN`

I found a really odd data type I've never seen before in some GNU EFI code, specifically a call to GetMemoryMap, wherein the map size, the map key, and the descriptor size are all declared to be the type UINTN. My IDE does not recognize this data…
NickKnack
  • 119
  • 1
  • 8
1
vote
1 answer

Return value from efi application to efi shell

I’m running an efi application from the startup.nsh in efi shell. How can I get a value as return of the application to the shell and use it in the shell script?
1
vote
0 answers

Why does SystemTable->ConIn functions cause my fans to go insane and freeze the booting process?

So basically, I'm trying to do input with gnu-efi and I've struggled but I finally got something compiling. Here it is: #include #include EFI_STATUS EFIAPI efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) { …
1
vote
1 answer

How do I develop an UEFI application using the network packages?

I see GNU EFI is a tool chain to compile applications, but it doesn't seem to come with many libraries. Tianocore EDK2 comes with a lot of code, with modules and drivers that I'm still figuring out. By default, it builds a full firmware image that I…
Atilla Filiz
  • 2,383
  • 8
  • 29
  • 47
1
vote
2 answers

How can I use UEFI Runtime Services?

I want to learn more about firmware developement. I already know how to write assembly programs for the old BIOS and now I wanted to start with UEFI. I managed to compile and emulate a Hello World program, and now I was trying to write a program…
1
vote
1 answer

UEFI LocateHandleBuffer always returns "Invalid Parameter"

Very simple UEFI program as such: LocateHandleBuffer() always returns 8000000000000002 which is "Invalid Parameter. EFI docs say that the only reason for that should be if one of the two pointers I am passing are NULL, which they are clearly not. It…
Brad
  • 11,262
  • 8
  • 55
  • 74
1
2 3 4