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

Reading directory contents in FAT32

I am trying to write bare metal FAT32 file system driver on RPI 3B. I am able to read FAT sectors and root directory sectors using emmc driver. I have doubt on how to follow FAT entries linked list when next entry pointer (next cluster number)…
zero
  • 150
  • 1
  • 16
0
votes
0 answers

How to link 2 files with different starting addresses with ld

I am trying to build a small os. I have an asm file that puts the processor in 64 bit mode with paging enabled. After this, i am jumping to my C code. I want the C code and asm code to be linked into the same file but the C code to have base address…
Cristi
  • 1
0
votes
1 answer

OSDev: Why my memory allocation function suddenly stops working in the AHCI initialization function?

After my kernel calls the AHCIInit() function inside of the ArchInit() function, I get a page fault in one of the MemAllocate() calls, and this only happens in real machines, as I tried replicating it on VirtualBox, VMWare and QEMU. I tried…
NTRO
  • 11
  • 1
0
votes
2 answers

8086 Reset vector above 20 bits with buses of 20 bits

How can the cpu fetch instructions from the address 0xfffffff0 ( CS_base : 0xffff0000 + IP : 0xfff0) if it's above the 1mb limit of the 20 bit bus? I understand that the cs register start with a base address of 0xffff0000 But i don't understand how…
0
votes
0 answers

Why doesnt my switch to 16 bit function written in assembly return to my kernel?

I am making a small operating system and I want to make stuff about video modes ( like getting vesa info, setting video mode ) and it is really hard to do so in 32 bit So I decided to switch back to 16 bit mode and I wrote some code that switches…
0
votes
1 answer

Switch to VESA/VBE?

So, I'm currently working on an OS, and I'm stuck in a very dumb situation : switching to VESA/VBE My current code : mov ax, 0x4F02 mov bx, 0x4118 int 0x10 It changes Qemu resolution, but now I have a problem with plotting pixels. The formula of…
Telno
  • 53
  • 2
  • 9
0
votes
1 answer

#GP on some ISRs, APIC and PIT not sending IRQs

I've been working on code to test the speed of the APIC using the PIT. There are several problems I can't figure out. First, when testing my ISRs for the two timers, I get general protection faults on the iretq instructions. Second, neither timer…
0
votes
3 answers

32 bit protected mode not working for several assembly files

I am writing a simple NASM assembly boot sector. The code should print text to the screen while in 16 bit real mode, then switches to 32 bit protected mode and prints text to the screen. I use QEMU as my CPU emulator, and it is printing the text…
Sawyer Herbst
  • 152
  • 3
  • 12
0
votes
1 answer

operand type mismatch for `out', 'in'

I have this function: uint8_t getcmosflpd(void) { uint8_t c; outb(0x70, 0x10); c = inb(0x70); return c; } When I compile it, I obtain this errors: /tmp/ccMmuD7U.s:28: Error: operand type mismatch for `out' /tmp/ccMmuD7U.s:39: Error:…
user10481362
0
votes
1 answer

How to map reset vector in xtensa architecture?

I am new to xtensa architecture and as the first step tried to map the reset vector. Google search took me to Uboot port of xtensa (https://github.com/jcmvbkbc/u-boot-tensa/blob/master/arch/xtensa/cpu/start.S), and following is the code; .section…
0
votes
2 answers

How to draw pixel on screen without BIOS?

I am writing an OS and want to have GUI. I can't find good tutorial for drawing pixels on the screen. I'd like to have some assembly + C example which I can build and run on some emulator like BOCHS or v86
pitust
  • 99
  • 8
0
votes
0 answers

Intel VT-x: physical and linear address space not matching

I am currently developing a x86-64 kernel from scratch for research purposes. The goal is to virtualize my own OS using Intels virtualization technology (VT-x). However I stumbled upon a xtremely strange problem which prevents me from continuing my…
CRoemheld
  • 889
  • 7
  • 26
0
votes
1 answer

A bootloader that I am making doesn't get any IRQ12

The computer in which I test my operating system is a laptop with a touchpad. When I power the computer on, it reads the keyboard, but after I touch the touchpad, it doesn't read the touchpad nor the keyboard either. And I also use qemu and on qemu…
Bolgeg
  • 41
  • 5
0
votes
1 answer

Reboot loop on trying to load kernel

When I try to boot on qemu I get an endless reboot loop, I was able to narrow it down the line call 0x1000 This is my first time delving into osdev and if there are any other things i'm doing wrong please inform me:) thanks in advance!! [org…
user9579100
0
votes
0 answers

C Kernel can't print string

I wrote a kernel to print hello world. but it's not working, hello world is not printed. assembly print is working well. I using GCC and NASM for cross compile and assemble. This is the my bootloader, second stage code and C code. [ORG 0x00] [BITS…
Parity
  • 11
  • 1