Questions tagged [osdev]

Operating System development: kernel, shell, networking, cross-compiling, etc.

Filter by
Sorted by
Tagged with
0 votes
0 answers
18 views

Confused about memory holes

I'm trying to make a small 64-bit kernel (x86), and i recently found out about memory holes, but even after googling for a while i couldn't find all the answers i wanted. If i understand it correctly, ...
Mister J's user avatar
0 votes
0 answers
20 views

Implementing a passthrough file system (fuse-fusepy)

I want to create a filesystem that will hold both clear and encrypted versions of each file. It will then serve one or another depending on user authentication. I'm using fusepy for this. I'm starting ...
dMight's user avatar
  • 19
1 vote
0 answers
52 views

Crash when enabling Interrupts while using an Interrupt Descriptor Table

My qemu emulation just crashes after running init_idt() and then enable_interrupts(). I cant find the error, did i setup the IDT wrong or am i missing something. I am in 32bit protected mode on a x86 ...
Endrix's user avatar
  • 11
0 votes
1 answer
120 views

OSDev -- double buffering rebooting system

Hello I'm trying to make a simple os, and I'm currently trying to do double buffering. I have two arrays in the size of the screen and a function that copy the array that currently is being used to ...
neta cohen's user avatar
0 votes
0 answers
34 views

RPI4B bare metal RNG

I am working on a bare metal operating system for the Raspberry Pi 4B, and have run into a bit of an issue. I need a random 64bit number to use as a guard value for the stack smashing protector. I ...
StckSmsh's user avatar
0 votes
0 answers
55 views

How to draw on the screen without VESA, GOP, UGA

I recently took up osdev, and I had a question. How to draw a basic Windows and Linux video driver on the screen, regardless of the type of boot (UEFI, BIOS). I want to write something like this, and ...
user22945662's user avatar
0 votes
1 answer
105 views

How to fix Disk Read error when trying to read sector

I am following this tutorial on building a simple operating system. My problem is it calls a disk load function, and when I boot it up, it gives me a Disk read error. Here is my boot_sect.asm code: [...
coder's user avatar
  • 45
1 vote
0 answers
72 views

Making a serial mouse handler in x86 assembly

I've found Making a mouse handler in x86 assembly and the code works in qemu but not in pcem or 86box. I've noticed that pcem and 86box have the word serial after the device name so I'm assuming that ...
robertapengelly's user avatar
1 vote
1 answer
94 views

Can't setup GDT on Multiboot (Triple fault?)

i am trying to setup GDT from my simple kernel that uses multiboot and i don't know what's happening (i think it's triple fault). when using the qemu monitor trying to debug it but i didn't success ...
Tunify Domains's user avatar
0 votes
1 answer
36 views

Can you make an operating system which would support programs written for another operating system

If you were to make your own operating system, and make the syscalls "the same" as those of another operating system, would you be able to run programs made for that operating system ...
StckSmsh's user avatar
0 votes
0 answers
117 views

How to detect when a key is pressed?

I am using elf-gcc (x86_64) and I already have a working operating system that writes some text to the screen. As I would like to create commands that do simple actions I need to detect when the user ...
mine_greg's user avatar
0 votes
0 answers
39 views

Why keyboard IRQ number is exactly 1?

I just very much wonder if this is the number set to stone, Is it standard that everyone must follow? As I can understand it's caused by the fact that it's connected to first interrupt line in the PIC....
Zhiburt's user avatar
  • 65
1 vote
0 answers
36 views

SMBIOS 3 Get Structure table address and number of structures

I'm coding an standalone smbios library. Following the standard 3.6.0 by DMTF. See edit for a partial answer (Unsure if it is optimal) It works just fine for SM tables (32 bits) but I can't seem to ...
Tretorn's user avatar
  • 375
0 votes
0 answers
43 views

Python.h: #error unknown multiarch location for pyconfig.h, for i686 gcc, what can I do about it?

Using Python.h, I am calling a function from my Python file, arsenic.py, using C. I use i686-elf-gcc to compile this C file (trying something crazy, so I cannot change this). Then I encounter these ...
Muhammed D. Yüksel's user avatar
0 votes
0 answers
73 views

Not able to write to Videobuffer in own OS

I started writing a small OS and at the moment I don't have any build problems and it looks like everything is working, just something isn't working. I go into video mode in the bootloader and then ...
Fab boy's user avatar
  • 49
0 votes
0 answers
29 views

My os is not printing out characters to the screen [duplicate]

My kernel is not printing characters onto the screen. This is my boot.asm file: global _start section .text _start: ; Set up the stack mov esp, 0x90000 ; Load the kernel mov ah, 0x02 ...
bessieTheBoy's user avatar
0 votes
0 answers
26 views

Cant find -lgcc_s when compiling C-Code in an docker container

I am working on my own OS but when compiling I am getting the following errors: /usr/bin/ld: cannot find -lgcc_s /usr/bin/ld: cannot find -lgcc_s /usr/bin/ld: cannot find -lgcc_s collect2: error: ld ...
Jake420's user avatar
0 votes
0 answers
18 views

The linker is not linking the C and asm object files [duplicate]

I'm working on an OS and I'm trying to get it to load. I have a dummy kernel for now, and I'm trying to get my bootloader to load it im using a make file to do it faster and it keeps giving the same ...
Minecraft Teen's user avatar
0 votes
0 answers
53 views

Can't build OS image with Scons. Where i made mistake? [FIXED]

i'm trying to studying in OS development but now have some troubles with SConstruct scripting. First at all, i'm follow the YT tutorial of OS development. (Link: https://www.youtube.com/watch?v=...
j1sk1ss's user avatar
  • 41
0 votes
0 answers
55 views

Bootloader doesn't seem to be loading the kernel, but also doesn't send any errors

I made a bootloader in assembly but it doesn't load the kernel, it also won't display any errors. My bootloader is as follows: org 7C00h ;start at bits 16 ;16bit real mode %define endl 0Dh, 0Ah jmp ...
Golden Star's user avatar
0 votes
0 answers
40 views

Osdev linker multiple defintions inside docker error

I was planning on working on my os after a long break. Back then I was working on a amd64 system so no issues building, but now since im working on my m1 mac I have to use docker. Suprisingly i still ...
amanuel2's user avatar
  • 4,528
0 votes
0 answers
83 views

Weird characters after implementing bootloader Assembly OS

I just implemented a bootloader in my small Assembly OS. It appears to be working, since it boots straight in the kernel. There is one problem, the characters are not correct, this was not a problem ...
Luxo Luxo's user avatar
0 votes
0 answers
38 views

Is UEFI returning a false memory map or has QEMU an error?

I have a bootloader written with UEFI. I use -m 100M when running QEMU and I excpected to have about 100M of memory when using BS->GetMemoryMap(); But I got about 350M which is weird. Following is ...
MagaCraft202's user avatar
0 votes
0 answers
106 views

Why are interrupts not triggered during an infinite printing loop task

Specifically, I have two tasks fn and fn1 that are being run by a scheduler. The code for each is below: int fn(void *arg) { for(;;) { printf("a"); } return 6; } int fn2(void *arg)...
xingharvey's user avatar
0 votes
1 answer
64 views

Why does disk read function lead to page fault

The following function that reads the FAT BPB results in a page fault: fat_bpb* fat_read_bpb(){ fat_bpb* bpb = kmalloc(sizeof(fat_bpb)); ide_read_sectors(DRIVE, 1, 6, (uint32)bpb); return ...
xingharvey's user avatar
3 votes
0 answers
164 views

Does the CS register need to be set when setting up Unreal Mode?

The OSDev Wiki describes the general procedure of switching to unreal mode, with an example bootloader: ORG 0x7c00 ; add to offsets start: xor ax, ax ; make it zero ...
moehr1z's user avatar
  • 41
0 votes
0 answers
33 views

qemu is returning no output after file is fed

I am very new to making operating systems so this question is pretty dumb, the following code gives me no output on Qemu(x86_64) [org 0x7c00] section .text: mov ah,0x0e mov bx,mystr jmp ...
the's user avatar
  • 1
1 vote
3 answers
79 views

How to add color in assembly OS code in qemu?

I am trying to set red color for text in this code: [bits 16] ;кажемо коду що юзаєм 16 бітний формат [org 0x7c00] ;адрес де біос буде завантажувати бутлоадер start: xor ax, ax mov ds,...
Person's user avatar
  • 27
1 vote
1 answer
73 views

Enabling Paging restarts QEMU

In my paging code, qemu restarts because of some of the inline assembly. It could be something else, but removing the assembly causes the program to work fine. Alternatively, it could be possible that ...
xingharvey's user avatar
2 votes
1 answer
87 views

INT 13h cannot read beyond specific sector

I am writing a kernel for my operating system and I have ran into a problem while loading a sector of a disk to memory. Here is the portion of the code of the function that loads the sector from the ...
Nascity's user avatar
  • 23
2 votes
1 answer
168 views

Kernel message not displaying in custom OS: Bootloader or Kernel issue?

I am building an operating system and am experiencing a problem where the bootloader successfully prints its message, but the kernel's message isn't displayed. Here's a breakdown: Setup: Assembler and ...
ThatGuy. exe's user avatar
2 votes
0 answers
53 views

init gets killed on syscall

I'm trying to build an OS on a 32 bit Linux kernel. I made start.S and init.c and executed them, but init keeps getting killed when syscall is made. How can i fix it (start.S and init.c combine to /...
CoderGodToRun's user avatar
1 vote
0 answers
52 views

Is there a way to jump to long mode using an indirect jump?

I am writing an operating system and have just started the other CPUs, so I am in assembly on each now. I have set up long mode and now I just need to perform a far jump. However, when I try to do any ...
BambooPyanda's user avatar
1 vote
0 answers
57 views

variable won't update in ISR

this is an ISR that gets executed whenever an IRQ1 is fired, but something weird is happening the data at memory location 0xb8100 is not updating, but IRQ1 is firing and the ISR is executing (I ...
Djebbar Abderrahmene's user avatar
0 votes
0 answers
74 views

Can't mask IRQ using PIC

I've been trying to setup interrupts in an x86_64 protected mode kernel in order to use the keyboard interrupt. I have loaded the IDT, remapped the PIC, the keyboard IRQ works but I keep receiving INT ...
Zpher's user avatar
  • 39
1 vote
1 answer
87 views

How to print pixels in 1024x768x32 resolution (OS Development)?

So, I recently got into operating system development a while ago, and I've made some good progress. I'm working in assembly language, C, and C++, with C++ as the language of my main kernel and drivers....
Juancarlos Kai Shiro's user avatar
1 vote
1 answer
149 views

Why won't my code draw a white pixel to the screen?

I'm making an OS that runs snake, and I'm in 32 bit protected mode, But I can't draw a pixel to the screen. I switch to Mode 0x13 (320x200x256) in real mode and the screen blanks. After entering ...
SKZI's user avatar
  • 43
1 vote
0 answers
40 views

why my os doesn't switch to protected mode

I started creating an os entirely in assembly thinking I wanted to do it completely in real-mode, but as soon as I realized the limitations I had, I decided to create the bootloader in real-mode and ...
Federico Occhiochiuso's user avatar
0 votes
0 answers
48 views

Why is my boot-loader crashing on far jump into protected mode?

I have trying to boot into a kernel made in C. I have been learning and attempting to make a functional boot loader for a while now, however it always fails in one spot or another. I am using the gnu ...
Sir Archibald Humphrey's user avatar
0 votes
0 answers
33 views

Adding hardware interrupts handeling breaks the program

I'm working on a simple OS and I've managed to set up the IDT table and now I'm working on hardware interrupts and the PIC's. In isr.c there is an array of functions and the isr handler calls the ...
neta cohen's user avatar
2 votes
2 answers
67 views

OS on a real-machine

I create a small os (not finished) only with assembly 16 bit that works with qemu-system-i386. But now i want to test it on a real machine and in case of errors make it compatible with a real PC. This ...
Federico Occhiochiuso's user avatar
1 vote
1 answer
47 views

Assembly 16bit real mode - CMPS return always 0

I want to make a small operating system in 16 bit assembly. In this code I'm creating a sort of 'terminal' where I take the user input and if the input is shutdown then start the function to shut ...
Federico Occhiochiuso's user avatar
0 votes
0 answers
67 views

display library 'carbon' not available

i'm currently making an os, and have an issue, and wanna debug what's going on. I'm on mac, i use bochs. So basically i ran bochs -f bochs_config, and bochs_config: megs: 128 romimage: file=/usr/local/...
Illia Zhdanov's user avatar
0 votes
1 answer
80 views

registers not loading properly in ISR's

I'm trying to make a simple OS and I'm currently working on setting up the interrupts. The way it works is that there is an assembly function that pushes all the registers, the interrupt number and a ...
neta cohen's user avatar
0 votes
0 answers
51 views

Is there a way to tell the kernel to use an offset at runtime

I am trying to write a OS and make it total with something new, take ideas from my mind and just dont copy from the internet i have done it everywhere i could as memory management process creation, ...
Rabyt's user avatar
  • 59
1 vote
0 answers
51 views

Qemu: booting failed

I started making an OS entirely in assembly (by my choice) but when you run it it doesn't work. There are the files.. bootloader.asm: section .text global _start _start: cli xor ax, ...
Federico Occhiochiuso's user avatar
1 vote
1 answer
51 views

mcopy alternatives for windows users

I am trying to compile a custom operating system by following a youtube tutorial. However the video instructs using mcopy, from gnu mtools, of which I cannot seem to install using the package managers ...
The CWD's user avatar
  • 21
0 votes
1 answer
106 views

bochs: fetch_raw_descriptor: GDT: index (bf) 17 > limit (17)

I'm trying to make a simple OS and I'm currently working on interrupts and the IDT. So I implemented the IDT and a default exception handler that currently doe's nothing. And when I run my OS in bochs ...
neta cohen's user avatar
0 votes
0 answers
112 views

KVM internal error suberror 1 when filling the CR3 register

I'm working on a x64 uefi bootloader to load a hobby OS. I'm running on AMD (Ryzen 7 5700G) with kvm, and when I try to fill the CR3 register with my PML4, I get a KVM internal error with 5 extra data ...
bl4ckb0ne's user avatar
1 vote
1 answer
134 views

GRUB not Switching to Graphics Mode in Custom OS Development

I am developing a custom operating system and using the GRUB bootloader to load my kernel. In my development process, I've encountered an issue where I am unable to switch the display mode from text ...
TechMC's user avatar
  • 13

1
2 3 4 5
23