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

ld: cannot perform PE operations on non PE output file 'Kernel.bin' (MinGW)

I looked for a solution to this a lot, but I didn't find anything helpful. I'm making an OS with assembly and added C++ code. I made a file that links everything named "compileasm.bat": nasm bootloader.asm -f bin -o bootloader.bin nasm…
alex12
  • 36
  • 4
0
votes
1 answer

How can I check xcr0 register in QEMU session gdb?

I want to check the register value of my QEMU session in gdb. Currently, I cannot use qemu monitor due to I use -nographic. (I know there is option such as -mon :serial but currently I cannot enter to the qemu monitor with some other unknown…
JHAhn
  • 91
  • 8
0
votes
1 answer

NASM: Invalid effective address in Real Mode

I am trying to draw to screen in Real Mode, so I am trying to access 0xB8000 using segmentation My assembly code is this [BITS 16] org 0x7c00 begin: mov ah, 0x01 ; disable cursor mov ch, 0x3f int 0x10 mov ch, 0x0000 mov cs, 0xb800 mov…
frogstair
  • 444
  • 5
  • 20
0
votes
0 answers

Unable to pass arguments and recieve them assembly. OSDEV

I am trying to write my own OS, I currently am trying to pass the video framebuffer address to my kernel so that I can start plotting pixels and etc. However, when I try and pass my arguments to my kernel entry the argument doesn't get passed. I…
0
votes
1 answer

Cache configuration for DMA device access on ARM Cortex-A72

I am writing an operating system for the raspberry pi. I have a problem with the sdcard driver for the custom sdhost controller (emmc2) of the raspberry-pi 4 (Cortex-A72, ARMv8-A, bcm2711 chipset). Without using sdma everything works. With sdma,…
ErwinP
  • 402
  • 3
  • 9
0
votes
1 answer

what is wrong in this assembly function to make idt entries?

i was writing a simple bootloader in assembly and testing it on qemu. i needed an idt and wrote a function to make entries. idk what is wrong here- please check- makeidt: ;privilage level in cl ;index to a gdt entry in ax ;handler function pointer…
Sasidhar
  • 3
  • 3
0
votes
0 answers

How to go from an assembler real mode source code to a bootable flash drive and optical disc?

I'm learning Operating System programming and I would like to try my programs/codes on a physical machine instead of virtual ones. I tried the simplest real mode program (show below): jmp $ ; will loop forever times 510-($-$$) db 0 ; padding dw…
Paiku Han
  • 581
  • 2
  • 16
  • 38
0
votes
0 answers

Adding kernel image to bios binary

So years back my high school computer science teacher was going on about that games from the early days could "now" be fitted on a bios chip. Later decided to study engineering thanks to that guy. A bunch of years passed, bios flash chips got bigger…
meME
  • 1
  • 1
0
votes
1 answer

OS X, gcc, x86, segmentation, paging, seg fault, bus error

In the case of osx, gcc, modern x86: How is the x86 segmentation h/w and paging h/w used?
grok12
  • 3,526
  • 6
  • 26
  • 27
0
votes
2 answers

How do I install x86_64-elf-ld on ubuntu 20.04?

I am trying to write an OS kernel and I need a certain dependency for compiling the assembly to an iso binary. The dependency is x86_64-elf-ld. I cannot find any resources for installing it on ubuntu online so I thought I would ask the internet.
Lambda Banquo
  • 81
  • 1
  • 5
0
votes
0 answers

why booting APs needs an indirect call in the mit6.828 example OS kernel?

I'm studying mit6.828 course, I don't understand why it must indirect call when booting APs in lab4. I try to direct call call mp_main(source code: movl $mp_main, %eax; call *%eax), but it causes triple fault. Here is part of the source…
snow rw
  • 11
  • 1
0
votes
1 answer

Why after enable paging specific address is not available?

I just want to fully understand how paging works on practice. part of my code for paging: .section .bss .align 4096 p4_table: .skip 4096 p3_table: .skip 4096 p2_table: .skip 4096 and more code: set_up_page_tables: movl $p3_table,…
JustOneMan
  • 231
  • 1
  • 9
  • 34
0
votes
1 answer

Arm64 - Absolute branching generating exception

Jumping to a C function using its absolute address (0x80904) in 64arm with BLR fails: LDR x3, =0x80904 SUB x0, x3, x19 BL print_x0 // Prints something to uart, i.e, x0 == x19 BLR x19 // Fails! The address is good: BLR x3 works. x19 value is not…
A F
  • 25
  • 5
0
votes
0 answers

I want to compile my code to 32 bit systems and have the following make file, how do I make it right?

So, I got this Makefile from a git repository and it compiles the source code that came with this correctly. The project is for an Operating System from scratch. This Makefile is for a 64-bit OS tutorial. I'm currently learning about 32-bit…
0
votes
1 answer

Print the contents of the CR0 register

I am making my own bootloader which switchs to protected mode(32-bits) and then prints the contents of the CR0 register (the one used to turn on protected mode). I need to write the program on assembly. mov esi,hello mov ebx,0xb8000 .loop: …