All Questions
29 questions
2
votes
0
answers
42
views
Accessing Indices Beyond Array Size in Decompiled UEFI BIOS Code
I am stuck analyzing an .efi file (extracted from a UEFI BIOS .exe package). I have commented and renamed most of the parts I am interested in, but I am having some troubles finding the last ...
0
votes
0
answers
99
views
My bootloader works on QEMU fine but no on real hardware
The bootloader is one of the hello world projects that i have found that in internet:
https://johv.dk/blog/bare-metal-assembly-tutorial.html
Before that I had tried to write some bootloader with nasm ,...
1
vote
0
answers
69
views
How to use .asm in EDK2?
I am trying to use assembly in EDK2. I build an X64 driver so I can't use inline assembly but I always get an error while trying to compile.
I am using a HeciTool.asm that only returns a 0:
section ....
1
vote
2
answers
109
views
How does the ms_abi pass between c and assembely
I am working on an OS using EFI using the ms_abi and was wondering how does it pass arguments because I am moving some systemtable info into a register but when I try to call a function using the ...
0
votes
0
answers
158
views
Why is load image returning EFI_NOT_FOUND?
I am creating a UEFI application in NASM assembly. I want to be able to give it an absolute file path to a secondary EFI file, and to use the loadImage boot service to launch that image.
The problem ...
0
votes
0
answers
63
views
why doesn't my loop work in 64 bit nasm for efi [duplicate]
I'm writing a basic bootloader for my laptop, which uses uefi, I have got booting from the usb working, printing working, exits working, everything but a simple loop.
This the the loop:
mov r10, 0x05
....
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....
0
votes
1
answer
589
views
How do I get the device path of the current running image in UEFI?
As part of a UEFI application I am writing, I would like for my application to load a second application in the same folder as this one.
However, to do this, I need to know the full file path of the ...
5
votes
1
answer
862
views
How to write 'Hello_world' EFI application in NASM?
I'm trying to write a 'Hello_world' EFI application in NASM but can't seem to be able to get it working. When I run the application (in VirtualBox), it doesn't print anything. It just hangs. Here's my ...
0
votes
1
answer
292
views
Black screen NASM UEFI
I want to boot to my NASM kernel. But it is black screen and gives error The virtual machine can not boot in VMWare.
No prints.
The codes:
kernel.asm
; generate 64-bit code
bits 64
; use relative ...
0
votes
0
answers
48
views
Why does openVolume cause a #gd error in QEMU?
I am working on a NASM implementation of a UEFI application. One of the things I need it to do is to read files on its' file system. To do that, I am using the EFI_SIMPLE_FILE_SYSTEM protocol and the ...
0
votes
0
answers
86
views
Does the 'ret' instruction behave differently on different UEFI implementations? [duplicate]
I have a simple print string program as part of a UEFI application.
I am trying to print three strings in a row onto the screen, using the output console function OUTPUT_STRING
The part I'm struggling ...
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 ...
0
votes
0
answers
1k
views
Can I use every USB 3.0 A/A cable for Intel DCI debugging?
I successfully managed to enable DCI on my UEFI mainboard to enable debugging via a USB 3 DbC connection.
Now I need a USB 3 debug cable. I only can find one at DataPro via Google. It actually looks ...
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 ...
1
vote
1
answer
318
views
Cannot find OutputString Offset in UEFI Assembler Application
I want to Output a String via UEFI in a EFI Application made by Flat Assembler.
This is my Code
format pe64 dll efi
entry efimain
section '.text' code readable executable
efimain:
sub rsp, ...
0
votes
0
answers
344
views
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 <AsmMacroIoLibV8.h>
var1 .8byte 0xdedededef1f1f1f1
...
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.
...
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.
11
votes
1
answer
19k
views
How does UEFI boot mode boot flows?
The expression of this question is same as What is UEFI's boot sequence?, but it doesn't seem what I want. I'd like to know UEFI sequence in instruction perspective.
For example, in case of BIOS ...
0
votes
2
answers
1k
views
How to write a custom bootloader for mac systems?
I wrote a little bootloader in assembly and it uses BIOS interrupts and it works great on my pc. My question is, is there any possibility to make it work on Mac / Apple systems. I know that Apple ...
0
votes
1
answer
720
views
Having trouble calling ExitBootServices from a bare-bones PE+ uefi application made with nasm
I have made a PE+ UEFI application in nasm and have been able to use EFI_BOOT_SERVICES to print text, to load the GOP, and when I call GetMemoryMap the return value is EFI_SUCCESS (0) and I can return ...
2
votes
1
answer
7k
views
Assembly - How to set graphics mode in UEFI (No VGA, No BIOS, Nothing deprecated)
Tools I'm using: nasm, qemu-system-x86_64.
Operating System I'm on: Windows 10.
So I checked out the "Real Mode OS Warning" at https://wiki.osdev.org/Real_Mode_OS_Warning
What the article seems to ...
1
vote
0
answers
92
views
Send bytes to SPI controller using Assembly
I am studying UEFI Firmware development. For debuging purpose, I need to send some read / write commands to SPI controller.
Is there any way to communicate with SPI controller using assembly language?...
1
vote
0
answers
216
views
EFI? Byte Code (micro)optimizations
Are there any good practices for optimizing and micro-optimizing EFI Byte code (or bytecode in general) for speed given that instructions are executed in strict order? Like maybe one instruction is ...
3
votes
1
answer
2k
views
Broken CPUID brand string?
I am printing some information about CPU in my OS using CPUID instruction.
Reading and printing vendor string(GenuineIntel) works well, but reading brand string gives me little strange string.
ok ...
26
votes
5
answers
18k
views
How does UEFI work?
I was studying about bootloaders when exactly came upon the term UEFI. I can understand some things about UEFI. But still, In what mode(Real,Protected,Long) does a system with UEFI start? If normal ...
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 ...
21
votes
3
answers
14k
views
Writing an OS with UEFI [closed]
I haven't been coding much lately, but I've decided I want to start working on OS development again. Recently I heard about a system better than BIOS. I want to develop an OS for a platform that uses ...