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

GRUB2 produces "multiboot header cannot be found" error when loading my kernel

I read GRUB Multiboot header not found but I cannot still load my kernel I tries to write the multiboot2 header directly in the .s file then link it. It is supposed to appear before all other segment: [kheader.s] .section .mbt2std tag_start: .long…
AlanCui
  • 137
  • 9
0
votes
1 answer

Character apparently doesn't get translated to its ASCII value in a C kernel

I'm developing a basic C kernel in a Kali machine and testing it inside QEMU. This is the kernel code: void kernel_main(); void print(); void print() { char* vidMem = (char*)0xb8000; *vidMem = "A"; vidMem++; *vidMem = 0x0f; } void…
0xPictor
  • 63
  • 6
0
votes
1 answer

Loading a bootloader function into kernel

I am trying to build a minimal kernel. But I am not sure how to load a function from my custom bootloader into the kernel. Can anybody solve this problem?
0
votes
1 answer

Mini OS: Linking the compiled & assembled .o files

I'm trying to set up a working environment for assembling a bootloader and compiling and linking a simple kernel according to this page: enter link description here So far everything went well, however I can't seem to work around this linker…
Janx
  • 3
  • 1
0
votes
1 answer

VESA graphics page flipping in protected mode

I am trying to figure out how the page flip in 32-bit protected mode. I run 0x4F0A and store the output table at 0x00008100. Would I be correct that the command to set the LFB location should be located at 0x00008102? Knowing this is the location…
Cal W
  • 167
  • 1
  • 14
0
votes
0 answers

undefined refrence to 'memcpy' linking for elf_i386

I am trying to link a c file for my custom kernel and I keep getting this error. This is my c file: #include #define TRUE 1 #define FALSE 0 void main() { char vmem_back_buffer[3932160]; char** vmem_descriptor =…
Cal W
  • 167
  • 1
  • 14
0
votes
0 answers

Why does int 3 causes general protection fault?

I am having trouble with the lab from the course MIT 6.828. The lab notes ask me to write a handler for debug breakpoint, corresponding to trap number 3. In the codes provided by the lab, there is inline assembly causing the interrupt directly like…
Yv Zuo
  • 391
  • 2
  • 8
0
votes
1 answer

How to enable x86 paging only in ring 3

I understand that setting the PG bit of CR0 enables paging in x86 and further all addresses generated will be logical and translated using page directories and tables. However I want that logical addresses be generated only for ring 3 and wish to…
0
votes
0 answers

Debug-print for loop omitting 1st value

I was debugging a low level program, I had to ensure that my array exp have all values I expect it to have. So I wrote a code snippet that prints my array to help debug it. Problem is standard library isn't available so I need to use my own…
user13387119
0
votes
2 answers

Why is this kernel causing problems?

I decided to try and write a C Hello world protected mode Kernel, and although directly accessing the video memory works to print characters manually, I decided to try to write a string, and there are no warnings or errors but it boots to a blinking…
A user
  • 94
  • 8
0
votes
1 answer

Hello Everyone, I am trying to cross compile bintuils on ubuntu for a custom OS, when i am compiling i get the error multiple target patterns. Stop

here is the error configure: creating ./config.status config.status: creating Makefile config.status: creating po/Makefile.in config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles…
0
votes
0 answers

Assembly: no such instruction `iretd`? What can I use instead? i686-elf-gcc

I have written a keyboard interrupt handler where in my ASM code I have an instruction iretd. When compiling the file, GCC returns an error saying drivers/kbd_hndlr.S: Assembler messages: drivers/kbd_hndlr.S:6: Error: no such instruction: `iretd' I…
0
votes
1 answer

Get keypresses at low-level

I am currently developing an operating system using the MOSA-OS compiler to compile CIL to machine code. Unfortunately, while developing an operating system it is not so simple to just "Console.ReadLine" to get input. Nothing from System.Console…
A user
  • 94
  • 8
0
votes
1 answer

Qemu restarts if I add a while loop in my kernel

I wrote a while loop that hangs when the keyboard controller is not ready: while(inb(0x64)!=0){ } However now qemu restarts everytime I attempt to boot the kernel. Sometimes I can see the vga output for a really short time. I tried to remove the…
Clement Poon
  • 79
  • 1
  • 6
0
votes
1 answer

Access ECAM on QEMU AArch64 virt device

I am trying to implement bare metal PCIE device discovery on QEMU AArch64 virt device. I know, that ECAM area is mapped to 0x3f000000 memory address, and I expect to see there this table. But when I perform a reading of 4 bytes (MCFG signature) from…