osdev Questions
2
Solved
I'm trying to make my own custom OS and I need some help with my code.
This is my bootloader.asm:
[ORG 0x7c00]
start:
cli
xor ax, ax
mov ds, ax
mov ss, ax
mov es, ax
mov [BOOT_DRIVE], dl
m...
Lateen asked 9/11, 2015 at 6:51
6
Solved
I have loaded an idt table with 256 entries, all pointing to similar handlers:
for exceptions 8 and 10-14, push the exception number (these exceptions push an error code automatically)
for the ot...
Yean asked 29/1, 2009 at 13:38
2
Solved
According to the architecture overview document Aarch64 supports 4k and 64k pages. Some CPUs also support 16k pages. Looking into address translation scheme details I come to the conclusion that su...
Umber asked 14/12, 2015 at 14:16
4
How do I write a .bin file to be in the first sector of a floppy disk/virtual floppy disk/floppy image?
I'm trying to boot a simple 512-byte bootloader. The size on everywhere says "512 bytes" so ...
Andonis asked 1/10, 2015 at 17:40
3
Solved
I am messing around with some hobbyist OS development, and I am a little confused on memory mapped I/O addresses. I understand the whole memory mapped I/O concept, but I am trying to figure out how...
Billbillabong asked 8/3, 2012 at 5:8
1
Solved
I'm writing a small x86-64 OS I boot with UEFI. I am trying to make the kernel a higher half kernel by shifting the executable of the kernel to 0x800000000000. This address should be halfway throug...
Proclamation asked 9/8, 2021 at 5:2
1
Solved
I am studying the issue of alignment check. But I don't know whether the processor is checking on effective addresses, linear addresses or physical addresses, or all checks.
For example, the effect...
Narrows asked 16/6, 2021 at 10:38
1
Solved
I have a small kernel which is booted with UEFI. I'm using QEMU for virtualization. I want to write a xHCI driver to support USB keyboards in my kernel. I'm having trouble to find concise and clear...
4
What is the purpose of a processor sending an Inter Processor Interrupt to itself on the IA-32 architecture?
According to the Intel IA-32 Architecture Software Developer's Manual, Vol. 3, Ch. 10....
1
On x86_64 architectures, the write! macro works as expected with string arguments, but not with integers. When an integer argument is used, I get a strange loop (e.g. write!(writer, "Hello {}!", 12...
2
Solved
Remote debugging a code running in Qemu with GDB, based on an os-dev tutorial.
My version is here. The problem only happens when remote-debugging code inside qemu, not when building a normal execut...
4
Solved
How do you run a program all by itself without an operating system running?
Can you create assembly programs that the computer can load and run at startup, e.g. boot the computer from a flash drive...
Elmer asked 26/2, 2014 at 22:13
3
Solved
I have started my journey through OS development. People usually shout that using raw binary instead of ELF (or other structured format) is a common mistake for applications in a custom OS. I can s...
Altarpiece asked 7/12, 2015 at 8:43
0
I'm trying to develop some very low-level x86 code following this document. I wrote the following C program:
void main()
{
char* video_memory = (char*) 0xb8000;
*video_memory = 'X';
}
I compile ...
4
Solved
I've read that in order to temporarily turn off paging according to Intel's system programming guide (volume 3 chapter 9.9) I should disable interrupts before doing anything else. I can easily disa...
6
Solved
I remember hearing about an embeddable OS that is essentially just libc (maybe it had support for c++). It didn't have a kernel, pipes or any of the other stuff you expect from an os. I tried looki...
Lyrism asked 25/10, 2012 at 6:45
4
Solved
I do not have a problem in the true sense of the word, but rather I will try to clarify a question of content. Suppose we have a microkernel (PC Intel x86; 32 Bit Protected Mode) with working Inter...
2
Solved
I have a small c code file(function.c):
int function()
{
return 0x1234abce;
}
I am using a 64 bit machine. However, I want to write a small 32 bit OS. I want to compile the code into a 'pure' a...
2
In my MIT OS course (686) I have found some code that I don't understand. I'm trying to understand the instruction inb $0x64, %al in boot/boot.S.
My understanding is that it's reading one byte fro...
Ameeameer asked 12/1, 2014 at 19:2
1
Solved
This question is inspired by a problem many have encountered over the years, especially in x86 operating system development. Recently a related NASM question was bumped up by an edit. In that case ...
1
Solved
I am attempting to write my own OS kernel, and have been having some issues getting the linking to work properly between my bootloader and (what will soon be) my kernel (written in C).
I have the ...
Ozan asked 14/9, 2019 at 1:29
1
As far as I can tell, the constraints used in gcc inline assembly tell gcc where input and output variables must go (or must be) in order to generate valid assembly. As the Fine Manual says, "const...
Babbler asked 8/6, 2018 at 22:28
1
Solved
This question is inspired by a Reddit question in r/osdev except that this question focuses on the SS register. One may say RTFM (ISA entry for MOV), but when this question comes up it can get vary...
Alchemy asked 9/8, 2019 at 19:33
2
Solved
I am working on writing my own operating system. So far, my code exceeds 512 bytes, which is too large to fit in a simple boot sector.
I understand that I now have to write a bootloader that reads...
Keener asked 26/2, 2019 at 21:43
1
Solved
I'm fairly new to OS development and I recently started a hobby project of creating a simple-as-possible text-only operating system. It's written in C with some help from assembly and uses GRUB for...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.