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

On x64, how does the Linux kernel access the data segment? Does it use -mcmodel=large during compilation?

I'm writing a minimal x86-64 kernel from scratch and I am having some design issues. From the comments and the link provided by stark I decided to rephrase my question. I want to take example on the Linux kernel to design my own kernel and would…
user123
  • 2,510
  • 2
  • 6
  • 20
0
votes
0 answers

Pressing a key causes Triple Fault

As was said in the title, when I press a key, (thereby triggering IRQ 1, interrupt 33) it causes a triple fault and resets. I'm fairly sure this has something to do with the way I set up my IDT or how I initialize the PIC, so I'll give the code for…
NickKnack
  • 119
  • 1
  • 8
0
votes
0 answers

Choosing output mode

I am new to OSDev, and I am currently trying to write my OS from bare bones, i.e. using GRUP as my bootloader, on x86 arch. I want my OS to support both BIOS and UEFI boot. I am currently trying to write my own graphical interface. And I am kind of…
user6035109
  • 323
  • 2
  • 7
0
votes
1 answer

Long mode external interrupt causes #GP fault

I am trying to write a long mode guest program under hypervision. When I inject an external interrupt to the guest, the guest immediately triggered a #GP fault. The error code is 0x11, indicating that cs selector is 0x10, and that this fault is…
user10328353
0
votes
0 answers

System boots on QEMU but panics (restarts) on real hardware

I switched form CBS to LBA in my bootloader, that loads a kernel after ata_lba_read in 32-bit mode Before this moment, I always tested my system with QEMU, and it worked (and works) perfectly there. Now I decided to try booting a system on a real…
NotMyCode
  • 11
  • 3
0
votes
1 answer

Sending enable interrupts (0xF4) command to ps2 keyboard results in system crash. OSDEV

I have just finished initializing the IDT and started the ps2 stuff. I got the ps2 controller initializer and now I want to enable the interrupts in the first ps2 port or the keyboard. Here is my code for initializing the ps2 controller: uint8_t…
0
votes
2 answers

How can I copy an existent BPB and put it in my bootloader code

I am currently working on a simple operating system (GitHub: https://github.com/Nutty000/PlanetOS) I would like to make the os work on real hardware, but I am having trouble doing it because of the file system... I want my OS to be based on the…
Nutty
  • 33
  • 6
0
votes
2 answers

write videosystem in fasm assembly

i am writing an os in fasm assembly and faced with problem - bios videoservices works too slow. i already published similar question, but it is more that questin type as "how to write pixel to videomemory", now i have to draw some geometrical…
0
votes
0 answers

how to build an uefi application using c++

i tried compiling #include #include #include EFI_STATUS EFIAPI efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) { InitializeLib(ImageHandle, SystemTable); Print(L"XENON OS VER 0.02"); for(;;)…
Elhadede
  • 9
  • 4
0
votes
1 answer

Why doesn't input_msg print?

I am writing a small 16-bit OS and I am wondering why input_msg doesn't print the expected output. I am using the BIOS teletype print interrupt and also getting user input and stosb-ing it in input_msg. At least that's the intent. kernel: bits…
D_Man
  • 11
0
votes
1 answer

Why doesn't lodsb work after bootloading into the kernel?

I'm trying to make a custom OS just for fun but have encountered an issue where my print_str code doesn't work after loading in the kernel from the bootloader. There are no compiler warnings and I can print char's. Instead of printing what I want it…
D_Man
  • 11
0
votes
0 answers

Disable text cursor in custom terminal in C

this might already be answered somewhere, so would appreciate a link if so. I have successfully enabled a blinking cursor on my OS terminal (linux-based) using the following method: #define FB_CMD_PORT 0x3D4 #define FB_DATA_PORT …
zhn11tau
  • 205
  • 3
  • 10
0
votes
0 answers

Stack error when calling asm routine from C code

I am using a cross compiler (target elf-i686), and using the following codes: [bits 32] global _printcool global _wait _printcool: mov byte [0xB8000], 'R' mov byte [0xB8001], 0x52 add esp, 4 ; <-- Tried to remove it, nothing changes ret ; <-- If…
0
votes
1 answer

Why are my page tables not mapping the right physical addresses?

I am writing a small x86-64 kernel booted with UEFI. I think there is something I overlook in the code and I can't figure out what it is. I am trying to page the xHCI BAR in my higher half kernel. I've got this small code snippet which is supposed…
user123
  • 2,510
  • 2
  • 6
  • 20
0
votes
0 answers

Unknown problem in os development (perhaps the emulator is possessed?)

I'm currently developing a boot manager for my own os, I divided the code into some modules but something strange happens. Each module works individually, but as soon as I link them together the emulator (Qemu) begins to reboot, to show random…
cam0347
  • 23
  • 3