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

Extended ASCII characters are printed in yellow instead of white - OSDev

I am developing an OS kernel. I am facing a problem while printing extended ASCII characters to the screen. When I try to print characters on the screen the general ascii characters are printed well in WHITE color easily. But when I try to print the…
Anish Sharma
  • 314
  • 3
  • 18
0
votes
0 answers

Linear addressing and the GDT

I struggle to setup the GDT and to switch to protected mode. Mostly because i didn't understand linear addressing well enough. Here is my kernel code (kernel.asm): jmp main %include "gdt.inc" main: call InstallGDT cli mov eax,cr0 or eax,1 mov…
albert
  • 113
  • 1
  • 12
0
votes
0 answers

Linker script location counter invalid value

I am writing a linker script as: SECTIONS { . = 0x100000; .phys . : { *(.phys.text) *(.phys.data) . = ALIGN(4K); } .phys.bss . (NOLOAD) : { boot_stack_bottom = .; . = . + 4K; …
amrzar
  • 355
  • 6
  • 22
0
votes
2 answers

Is it possible to develop an operating system without a pre-existing one?

What I mean by this is if I have an "empty" computer (nothing in the disk) can I develop a program or more specifically an operating system without first installing a pre-existing one? The question seems to be an obvious no as you need a…
Xcode23
  • 161
  • 2
  • 7
0
votes
0 answers

Assembly code just prints spade onto screen

It seems that I may be here a lot over the next couple days... :) My code is as follows and works for BOCHS x86 emulator -- BOOT.ASM -- [org 0x7c00] mov dx, 0x7c00 call printhex mov bx, printthistoo call printaddr jmp $ %include…
Kyle G
  • 35
  • 1
  • 6
0
votes
1 answer

How to call a C function from Assembly code

I am having trouble converting from Assembly code to C. I have somehow loaded my kernel by placing it after the padding in the second stage bootloader and increasing the number of sectors to load in the first stage bootloader. As you can see…
amanuel2
  • 4,508
  • 4
  • 36
  • 67
0
votes
0 answers

Circle CI: ld: i386 architecture of input file is incompatible with i386:x86-64 output

I am trying to use Circle CI(github auto build/testing) to build my operating system for i386(32bit) and Circle CI seems to use 64 bit. Normally i use a pre compiled cross-toolchain but my code can also compile on a plain 32-bit linux gcc... The…
grantperry
  • 139
  • 4
  • 18
0
votes
0 answers

How to implement Dynamically Growing Heap

Finished implementing the minimal Heap structure with awesome help from Micheal . Right now I have one thing missing so it dynamically grows. As you can see in this image, it isn't dynamic: Instead of having a fixed size when I do…
amanuel2
  • 4,508
  • 4
  • 36
  • 67
0
votes
0 answers

Heap Gives Page Fault

I am now getting a page fault which means i am accessing an invalid address. This is most likely to the higher half kernel design i chose to follow. But i could not see where it leads to a page fault. Here is my kernel.c++ #include…
amanuel2
  • 4,508
  • 4
  • 36
  • 67
0
votes
1 answer

Cant display Upper and Lower Memory

The OS Dosent display the upper and lower memory for some reason. As you can see here in Detecting Memory Wiki : http://wiki.osdev.org/Detecting_Memory_(x86)#Memory_Map_Via_GRUB , it says Refer to mbd->mem_lower for conventional memory (e.g.…
amanuel2
  • 4,508
  • 4
  • 36
  • 67
0
votes
0 answers

Triple Fault While Enabling Higher Half Kernel

I get a triple fault when i try to enable Higher Half Kernel in my OS. Basically this is my linker.ld: /* The bootloader will look at this image and start execution at the symbol designated as the entry point. */ ENTRY(loader) SECTIONS { /*…
amanuel2
  • 4,508
  • 4
  • 36
  • 67
0
votes
1 answer

IRQ Handler Triple Fault

Currently my IRQ is triple faulting and giving the division by 0 error. Here is the viedo i recorded that will so show you this in action. irq.c++: #include "irq.h" #define PIC_MASTER_CONTROL 0x20 #define PIC_MASTER_MASK 0x21 #define…
amanuel2
  • 4,508
  • 4
  • 36
  • 67
0
votes
1 answer

If the present bit is set for an entry in a process's page table, what does that mean?

Does it mean that the referenced page is within the logical address space of the process? I was thinking maybe also that the referenced page is memory resident?
Waffles
  • 123
  • 2
  • 10
0
votes
1 answer

An amazing phenomenon when I call a function to print a character

I'm developing my own operating system. I have completed the boot sector and loaded my kernel successfully. My development environment is Ubuntu 14.04 and GCC 4.8. My kernel will run under BOCHS. I wanted to print a specific character in a specific…
0
votes
1 answer

Developing a custom filesystem for an operating system

I am developing an operating system using C, Assembler and the GCC Cross Compiler. I have already implemented a working kernel that prints to the screen and allows the user to type in some simple commands. I have already looked into some file…
Razor
  • 1,778
  • 4
  • 19
  • 36