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
0 answers

How to print Spanish characters on VGA text mode framebuffer?

I am writing my operating system - english-spanish translator for x86 architecture. I write the OS kernel in C language (and use gcc compiller), I do not have a standard C library. And I can't figure out how to output Spanish characters that are not…
Slavan
  • 1
  • 2
0
votes
0 answers

UEFI (UGA) Graphics After exiting Boot Services

I was writing an Operating System and testing it on an emulator in my primary computer (HP Z420), i tested it sometimes on that computer but i was always in a boot/shutdown loop that taked a long time. So i had an old pc (HP 620) Which has an old…
git_lk1
  • 76
  • 1
  • 8
0
votes
1 answer

How can a 32-bit APIC ID fit inside 4 bits out of an 8-bit IOAPIC destination field?

Reading both the OSDev Wiki article and the Intel documentation about the two different available APIC types that said article links to left me with more questions than answers, specifically when it comes to the length of the fields. According to…
realkstrawn93
  • 722
  • 1
  • 6
  • 13
0
votes
0 answers

Why "GCC" ignores -fno-pic for assembly code

I'm writing an OS and I want to switch to long mode. The problem is that my cross compiler (x86_64-elf-gcc) is generating position independent code even if I pass the -fno-pic option. boot.S /* boot.S - bootstrap the kernel */ /*…
R0M2
  • 1
0
votes
1 answer

Is it possible to implement paging without segmentation? x86

I've been told that segmentation is required for paging, why is that? AFAIK most systems with UEFI will start in long mode which I assume would not require segmentation at all?
user16469617
0
votes
2 answers

Loading a custom kernel causes VM to constantly reboot

I am working on a custom 32-bit OS, and i have coded a bare bones bootloader. I am trying to make it load a simple kernel that puts a char onto the screen, however, instead of getting the char i get a triple fault (maybe?) I've tried increasing the…
Nutty
  • 33
  • 6
0
votes
0 answers

Kernel crashes when writing to VESA framebuffer after loading IDT

I am writing to the framebuffer provided by the grub multiboot, everything is fine until i initialize the interrupt descriptor table, after that when trying to write again to the framebuffer the kernel crashes. (the interrupts works fine, like the…
Claudiu HBann
  • 56
  • 1
  • 9
0
votes
1 answer

How to check if the CapsLock key is pressed? using C code or assembly

I am programming an operating system and I want to handle the instruction. The code prints to the screen the letters pressed but I don't know how to check if the CapsLock key is pressed. I assume there is a port that contains its state. I have a…
Yuval akav
  • 11
  • 1
0
votes
0 answers

Run code if JMP instruction fails in NASM?

I'm writing a bootloader and was thinking about how to jump to the kernel. I saw that people use jmp 0x8000 (or whatever address the kernel is at) in order to load it. but if the JMP fails for whatever reason (like there being nothing at the kernel,…
0
votes
0 answers

undefined reference to `main' while linking with i386-elf-ld

I followed a tutorial series to program an operating system myself. But then while trying to cross compile c++ and asm I got this error message: i386-elf-ld: kernel_entry.o:(.text+0x1): undefined reference to `main' i386-elf-ld:…
Teer 2008
  • 79
  • 1
  • 7
0
votes
0 answers

Trouble enabling paging in simple kernel written in NASM

I am writing a basic kernel to learn and am having difficulty enabling paging, so that I can work in long mode. I slimmed down my code for simplicity. boot.asm: ;================================================== ; Entry point. ; ; In this file, we…
Oliver
  • 1,465
  • 4
  • 17
0
votes
0 answers

Why does my OS stagnate after calling this function on Linux, but works on Windows?

I'm writing a basic operating system - I've written the boot sector and switched the CPU to 32-bit protected mode, enabling me to write the code in C rather than assembly. In C, I've written a basic screen driver and have successfully loaded the…
0
votes
1 answer

Can't create a relocatable pe file with cl that generates a ".reloc" section

that's my first question on stack overflow. I'm writing a kernel, and I'm looking for running drivers. The kernel can run some simple user applications in pe32+ format that loads on a fixed virtual address, however i need to load drivers in kernel…
user18173712
0
votes
1 answer

next sector of NASM bootloader is not loading when using LD

I am trying to create a bootloader that allows rust code to be bootable, but i am very new to OS dev, makefile, and assembly, and I'm still an amateur in Rust. I'm trying to use int 13h (ah 0h2) to read the next sector and execute that assembly code…
0
votes
3 answers

Iterating over string returns empty in c (os development)

I was making an os, or atleast trying to, but I stumbled upon a problem. While trying to iterate over a string to convert to char to print to screen, the returned char seemed to be empty!(I am actually new to os development); Here is the code…
avgkid
  • 3
  • 3