Questions tagged [uefi]

The Unified Extensible Firmware Interface (UEFI) is a specification that defines a software interface between an operating system and platform firmware. UEFI is meant to replace the Basic Input/Output System (BIOS) firmware interface.

uefi
226 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6 votes
1 answer
5k views

switch from 64-bit long mode to 32-bit compatibility mode on x64

I want to switch from 64-bit long mode to 32-bit compatibility mode (and back) in a UEFI boot application. Changing bit L in the code segment descriptor seems not enough. What are the other steps? Is ...
user2707695's user avatar
5 votes
0 answers
999 views

Debugging UEFI with QEMU on Windows

I apologize for my English. I want to debug UEFI applications using WinDbg and UEFI (which will run OVMF). How I try to run: Collect the image OVMF defining in the file .dsc macros ...
user avatar
5 votes
2 answers
2k views

Chainloading Windows-EFI from Linux-EFI

Currently, I have the following boot chain in legacy (MBR) mode: GRUB2 -> Linux -> kexec to Grub4Dos -> Windows. I'm trying to figure out if this is also possible in UEFI-mode, i.e. starting the ...
neusdan's user avatar
  • 51
4 votes
0 answers
2k views

What are the differences between x86 CPU operation modes?

I have read a lot about these operation modes. but I'm still confused about the differences between these x86 operation modes. real mode unreal mode protected mode long mode flat mode Virtual 8086 ...
exp101t's user avatar
  • 43
4 votes
0 answers
2k views

Changing boot order for UEFI in c#

Im trying to change the boot order to all my Toshiba's The vendor said i could use SetFirmwareEnvironmentVariable() to do this. So i have found the code and generated this static void Main(string[] ...
New Bee's user avatar
  • 1,011
4 votes
0 answers
714 views

How to enable paging in x86 and display GDT in UEFI

My goal is to enable paging in x86 in UEFI. My professor said, that I may first try to display GDT in UEFI - that way I will also see if paging works. The problem is, that I have no idea how to do it....
Corson's user avatar
  • 167
3 votes
0 answers
57 views

Why the 15MB Size limit for bzImages

I'm working with bzImage to boot a x86 version of my kernel in a virtual machine via U-Boot. U-Boot set a size limitation for bzImage's of 15Mb though. U-Boot git I patched to size limitation to 45Mb ...
obvg's user avatar
  • 139
3 votes
0 answers
734 views

Acquiring BIOS string information

At boot time (using F2, F9 etc) in the BIOS setup screen: Does the BIOS use CPUID to retrieve the information about the machine? If the BIOS does use CPUID to retrieve the information what kind of ...
zerocool's user avatar
  • 3,396
3 votes
2 answers
4k views

How to know if UEFI Shell is booting in 64-bit or 32-bit?

I intend to write a script in startup.nsh to handle different tasks on 32-bit and 64-bit. But I do not know how to retrieve this information. Please help me!
Whoami's user avatar
  • 53
3 votes
0 answers
177 views

Are there any (sane) guarantees in the UEFI memory map?

I am currently playing around with UEFI/kernel development and am struggling to get a firm grasp on the UEFI memory map returned by GetMemoryMap(). I'd like to know whether there is a guarantee that ...
iolo's user avatar
  • 1,090
3 votes
1 answer
392 views

UEFI Shelllib - ASSERT implies initialization of ShellLib?

i wanted to have handy control over the command line parameters. Therfor i want to use ShellLib. My code looks like this: ... #include <Library/ShellLib.h> ... EFI_STATUS EFIAPI UefiMain ( ...
Flitzpiepe's user avatar
3 votes
0 answers
643 views

Can't Build Tianocore on OS X Yosemite

I am trying to build the EFI Development Kit (EDK2) on OS X Yosemite. I have the latest development tools. I followed the instructions exactly as described here, up to building UnixPkg. I then tried ...
SevenBits's user avatar
  • 2,844
3 votes
3 answers
1k views

Bullseye coverage for embedded systems - not a small footprint data file

I'm fighting for few weeks with Bullseye run for EFI (EDK II) system. I finally linked everything, compiled the code and everything seems to work (I used Bullseye tutorial for embedded system and this ...
mlody3k's user avatar
  • 73
2 votes
1 answer
246 views

Get file size in uefi-rs

I am making a basic uefi application that is supposed to load an elf kernel. I have gotten to the point that I have the fille loaded, and a buffer with the file info. But to actually read the file and ...
Olle's user avatar
  • 91
2 votes
1 answer
974 views

UEFI networking edk2 simple example

I am looking for the simplest/easiest way to implement some sort of networking communication using edk2 in a UEFI application. I do not care what type of protocol is being used, but it shall not be ...
xiu-wolong8's user avatar
2 votes
0 answers
639 views

How can a compile a c codefile as a efi app?

I have a c code file and I would like to compile it as an efi application. How can this be done using linux and windows cli tools (i.e. without creating a visual studio project) Than you
chegov's user avatar
  • 23
2 votes
1 answer
625 views

Implementing User Mode and Kernel Mode Switching in 64 bit UEFI OS

I am writing a 64 Bit UEFI OS ( GNU-EFI - Bootloader ). I am wondered about User Mode and Kernel Mode in OS, I have to Implement User Mode and Kernel Mode in My OS, I found some on the Internet but It ...
user16028858's user avatar
2 votes
0 answers
1k views

Get Volume Guid of EFI partition on Windows 2012 R2

I am trying to extract the VolumeGuid of EFI partition. I have been able to do it successfully on Windows 10 Machine using WMI query and Via code using C# ManagementObjectSearcher. I created a VHD ...
balajir712's user avatar
2 votes
0 answers
21k views

How to exit the UEFI shell from 'startup.nsh'

When startup.nsh is called automatically at start up, calling exit inside the script does only exit from the script, but not the shell. But I´d like to exit the shell. When I call the same script ...
El-Coder-SB's user avatar
2 votes
0 answers
86 views

Is it possible to forward host USB devices to EDK2's NT32 emulation platform?

I'm a bit new in UEFI driver development. I have an UEFI application-bootloader that checks all USB tokens that are currently present in system. It works ok on hardware and Vmware VM, but I would ...
andrey0722's user avatar
2 votes
0 answers
672 views

UEFI SysPrep apps are never launched

According to the UEFI spec (Version 2.7 Errata A), section 3.1.7 ("Required System Preparation Applications"): "The platform is required to examine all SysPrep#### variables referenced ...
H-32's user avatar
  • 121
2 votes
0 answers
475 views

UEFI variable to modify memory map

I want to create a variable that the UEFI firmware will use to automatically map out some range of memory. For example pages that had a few corrected errors but that the EFI firmware doesn't declare ...
Eric's user avatar
  • 1,217
2 votes
0 answers
616 views

Create keyboard event UEFI

I'm quite new to the UEFI world, and I was wondering if I can create a event that simulates a key press. For instance, I have a timer event like this: Status = gBS->CreateEvent(EVT_TIMER, ...
Caio Cesar's user avatar
2 votes
0 answers
218 views

Detect that TPM Dictionary Attack Reset has been done

Is there a way to detect from code that a dictionary attack reset has been attempted, but with the wrong lockoutAuth value? I can detect that the TPM is in lockout by checking to see if failedTries ==...
B Lewis's user avatar
  • 21
2 votes
0 answers
1k views

How to open physical disk in EDK2 tianocore?

I am a beginner at EDK2 tianocore. I have EFI Shell and I want to open current USB with EFI Shell as physical disk to read and write blocks. In WinAPI I know CreateFile function with argument like "\\...
user3360601's user avatar
2 votes
0 answers
674 views

Set a Linux USB drive as next boot device in Windows UEFI programmatically

this is my first question here on SOF, I hope I get lucky! :) I'm working on a small "USB launcher" app for amd64 architecture. This question is aimed at Windows 8 and 10 systems. I'm more of a *nix ...
locustard's user avatar
2 votes
1 answer
241 views

ARM UEFI C StdLib BDS

As I understand, If I build an UEFI application with the StdLib Pkg, it has a dependency to the ShellPKg and the application must be started through the new Shell (UEFI Interactive Shell v2.1 EDK II ...
MrGigu's user avatar
  • 1,729
2 votes
0 answers
75 views

Setting drive letter affects other disk

I have attached VHD with diskpart, disk number is 2. $drive_ltrs = (get-partition -disknumber 2).driveletter returns D. If now I assign W to the EFI partition, D gets deleted. Why is this happening? $...
robert's user avatar
  • 3,652
2 votes
1 answer
899 views

Adding a driver to device path UEFI

I am trying to add a filter driver to a protocol in UEFI, meaning that everyone who consumes the protocol, in the hierarchy, will eventually pass through me. I understand I need to add my driver to ...
GalSa's user avatar
  • 43
2 votes
1 answer
920 views

Porting C library to UEFI

I have VC++ solution with two projects; a console application and a pure C library. The console project builds and links the C library statically. At the moment I have the Tianocore environment set ...
Tim Hansson's user avatar
2 votes
0 answers
194 views

Windows pre-boot UEFI specification, how to detect touch devices

We are making some product changes in our Windows UEFI pre-boot environment. However the changes are specific to touch devices and should not be executed on a normal machine (laptop or desktop) that ...
Venkat Gorla's user avatar
2 votes
0 answers
1k views

Why EFI images require some extra padding before the PE/COFF header

Every EFI image I've inspected has at least 40h bytes of padding between the MS-DOS stub and the PE signature which is unused in some cases. It's filled with zeros. I'm writing a linker and my first ...
AnArrayOfFunctions's user avatar
2 votes
1 answer
2k views

Launching an application in UEFI

I have a UEFI application that needs to download (TFTP) the file "bootmgfw.efi" which is the Windows EFI boot loader. I can successfully call Mtftp(), LoadImage(), and StartImage() to download and ...
user2124642's user avatar
1 vote
0 answers
44 views

Calculate time taken by program to run in uefi

I want to calculate how much time does my application take to run. I am trying to use ticks to calculate time elapsed. Basically using the PerformanceLib and TimerLib Frequency = ...
Sharingan's user avatar
1 vote
0 answers
55 views

Running/Building Yocto intel-core2-32 on 64-bit machine

I have been trying to run meta-intel Intel BSP intel-core2-32 on my 64-bit x86 hardware with 64-bit UEFI. I know that 64-bit UEFI will look only for bootx64.efi which gets produced and successfully ...
Anton9988's user avatar
  • 427
1 vote
0 answers
358 views

How to specify include paths for a UEFI application built using an INF file in edk2?

The INF file format is being used to specify module information for UEFI application. Source files are mentioned using [Sources] section. The include path where the header required by these files are ...
geralt rivia's user avatar
1 vote
0 answers
2k views

Calculation of TOLUD - Can't understand Intel's programming example

Modern Intel x86-64 processors contain a register TOLUD (Top of Low Usable DRAM), which effectively marks the boundary in 32-bit address space between RAM and I/O. To a first approximation, writes ...
J Ashley's user avatar
  • 806
1 vote
0 answers
117 views

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 ...
arngineer's user avatar
  • 105
1 vote
0 answers
457 views

"Command Error Status: Unsupported" Error on QEMU & OVMF & Linux Kernel

I’m trying to compile a (lightweight) Linux kernel and start it on QEMU (and OVMF). There is the build-and-run script. In OVMF’s EFI Internal Shell, on $ fs0:\vmlinuz-6.2.1 I get: Command Error ...
Kuraga's user avatar
  • 361
1 vote
1 answer
403 views

How to Enable I2c configuration in edk2

I use the \MdeModulePkg\Bus\I2c\I2cDxe driver and load the driver with the following command: load I2cDxe.efi As a result, both I2cHostDriverSupported and I2cBusDriverSupported get the returned value ...
gordontcp's user avatar
1 vote
0 answers
704 views

EDK2 UEFI shell does not connect with Network adapters

I am trying to build an EFI application that uses socket udp connection to send and receive data. I was following this example (https://stackoverflow.com/a/67076583/19633704). I am able to build the ...
Nandagoplan V's user avatar
1 vote
0 answers
273 views

How to get configured firmware keyboard layout in UEFI?

We can configure keyboard layout language in firmware settings. See the screenshot below How can I get string name of this configured firmware keyboard layout in UEFI in form like "en_US" ...
Alex Nemkovich's user avatar
1 vote
0 answers
620 views

Intel AMT serial over lan in UEFI

I am working on a light weight operating system. To debug the OS, I use the serial port to print messages. I run the OS on a laptop and use Intel AMT's serial over lan to transfer the serial output to ...
Eric Stdlib's user avatar
  • 1,452
1 vote
1 answer
3k views

UEFI ARM64 Synchronous Exception

I am developing an UEFI application for ARM64 (ARMv8-A) and I have come across the issue: "Synchronous Exceptions at 0xFF1BB0B8." This value (0x0FF1BB0B8) is exception link register (ELR). ...
Mark's user avatar
  • 11
1 vote
1 answer
193 views

GPT FileSystem after exiting boot services in C/C++

I am creating an operating system and have strugled to find a way to implement a filesystem into it for the past several months. I can read files in boot services but after exiting boot services in ...
IlcIliaDev's user avatar
1 vote
0 answers
626 views

How to handle interrupts in gnu-uefi?

In BIOS when we want to handle the keyboard we just make an interrupt descriptor table and then load it using: lidt {address} But in UEFI things are a bit different and the osdev wiki did not write ...
Elhadede's user avatar
1 vote
0 answers
138 views

Fetching additional resources from UEFI program when loaded over PXE

I have an UEFI program that requires additional files from the same medium it was started from. This works fine when booting from disk or USB; I can get the device path for the program itself by ...
Simon Richter's user avatar
1 vote
0 answers
118 views

Linux secure boot automatic enrollement

I'm able to enrolled a pub key with mokutil but my server must reboot and I have to manually enter password and navigate to UEFI to validate etc... In case of the pub key change and the pub will ...
jimbolino's user avatar
1 vote
1 answer
217 views

Determine filename at an LBA (FAT)

My goal is to translate logged block-level accesses (LBAs) to file names. I am logging at UEFI level, so programs and boot loaders mostly read from ESP (EFI System Partition) which has a structure ...
Radical Ed's user avatar

1
2 3 4 5