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

What happens in the CPU and its registers after dividing an integer by zero?

I am learning how to program an operating system on the x86 architecture. The CPU throws an interrupt when it tries to divide by zero, the interrupt has to handle this, if not the system crashes (at least on Virtualbox). So I am wondering what…
0
votes
1 answer

Machine crashes when trying to shutdown in Assembly and C

I created an assembly file that shuts down the computer, along with some C code. When I try linking with ld. It worked Also, here's the code that does that: # set flags to 0 .set FLAGS, 0 # set magic number to 0x1BADB002 to identified by…
FastDeveloper
  • 367
  • 5
  • 15
0
votes
1 answer

I am trying to use a function in Assembly, but it wont work

I am trying to make a basic OS with assembly. But this doesn't work. I don't know why. I'm a beginner by the way. The thing I want to do is to have print_string, use the function to print out boot_string. Code: BITS 16 start: mov ax, 07C0h …
Arencos
  • 11
  • 3
0
votes
1 answer

OS resets on far jump after disabling paging

I'm working on modifying a routine that switches to and from realmode to perform a BIOS interrupt, but running into issues with paging. I had it working prior with no paging, but now that my OS uses paging, I need to disable it before entering…
23scurtu
  • 138
  • 10
0
votes
2 answers

How do operating systems isolate processes from each other?

Assuming the CPU is in protected mode: When a ring-0 kernel sets up a ring-3 userspace process, which CPU-level datastructure does it have to modify to indicate which virtual address space this specific process can access? Does it just set the…
2080
  • 1,223
  • 1
  • 14
  • 37
0
votes
0 answers

Getting a custom OS to boot on Virtualbox

I’m currently developing an operating system for a class. The OS boots fine on both real hardware and QEMU. However, I need it to boot on either Virtualbox or DOSBox as I’m working on getting Soundblaster 16 support working. I need to use direct…
Alex
  • 724
  • 1
  • 9
  • 24
0
votes
1 answer

Identity mapping dosen't work after enabling paging

I try to implement my own OS, and now I try to implement paging mechanism. I created a page directory, and created identity mapping of the kernel code. However, after storing the physical address of the first page table and enabling paging, my code…
0
votes
2 answers

What are the "STANDARD SYSTEM DIRECTORIES" that gcc refers to? (On a unix like system)

I've been exploring compilers and cross compilers. I'm reading the GCC manual. Specifically, there are these statements in the manual that I have queries regarding: The linker searches a standard list of directories for the library. The directories…
Suraaj K S
  • 600
  • 3
  • 21
0
votes
1 answer

Subtleties dealing with cross compilation, freestanding libgcc, etc

I have a few questions about https://wiki.osdev.org/Meaty_Skeleton, which says: The GCC documentation explicitly states that libgcc requires the freestanding environment to supply the memcmp, memcpy, memmove, and memset functions, as well as…
Suraaj K S
  • 600
  • 3
  • 21
0
votes
0 answers

i686-elf-gcc produces 64-Bit file instead of 32-Bit?

I was following the osdev barebones tutorial and made a custom Makefile to it, but when I ran make kernel to compile the system into a .bin file, I ran into an error while linking. Linker output: src/kernel.o: file not recognized: file format not…
0
votes
1 answer

Virtualbox debugging -- g: error: The VM is already running

I'm trying to debug an operating system that I am developing. When I start up the VM machine with VirtualBoxVM --startvm "X" --debug the VM starts paused, but when I execute the 'g' command to continue execution I get this error: g: error: The VM is…
Adrian
  • 1,558
  • 1
  • 13
  • 31
0
votes
1 answer

Triple fault with higher-half kernel and interrupts

I am developing a tiny operating system for learning purposes (code here: https://github.com/davidedellagiustina/ScratchOS). I have a higher half kernel running at 0xc0004000, mapped to physical 0x4000. The default page directory maps this area…
0
votes
1 answer

OS development - page fault handling and disk driver

I am currently developing a tiny operating system for learning purposes (see here for the code) and I am currently tinkering with paging and memory management. For handling page faults, I understand I'd need some kind of disk driver in order to…
0
votes
1 answer

Viewing the exact memory range that a linker 'uses' for a executable binary

I am doing a bit of OSdev, and I've been trying to implement memory management in my kernel. I have started off with a physical memory manager (this is a 32 bit OS). The idea is to keep a table of bits where we allocate a bit per 4K physical memory…
Suraaj K S
  • 600
  • 3
  • 21
0
votes
1 answer

how to get exfat root directory in assembly?

Does any one know how to get the root directory for an exfat for a boot sector ? I have done many hours research and what I have found does not work. Things tried: Rootdirectory = RootCluster * SectorsPerCluster + ReservedSectors; FAT first sector…