Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
1 answer
96 views

Are UEFI runtime service functions always executed in SMM mode for x86?

For an OS to execute UEFI firmware provided functions, the most common ways is via SMM handlers which is entered by triggering SMI (System Manamagement Interrupt) that leads to running SMM hanlders ...
I Chun Lin's user avatar
0 votes
0 answers
141 views

Is there a UEFI emulator for ubuntu

I'm trying to write a basic bootloader for my laptop, which uses UEFI. I've got the code working when I boot it from a usb, but it's just a pain to restart my computer every time I want to run my code....
Chromegism's user avatar
4 votes
0 answers
112 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
  • 159
1 vote
0 answers
4k 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
  • 826
2 votes
1 answer
642 views

Accessing intel graphics card registers through I/O space and MMIO in UEFI

I am trying to write a code sequence, that will switch my intel graphics card into the legacy VGA mode after a call to Exitbootservices() in my uefi nasm bootloader. In order to do that I am to change ...
adivanced's user avatar
1 vote
1 answer
1k views

Enabling the VGA 13h video mode on a modern PC in UEFI via a UEFI bootloader, written in assembly

I have been writing some x86_16 assembly code for BIOS real mode as a hobby for quiet a while now. Recently I decided to move to writing 64-bit bootloaders for UEFI. First thing, that I came up with ...
adivanced's user avatar
3 votes
1 answer
454 views

x86 CPU Modes / Rings During Boot Process

I currently try to understand how exactly the platform initialization works on modern UEFI x86 systems. However, it is unclear how the privilege modes are defined and where and how they change. I ...
Benedict Schlüter's user avatar
0 votes
1 answer
42 views

How can I ensure PF handler running from allocated stack using IST feature

I have done the changes in UEFI SMM code for PF interrupt that can be use known good stack using Intel IST feature. But not sure how to ensure that SMM PF handler is executing/using in know good ...
hariSTACK's user avatar
1 vote
0 answers
799 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
2 votes
1 answer
940 views

Do UEFI DXE Drivers operate in real-mode? What about "ring -2" or "ring -3" code?

I asked a question referencing a mode sometimes referred to as ring -2 (System Management Mode) which can be exploited to create rootkits. There's also even a rootkit candidate referred to as ring -3 (...
J.Todd's user avatar
  • 827
0 votes
1 answer
453 views

Global variable storage in ACPI

Where are the global variables in an ACPI namespace stored in RAM? Is this region reserved by the BIOS? See example below: Scope (_SB.PC00.LPCB.XYZ_) { Device (ABCD) { Name (VAR1, &...
Hamzahfrq's user avatar
  • 736
0 votes
1 answer
259 views

x86 UEFI Boot: Is the conventional 1MiB padding from address 0 really required for UEFI?

I'm relatively new into kernel development and boot process on x86_64 with UEFI. A lot of general OS dev resources recommend to leave the first 1 MiB in the initial object file free/untouched, because ...
phip1611's user avatar
  • 6,080
1 vote
1 answer
651 views

Get EDID info in C (UEFI): read the ES:DI register?

I am Developing an OS, I wants to get EDID from monitor, I am found some asm code (https://wiki.osdev.org/EDID) to get edid in ES:DI registers, mov ax, 0x4f15 mov bl, 0x01 xor cx, cx xor ...
Vapour Dev's user avatar
6 votes
1 answer
3k views

Does UEFI replace standards like SMBIOS and ACPI? [closed]

I always wondered, as a developer with little experience in what goes on behind the OS, why is firmware such a mess. I'm trying to understand at least where the pieces fit. Is UEFI trying to replace ...
Mihai's user avatar
  • 549
0 votes
0 answers
105 views

Would writing to full physical memory break the hardware?

I am playing around with UEFI and based on Specs after calling ExitBootServices i own all the memory. Are there any memory regions mapped by the CPU to some physical hardware ROMs that could be ...
user avatar
5 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
  • 53
5 votes
1 answer
598 views

UEFI boot services CreateEvent() returning status EFI_INVALID_PARAMETER

I'm writing a simple UEFI application in NASM assembly, and I'm trying to make an event for a free-running timer, but the call to CreateEvent always returns EFI_INVALID_PARAMETER and I'm not sure why. ...
Peter Frost's user avatar
10 votes
1 answer
11k views

How does processor read BIOS from SPI flash?

A typical x86 systems has firmware (aka BIOS or UEFI) stored in a SPI based Flash chip. When the power-on happens, the processor starts executing at Reset Vector which is pointing to memory-mapped SPI ...
Naveen's user avatar
  • 8,234
7 votes
1 answer
1k views

Can a UEFI machine use BIOS interrupts?

When the kernel been loaded into the memory, can it still can use BIOS interrupts? Such as mov AX,0E820h int 15h or something.
KME's user avatar
  • 91
5 votes
1 answer
3k views

How does a PCIe device appear bootable to the BIOS/UEFI?

I have an Intel based host system with a PCIe daughter card that my company has designed. We are able to have it be enumerated to allow memory to be shared with the intel processor. I am looking to ...
penguin4hire's user avatar
4 votes
1 answer
877 views

Who enables the A20 line when booting in pure UEFI?

Is this handled by the UEFI firmware or by for the GRUB grubx64.efi bootloader? I looked at https://wiki.osdev.org/UEFI which claims: UEFI firmware ... also prepares a protected mode environment ...
user10607's user avatar
  • 3,051
0 votes
2 answers
975 views

How To Call ExitBootService through GRUB

I am working on a UEFI Based Hypervisor for Intel x86 platform. The GRUB is being used to load both the VMM and OS images, for reducing the complexity I am currently loading only one GPOS through GRUB ...
Ameer Hamza's user avatar
5 votes
1 answer
2k views

How to create a UEFI kernel in NASM on Linux

I have been following this guide for OS development OS Development on Windows However, I do not like the windows development environment, and so I am trying to transfer these instructions over to my ...
Jonathan Dewein's user avatar
3 votes
0 answers
793 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,472
-1 votes
1 answer
323 views

SPI registor read write application in UEFI bootloader

I am new in UEFI system. I want to read/write the registors over SPI interface but not found any APIs or application in UEFI. It would be helpful if anyone can suggest the sample application or APIs ...
Hardik Prajapati's user avatar
1 vote
0 answers
3k views

Different ways to to trigger a SMI for a processor

I am writing some firmware code running in the System Managemnt Mode (SMM) on an Intel platform. I want to fully understand how my SMI handler get started. I read from the Intel Manual that: The ...
smwikipedia's user avatar
4 votes
0 answers
767 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
4 votes
2 answers
2k views

How can a Bootloader written in x86 Assembly be written to a USB Flash drive and support both BIOS and UEFI?

Recently I have written a bootloader in x86 Assembly. The bootloader does not do anything special right now, but I am planning to load my own kernel with this bootloader. I am able to write the ...
Michiel Pater's user avatar
3 votes
1 answer
6k views

Converting EFI memory Map to E820 map

I am new to Linux and learing about how Linux comes to know about the avaible Physical Mmeory .I came to know there are some BIOS system call int 0x15 which willl gives you E20 memory Map. Now I find ...
Amit Singh Tomar's user avatar