Questions tagged [osdev]

Operating System development: kernel, shell, networking, cross-compiling, etc.

An operating system is the base software that runs atop computers. It has at least two important roles:

  • it manages access to the underlying hardware, regulating competing access to the same resources from multiple programs;
  • it presents an extended machine for programs that is easy to understand and use.

Operating system development comprises several topics, like:

  • kernel;
  • supporting operating system utilities (e.g. the shell, networking, etc.);
  • cross compiling.

Resources

This community wiki contains links to several interesting resources and courses to get started on operating system development:

What are some resources for getting started in operating system development?

1093 questions
0
votes
1 answer

Why does QEMU return the wrong addresses when filling the higher half of the PML4?

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 through the PML4. Basically, I should fill entry 256 of…
user123
  • 2,510
  • 2
  • 6
  • 20
0
votes
2 answers

Can't Access 32 Bit in Protected Mode

During the development of a small kernel, I stumbled across a strange problem when booting up application processors using the APIC. As stated on OSDev and the Intel-Manual, the processor first enters Real-Mode, and my goal is to get it to operate…
Dalex
  • 61
  • 1
  • 5
0
votes
2 answers

Why is my code causing a triple fault on x86-64?

I've got a small x86-64 kernel I boot with UEFI. At first, I was loading the kernel directly at 0x400000 but then I wanted to have a higher half kernel because I feel it is the proper way to do things. I decided to adopt a strategy where I separate…
user123
  • 2,510
  • 2
  • 6
  • 20
0
votes
1 answer

How did executable stacks work in x86 protected mode?

Section 4.7.2 of the the AMD64 Developer Manual Volume 2 (System Programming) which describes Code-Segment Descriptors in legacy modes states: Code segments establish the processor operating mode and execution privilege- level. The segments…
Omar Darwish
  • 1,536
  • 2
  • 15
  • 23
0
votes
2 answers

Is there a 64 bit UEFI ELF bootloader?

I have ELF kernel. So I need a bootloader that will load my 64 bit ELF file. I don't need obsolete Legacy BIOS bootloaders, I need UEFI bootloader with/without GUI.
purepelmen
  • 89
  • 9
0
votes
1 answer

Using make to compile several files of the same type which are under different subdirectories?

I just started learning make today. I have several assembly files that I want to compile and then join into a single file. For now I have two files in my tree but the makefile code should be able to handle more. So here is what the files look…
0
votes
1 answer

Why does grub-file say that NASM raw binary is not multiboot2 compliant?

I am trying to make a minimal kernel. My goal is to make this not-yet-existing kernel to be multiboot2 compliant. So I started out by creating a minimal multiboot2-header in NASM-Assembly. I am using grub-file to test whether my binary is…
Alexander
  • 3
  • 1
0
votes
1 answer

OSDev - Error when using the 'make' command in 'docker'

I started writing an OS kernel using the tutorial in this video. I've already written the Makefile as you can see here: x86_64_asm_source_files := $(shell find src/impl/x86_64 -name *.asm) # Holds the list of all of the assembly source…
Ovid
  • 11
  • 6
0
votes
1 answer

Strange data when read disk sector with ATA/IDE PIO

I gets some unexpected data when I read a disk sector. I tried to read disk data without a kernel, but got strange data. I have a file fs.img and use it like qemu-system-i386 -drive file=fs.img,index=0,media=disk,format=raw,if=ide ...... hd…
stskyblade
  • 19
  • 4
0
votes
0 answers

kernel stuck of reboots when loaded

Long story short, I am tring to run an custom os on REAL hardware. I am using http://www.brokenthorn.com/Resources/OSDevIndex.html this tutorial as guild line(more like copy 99% of there code there). I made it to page 20 there (demo15) and there i…
Tal
  • 1
0
votes
0 answers

Running kernel after loading sector

So, I am having issues with running the kernel code. I read the second sector, pad it with 512 bytes, then jump to the address where the kernel is to be. But, instead of printing, like it should, it just halts and does nothing. Here is my…
0
votes
0 answers

I made a simple hello world ,, kernel ''. It doesn't print anything. What did I do wrong?

I have followed this tutorial: https://www.youtube.com/watch?v=1rnA6wpF0o4 in order to write a very very basic hello world after boot, as it seems very complete on the next episodes. My problem is that I cannot see what I've done wrong as I verified…
0
votes
0 answers

Unabled to get right status before read or write on the disk

I'm trying to get right status of Hard disk registers before read or write the hard disk using LBA equations. So there is the little code: 0x8392 mov eax,0x1f7 …
Esaïe Njongssi
  • 63
  • 2
  • 13
0
votes
1 answer

GRUB memory map gives me weird values

I am trying to use grub in order to get the memory map, instead of going through the bios route. The problem is that grub seems to be giving me very weird values for some reason. Can anyone help with this? Relevant code: This is how I parse the…
user12312423
0
votes
1 answer

How can i know that i have The Stack-Segment Fault somewhere?

It is my first time to see that when I push a value on the stack, the stack is still empty. I have thought maybe it is the kernel panic, so that i have added cli ; cld before calling the function but nothing. The example is when I want to call…
Esaïe Njongssi
  • 63
  • 2
  • 13