937 questions
2
votes
1
answer
173
views
Why can't I boot my multiboot header kernel in Grub if VM firmware is legacy BIOS?
I created a kernel with a multiboot header but GRUB fails to boot the if VM firmware is legacy BIOS.
Linker script:
ENTRY(_start) /* the name of the entry label */
SECTIONS {
. = 0x00100000; /* ...
1
vote
1
answer
49
views
Bochs VESA/VBE Missing DDC Compatiblity
I am trying to check for the existence of the VESA VBE DDC extension for the purpose of getting an EDID record from the BIOS. Bochs (tested on v3.0, AND a version compiled from Git today) simply doesn'...
1
vote
1
answer
52
views
What Does the EDID Detailed Timing Table Mean?
I am building an operating system for the x86_64 ISA. I am to the point in my development where I want to begin to display things graphically for the user, and therefore have begun to delve into the ...
2
votes
1
answer
107
views
How Do You Retrieve a Video Output's Preferred Resolution? (BIOS Bootloader)
I am building an operating system for the x86_64 ISA. I am at the point in my development where I want to begin display things for the user graphically, and therefore wish to retrieve the monitor/...
Advice
0
votes
9
replies
84
views
How Do You Retrieve a Video Output's Preferred Resolution?
Re-asked as a normal question (not opinion-based / discussion) as
How Does One Retrieve a Video Output's Preferred Resolution?
This version should be deleted.
1
vote
3
answers
91
views
How can I convert this bcdedit command to a get a string assigned to a variable for reference in a batch file?
The code below shows the BIOS mode UEFI or Legacy if used in cmd (command prompt window) or in a batch file.
How to modify the below command line so that a variable can be used, for example BIOS_MODE, ...
3
votes
1
answer
166
views
Why does this code save registers before interrupts which don't destroy these registers?
I have been reading MS-DOS 1.00 source code. Link: https://www.pagetable.com/?p=165
One of the times where the developer decided to save a register, that is preserved by BIOS?
print xor ...
Advice
1
vote
2
replies
17
views
Does BIOS interrupt 0x13 depend on the BPB?
I am developing my own filesystem, and I realized that I don’t want to include the BPB (BIOS Parameter Block).
Will this affect BIOS interrupts such as 0x13 function 0x02 (read sectors from disk)?
...
Advice
1
vote
0
replies
87
views
BIOS/UEFI guided security examples
I am looking for simple examples which show a step-by-step guide on, for example, purposefully installing rootkits or other firmware-related malware in order to show how they work and their effects. I ...
0
votes
2
answers
210
views
Is there a way to detect UEFI from a Delphi App?
I want to know if the computer I'm using has UEFI or Legacy BIOS.
Is it somehow possible to detect this from Delphi code?
I found ExGetFirmwareEnvironmentVariable which seem interesting, but I'm not ...
1
vote
1
answer
127
views
INT 13h AH=2h throws the error AH=9h, but the offset is 0
This code works:
mov ah, 0x02
mov al, 1
mov ch, 2
mov cl, 12
mov dh, 1
mov bx, 0x1000
mov es, bx
mov bx, 0x0000
int 0x13
And this code doesn't:
mov ah, 0x02
mov al, 1
mov ch, 2
mov cl, 12
mov dh, 1
...
2
votes
1
answer
103
views
powerpc qemu refuses to load my simple bios file
I would like to make a very simple qemu test with a generic powerpc 32 cpu, bare metal (no ROM or bios)
I have a (stupid) BIOS code (it doesn't matter how simple and non-functional it is, as I'm not ...
3
votes
1
answer
136
views
nasm bios int 13h read sector issue [duplicate]
im trying to make a simple bootloader that loads a simple kernel and the problem is that the kernel code doesnt run i do see prints from the bootloader but not from the kernel here is my code:
boot....
4
votes
1
answer
256
views
Qemu Bios; Configuring VGA
I'm trying to write a simple hello world bios for Qemu as an academic exercise, and I've gotten Qemu to believe the display is initialized. I see a black screen upon boot, but writing to character ...
1
vote
0
answers
83
views
Following the very first far jump instruction in early BIOS execution
How are CPU far jump instructions handled? What I mean to ask specifically is, what determines where the next instruction after the far jump is fetched from? I'm asking this in a context of the very ...
4
votes
2
answers
223
views
MBR works in QEMU/BOCHS but not on real hardware
I threw together a makeshift MBR for a chainloader project I have been working on for sometime now. I tested on QEMU and BOCHS and no issues, besides throwing earlier 386 BIOS images into the mix (...
0
votes
1
answer
90
views
Suspending USB using XHSETT
I had installed XHSETT in my laptop and suspended my USB, so usb stopped working, and then I forgot I did that.
XHSETT - https://www.usb.org/document-library/xhsett
Later When I tried to use the USB ...
0
votes
1
answer
66
views
Problem retrieving the flat memory frame buffer address using VESA
I can't pass the address of the linear framebuffer to vbe
I tried via:
mov eax, [ModeInfoBlock + 0x28]
mov [0x8000], eax
but 0x8000 is always zero, but if I write mov [0x8000], 0x12345, then it ...
1
vote
3
answers
134
views
Bootloader in Assembly for BIOS Legacy: Keyboard input works in .img but screen is blank; in .iso the menu appears but keyboard input is ignored
I'm developing a small bootloader project in Assembly for BIOS Legacy (real mode). It displays a disk selection menu using BIOS interrupts (INT 10h for video, INT 16h for keyboard).
However, I'm ...
0
votes
1
answer
94
views
How to get disk size?
I need the total disk size in bytes to be displayed at startup, as well as some additional information.
I tried doing it this way, but the data displayed on the screen was completely wrong:
[BITS 16]
[...
1
vote
1
answer
89
views
OSDev - Replace cylinder address to make OS run on real hardware
I'm following a github tutorial (https://github.com/gmarino2048/64bit-os-tutorial/)
and came across these lines of code in load.asm in chapter 1.3, part of the bootloader that loads the actual kernel:
...
2
votes
0
answers
70
views
How does this code detect whether the timer is working?
; VERIFY THAT TIMER 1 FUNCTIONS OK
MOV AL,54H ;SEL TIMER 1,LSB,MODE 2
OUT TIMER+3,AL
SUB CX,CX ;
MOV BL,CL
MOV AL,CL ;SET INITIAL TIMER ...
1
vote
2
answers
116
views
Use different colors for different message string constants in a DOS program?
I'm learning how to do assembly, and I can't find any examples on how to add different colors to different lines of messages (e.g. msg1 = green background, msg2 = red background). Adding something ...
0
votes
0
answers
30
views
why does BIOS print out the letter "U" before a keypress in assembly x86 [duplicate]
I'm trying to get the user input and store the character in a variable, but the problem with that is that whenever I run boot.bin it outputs the letter "U" before any key is pressed. Does ...
1
vote
0
answers
182
views
Why is the BIOS designed to be near 0xFFFFF instead of 0xF0000?
I am currently doing an experiment for S6.828 and I am facing a problem.
+------------------+ <- 0xFFFFFFFF (4GB)
| 32-bit |
| memory mapped |
| devices |
| |...
0
votes
0
answers
47
views
MASM615 Int 10h works on dosbox but not on windowXP
I use dosbox on Mac and made an assembly program that uses int 10h(bios interrupt call)to draws a square. And it works fine, but when I tried to run the program on windowXP emulator on iPad, it seems ...
2
votes
1
answer
391
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 way is via SMM handlers which are entered by triggering SMI (System Management Interrupt) that leads to running SMM handlers ...
2
votes
1
answer
205
views
Why does my conversion from LBA to CHS not work?
I'm developing a bootloader for an x86 BIOS. In my first-stage bootloader (MBR), I need to read 2880 sectors (or more) from the disk, and then jump to the second-stage bootloader placed in the second ...
0
votes
0
answers
74
views
Setting Endorsement Primary Seed fails
I am trying to set the EPS in an EDK2 UEFI Application. I always get "Device Error".
int main(int ArgC, char *ArgV[])
{
TPMS_AUTH_COMMAND AuthSession;
AuthSession.sessionHandle = ...
0
votes
1
answer
214
views
Alder Lake N - UEFI GPIO Register Defaults/Initialisation
I purchased an obscure NAS only sold to the Chinese domestic market (Zspace Z4Pro) with a view to using another OS on it since it was intel based (i3-N305)
For reasons unknown the power to the drive ...
2
votes
1
answer
115
views
assembly 8086 space invaders project, int 10h doesnt work
im making a space invaders project to school and im trying to check if the aliens got to the button of the screen. i used the int 10h d (it takes the color of a pixel on the screen) on my code and it ...
2
votes
0
answers
117
views
Why are the upper half and lower half of the CMOS register value the same?
I used RW Everything to access the CMOS register values through Data/Index ports with 70/71 ports. There are 256 addresses in total, 0x00 ~ 0xFF.
I'm wondering why the upper 128 values (0x00~0x7F) are ...
1
vote
1
answer
128
views
Centering Text in Assembly Language Programming
Do you have any idea on how I can center the text or string in Assembly Language Programming?
Here's my source code:
.model small
.stack 100h
.data
;**********************************************
...
0
votes
0
answers
60
views
At what point during system boot is BIOS loaded
On a traditional x86 system boot from power on, at what point does the BIOS get loaded?
A CPU will progress from power off to S5 sleep state, through to S0 operational state. Is there a standard stage ...
0
votes
0
answers
122
views
Dell BIOS Updates Script Freezes
I need to be able to update the BIOS on over 5,000 Dell computers when there is a critical BIOS update. I've messed with batch files and Powershell. This is the latest Powershell. When I run it, it ...
1
vote
1
answer
165
views
Libreboot build error: ERROR ./build: this command as root is not permitted
I have problem. After ./build roms all command I get ERROR ./build: this command as root is not permitted.
I changed the owner to normal user of the lbmk directory but it didn't help.
I building ...
0
votes
0
answers
332
views
UEFI driver doesn't show "Hello World" in EFI Shell on boot
I made this UEFI driver with EDK2. It prints "Hello, World!" and pauses the Shell for 60 seconds. When I load the driver in EFI Shell manually it works perfectly. I then proceeded to pack ...
0
votes
1
answer
103
views
Purpose of stack register(s) in holding 0x7c00
I have a problem in understanding the curtain part of the code, how it works and what's behind the operating stack register(s).
; that part i'm referring to
mov ss, ax
mov sp, 0x7c00
I need an ...
1
vote
1
answer
56
views
Loading disk sector into memory (AT&T)
I want to load a sector into a memory address starting at (0xD000). I use index addressing to complete disk load with 0x13 BIOS interrupt. Using 16bit mode, BIOS, AT& Syntax assembly.
I am having ...
1
vote
1
answer
107
views
x86 BIOS stage 1 boot code halting after loop from interrupt [closed]
I have some x86 BIOS boot code (16 bit real mode):
org 0x7C00 ; tell compiler where we are located in memory
bits 16 ; tell compiler that ...
0
votes
0
answers
86
views
Patching UEFI Pei module problems with addresses
I want to patch some UEFI PEI module of an older BIOS and I encountered some problem.
hex edit and insert one function from other BIOS
Now I need to fix some offsets.
These addresses are from .data ...
1
vote
0
answers
152
views
memory allocation in real mode in the MBR
In a MBR, the following code in the preboot environment allocates a buffer of 10Kb by subtracting 10h from the total amount available :
seg000:7C1D sub word ptr ds:413h, 10h
seg000:7C22 mov ax, ds:...
1
vote
1
answer
211
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 = ...
1
vote
1
answer
387
views
Confusion regarding CS and DS segment registers during bootloading process
I've been learning about OS development by following the MIT course with JOS.Right now, I'm digging into how bootloaders work and the details of x86 computer architecture, especially memory ...
1
vote
0
answers
72
views
Bootloader Functionality in Context of JOS and significance of the MBR signature
I'm currently learning about operating system development, following the OS course from MIT. Most tutorials on bootloaders in forums like osdev wiki was using a signature, commonly referred to as the ...
0
votes
0
answers
238
views
is there a bios interrupt or something like that to wait?
i am trying to make a pong game operating system. I want to implement it in assembly(i know it wont be easy) and i need a way to time out, so that the ball can move every second to the right. i am in ...
1
vote
3
answers
93
views
Error in emulator output for pong game in assembly language
Pong game in assembly language
I am trying to make a small pong game for my own practice in assembly language as I'm a beginner in this area.
I'm running the code on my x86 64-bit Windows pc. I'm ...
0
votes
1
answer
358
views
My Intel i7 12700k doesn't support intel VT-x
I'm trying to run a virtualmachine on my new laptop Intel i7 12700k and I get the error telling me that the VT-X is not enabled. I have been able to install virtualbox but nothing can be install on it....
1
vote
1
answer
77
views
How to move two boxes at multiplayer if input buffer reads only one character at a time?
I am writing an assembly program for two boxes moving at the same time and I want the two players on the same pc to move with each other. How to do that with int 16h/1 and int 16h/0
I tried it with ...
1
vote
1
answer
412
views
How to get a emu8086 program to output a result?
Here is my assignment:
Write a program to divide two 8-bit numbers using successive subtraction method using 8086. Multiply this result with 7365. Display this result in Blue color on the output ...