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

Intel flat memory model

In intel flat memory model, mostly 2 GDT indices are used always, CODE segment, DATA segment, Can I use more GDT indices in flat memory model. My requirement is to have one memory region with RO which is now in data segment.
martin
  • 1
0
votes
0 answers

Undefined Reference to "Main" When Building OS

I'm just working on a tiny simple OS, but I'm getting an error thrown at me. When I try to build I get this error: joseph@joseph-linuxmint ~/Desktop/os $ make test g++ lib/screen.cpp -o…
user5718553
0
votes
1 answer

Output to display with Rust bare metal

I'm following along with the Phil-Opp tutorials on creating an OS, and I'm trying to figure out how to control my display/screen, after having successfully gotten VGA output to work. How does one control the display? I'm assuming you have to write a…
Ben Gubler
  • 1,393
  • 3
  • 18
  • 32
0
votes
0 answers

How to install 16 bit version of libcc

$uname -i x86_64 $ uname -r 4.15.0-041500-generic I am trying to compile that gets memory map of a system. The OSDev shows some code how that can be done. The code is as follows: // running in real mode may require: __asm__(".code16gcc\n"); //…
0
votes
1 answer

Linkage of standard libraries in C++ code called from ASM

as I am developing my "OsDev" project, where I am learning a new stuff (for somebody who did not code in C/C++ for a long time due to web development it is kinda "new"). I figured out in the other thread, that calling a C++ function from ASM needs…
Ondřej Langr
  • 43
  • 1
  • 4
0
votes
0 answers

C++ printing string works in bootloader but not in kernel

I'm working on a simple real-mode OS in c++. I can't figure out how to print strings, though. The following code works when it's in the bootloader, but not when it's in the kernel. __asm__ __volatile__(".code16gcc \n"); __asm__ __volatile__ ("xor…
programmer
  • 743
  • 4
  • 10
0
votes
1 answer

Does ARM start in 16 bit real mode

A little bg - I just started OS Dev and am developing my own OS in assembly. So as I have learned, x86 processors and others that emulate them(AMD?) start in 16 bit real mode for boot process and then can switch to protected mode to further…
vigilante_stark
  • 159
  • 1
  • 6
0
votes
0 answers

Loading elf-i386 from my boot loader

I am doing operating system project, until now I have my bootloader running. I can load binary file using bios interuppt, but I am unable to load and call C function from ELF file format: Here is my C program that I want to finally execute: //build…
snehm
  • 223
  • 3
  • 13
0
votes
0 answers

Kernel throws GPF exception when booted with GRUB 2 instead of GRUB 0.97

I am trying to switch from GRUB 0.97 (stage2_eltorito) to GRUB 2, generating an ISO image that boots the operating system. However, I am facing a peculiar error. Just to give some context, I have recently set up some exception handling ISRs and two…
0
votes
0 answers

Assembly Performance Optimization

I'm currently developing my own Operating System known as the ArkOS. Until now, I've been placing all of my assembly functions into my bootloader and just linking them using GCC. I've started on the interrupt handling which, needless to say,…
Noah Wood
  • 1
  • 2
0
votes
1 answer

Any attempt to put a string to the screen in Protected Mode causes reboot

I have just recently gone into Protected Mode when developing an OS from scratch. I have managed to get into C and make functions to print characters to the screen (thanks Michael Petch for helping me reach this stage). Anyway, whenever I try to…
0
votes
1 answer

Trouble printing text with a set_pixel function in GOP graphics (UEFI)

Actually I have an .efi application (intended to be a very early kernel) that set-up graphics along with other things, I use this graphics to make a "set_pixel" function, and a few days ago I had the need of printing text. After a few days of…
Rottenheimer2
  • 425
  • 1
  • 5
  • 13
0
votes
0 answers

Switching to (un)real mode, reading disk and switching back to protected mode

My question is quite a bit theoretical, but I want to implement disk r/w to my Operating system, while I know how to do it in protected mode, it would take too long to implement ATAPI+ATA+FDC drivers (to make my OS boot on any device). I took two…
Kamila Szewczyk
  • 1,874
  • 1
  • 16
  • 33
0
votes
0 answers

gcc run asm in real mode (kernel development)

I have been following the Osdev wiki, and I'm trying to follow their "inline assembly" page. I want to use BIOS in my code, but when I try, it crashes the kernel and returns to the bootloader (which is grub). I think this is because it's running in…
programmer
  • 743
  • 4
  • 10
0
votes
1 answer

Why isn't BIOS call AH=0xB, BH=0x00 of INT 0x10 working here?

I have just followed the bootloader development guide on the MikeOS website, and I have understood the code so far. I am trying to add a few extra routines to the bootsector, notably changing the background colour to BIOS colour 0x1. However, the…
Safal Aryal
  • 155
  • 1
  • 8