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

Video Output in Protected/Long Mode

I have a question about plotting pixels on screen in protected/long mode and video generation is OS in general. How I can display something on screen in high resolution, such as 19201080, or better for me, in 16801050 ( because of my little bit old…
user14629769
0
votes
1 answer

Making a FAT12 filesystem on a simple (operating system) file on linux

I want to create a FAT12 filesystem on a simple file on linux (Example: ~/file), and perhaps use xxd to view what exactly happens when a filesystem is created. This is just out of curiosity I believe that we can use the mkfs command or something…
Suraaj K S
  • 600
  • 3
  • 21
0
votes
0 answers

Assembly code for switching tasks in kernel inconsistently crashing

I am trying to implement multitasking within my OS and I'm running into a problem where my task switching code causes the OS to crash, sometimes from QEMU trying to access out of bounds memory, and sometimes from an Invalid opcode (with eip getting…
Menotdan
  • 130
  • 1
  • 11
0
votes
1 answer

"Relocation truncated to fit" when attempting to code a barebones 64-bit kernel

I'm trying to follow the OSDev "Higher Half x86 Bare Bones" tutorial (after having done it multiple times) and modify it to send the kernel to the higher half of the PML4 as opposed to the higher half of a 32-bit page table. The reason being because…
realkstrawn93
  • 722
  • 1
  • 6
  • 13
0
votes
2 answers

How to manage paging in assembly/C kernel?

My project is to execute my own JVM on a little piece of kernel that i'm trying to code in C and assembly. So, I'm still learning how do the kernels do their main jobs. Now, following some guides, I set up the paging .map mov eax ,…
Frank Soll
  • 420
  • 1
  • 4
  • 15
0
votes
0 answers

0x98FA2 Unknow function in memory with QEMU

I'm debugging a 32bits operating system, and to do it I'm using QEMU+GDB. I'm trying to discover in which moment the code makes an INT 16 to get the keyboard buffer. I isolated the function that does this, but I can not understant how it does…
user1814720
  • 93
  • 1
  • 8
0
votes
0 answers

How can I read/write to a floppy drive or ATA drive from bare C(no libraries) in my own OS?

I'm making my own OS from scratch, called "bnbzb OS". I just managed to check if any floppy drive or ATA drive is present, and check the size if it's a floppy drive. I now want to actually read/write contents from the ATA drive or at least a floppy…
0
votes
2 answers

How to fix: "Disk Read Error" in my bootloader

I am using Windows 10 and Windows subsystem for linux. I have started creating my own Operating System in Assembly and C. I am following a tutorial. I got stuck into 2 problems. Error 1: When I Link and create bin files, i am getting a warning: "ld:…
user12212389
0
votes
1 answer

Coding C libraries for an Operating System

I am trying to create a DOS-like OS. I have read multiple articles, read multiple books (I even paid a lifetime subscription for O'Reilly Media), but to no avail, I found nothing useful. I want to learn how to make operating system libraries, which…
Joe
  • 415
  • 1
  • 5
  • 15
0
votes
1 answer

Cannot assign values to a struct pointer, after pointer was successfully assigned

I am writing an early kernel heap to manage some memory allocations before the final heap is operational. When I assign an address(not used by anything else) to my struct pointer it works, the problem comes when I try to assign values to the struct…
Blackburn
  • 48
  • 4
0
votes
1 answer

How Do I Put My Bootloader And Kernel On A USB

I've written a bootloader and Basic kernel as a fun side project while i'm learning 2 stage bootloaders, I want to load my bootloader at sector 1 (or the MBR) of the USB and the Kernel at sector 2. I've compiled both into Bootloader.bin & Kernel.bin…
0
votes
1 answer

Why do keyboard interrupts work in QEMU, but not on real hardware?

I have my own OS that I am working on, and I have asked a few questions on before. Currently, the OS works perfectly fine on QEMU, but on real hardware (Tested on an old AMD athlon64 system with IDE drives, and on an intel core i5 system), it fails…
Menotdan
  • 130
  • 1
  • 11
0
votes
1 answer

Writing disk sector, numbers of sectors to write question

I'm trying to create my own very basic OS and I'm trying to figure out how writing and reading for a disk works. I'm using this website as a reference. Why does AL goes up to 128 if the number of sectors per track is 17? If I set AL to 20, CL to 1…
Kyle
  • 23
  • 1
  • 4
0
votes
0 answers

memmove in osdev meaty-skeleton: why does it have these if/else statements?

In the os-dev meaty skeleton tutorial this is the implementation of memmove: #include void* memmove(void* dstptr, const void* srcptr, size_t size) { unsigned char* dst = (unsigned char*) dstptr; const unsigned char* src = (const…
Adham Zahran
  • 1,973
  • 2
  • 18
  • 35
0
votes
1 answer

how can i display a number in my boot sector

I'm trying to display a number on my boot, but nothing is displayed. In fact I'm trying to determine the memory size from int 12h, have I done something not normal? that's my boot code : bits 16 org 0x0 jmp start %include…
ledoux
  • 91
  • 9