Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
127 views

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)...
3 votes
0 answers
236 views

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 ...
1 vote
0 answers
73 views

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 ...
1 vote
0 answers
105 views

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 ...
0 votes
0 answers
114 views

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 ...
1 vote
0 answers
73 views

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 ...
0 votes
0 answers
87 views

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 ...
0 votes
0 answers
43 views

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 ...
0 votes
0 answers
155 views

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/...
0 votes
0 answers
92 views

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, ...
1 vote
0 answers
79 views

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, ...
0 votes
0 answers
342 views

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 ...
0 votes
0 answers
139 views

; ---------- GDT ---------- GDT_BASE: dd 0x00000000 dd 0x00000000 CODE_DESC: dd 0x0000ffff dd DESK_CODE_HIGH4 DATA_STACK_DECK: dd 0x0000ffff dd DESK_DATA_HIGH4 VIDEO_DESC: ...
0 votes
0 answers
209 views

I am currently creating a simple kernel and I just jumped to using C with the GCC(MinGW) compiler on windows. but the way I am using C with assembly is kind of problematic here is what I am doing : :: ...
0 votes
0 answers
199 views

I want to make a text-os only with assembly. I created a simple bootloader, but now I don't know how to start my kernel. Can you please help me with any example (if it's possible with a practical ...
0 votes
0 answers
213 views

I am writing a simple OS and I am now trying to display stuff on the screen rather than just text. and after a little bit of research this is what I got : The simplest way to get graphics modes ...
1 vote
0 answers
90 views

I'm trying to make a kernel for an operating system I'm trying to make, however, it seems the kernel isn't being loaded since the kernel is not printing anything like it should Error I get when using ...
1 vote
0 answers
118 views

I'm trying to make a simple OS, so I wrote a small kernel that consist out of a c file an assembly file that calls the main function in the c file. but when I try to compile and link the two files ...
1 vote
0 answers
335 views

I am trying to build a rust kernel, however i am facing severe issues with the linker, can someone please suggest any solns for this problem. Thank you! I have made a library crate (initially a binary ...
0 votes
0 answers
59 views

i followed a tutorial series on youtube on how to make an x86_64 kernel. I wanted to know how i can detect keypresses in my c kernel. For example, i want it to call a function when a key is pressed ...
0 votes
0 answers
109 views

I started creating my first OS recently (I'm a complete beginner). I wanted to know how to connect the boot file with the kernel. I tried alone but I couldn't, how can I do? This is the project: boot....
0 votes
0 answers
90 views

I am developing a 32 bit operating system. I have just implemented paging but came across a problem. My GDT was getting overwritten. That problem was fixed in a previous question. To fix it, I had to ...
1 vote
0 answers
110 views

I am creating a 32 bit operating system. I have enabled paging and it works fine, until the kernel_main function returns to the assembly code (which calls the kernel_main function). The assembly code ...
0 votes
0 answers
68 views

I am trying to build my own hobby operating system and is trying to create load and run flat binary file into the heap and then execute it in protected mode? I have tried creating a pointer and then ...
0 votes
0 answers
257 views

I am not able to get this working. I got this code from here: https://wiki.osdev.org/ATA_read/write_sectors `;============================================================================= ; ATA read ...
0 votes
0 answers
51 views

I'm writing a custom OS kernel for x86-64. It uses a UEFI boot loader to load the kernel to a random free location provided by the UEFI. In the kernel, it first relocates to a high address direct ...
0 votes
0 answers
81 views

Here is the Interrupt handler: void irsHandler(intData data) { char* vm = (char*) 0xb8000; vm[0] = 'A'; } When user code triggers an interrupt by int instruction, the handler ...
1 vote
0 answers
473 views

I am switching to user mode from kernel mode in 32-bit protected mode (only segmentation not paging). When I make the switch and call an interrupt in userspace I get this error from QEMU: This may ...
1 vote
0 answers
132 views

I was trying to write a custom kernel for x86-64 bare bone on Apple Silicon MacBook using x86_64-elf-gcc compiler. In one of my header file (Memory.hh), I declared a constant: extern "C" ...
1 vote
0 answers
154 views

I am currently attempting to reinvent the wheel and code an x86 OS using C and GAS assembler. The OS currently starts up, initializes the GDT and IDT as well as interrupt handlers, then attempts to ...
0 votes
0 answers
112 views

i have written a super simple os and i decided to start using grub to boot it, so i started a new projected and im getting my old kernel functions to the new kernel and the ATA driver is not working ...
0 votes
0 answers
466 views

I'm currently working on an x86_64 kernel as a personal project and I'm running into a page fault error when trying to write to memory. I've checked my code and I believe I've set up my paging ...
1 vote
0 answers
266 views

I'm writing my own boot loader for i386 in NASM for education purposes. But when I'm running qemu with this it starts blinking and do anything but what I want. Here's my code: ; defs.asm %define ...
0 votes
0 answers
116 views

I have been working on an x86 OS using GRUB-multiboot as of late and have run into a problem concerning the IDT (or more specifically ISRs). Upon starting up my OS, an ISR is generated and then no ...
1 vote
0 answers
103 views

I'm currently writing a kernel and I have troubles understanding how to load the GDT. In particular, I tried the following code, but the kernel reboot when it hit an mov R, ax instruction with R any ...
1 vote
0 answers
228 views

I am trying to work on an x86 operating system and coding it in C. My OS uses GRUB-Multiboot and thus far I have been able to get a GDT working. I am currently working on my IDT and have run into a ...
0 votes
0 answers
60 views

As the title says, I'm trying to write a simple boot loader in assembly to help with my virtual machine monitor that I've tried to implement using the D programming language. Can anyone help me ...
0 votes
0 answers
129 views

So I'm trying to link 16-bit assembly code which jumps to 64-bit rust code. It worked before but now it for some reason doesn't work. So Assembly code that boot sector program should run is in _start ...
0 votes
0 answers
247 views

I am writing a basic kernel to learn and am having difficulty enabling paging, so that I can work in long mode. I slimmed down my code for simplicity. boot.asm: ;=======================================...
0 votes
0 answers
79 views

I'm writing an operating system (kernel) as a hobby and I have a problem with the "boot boot" bootloader: When my kernel's main() is loaded I retrieve screen pointers to display text on the ...
0 votes
0 answers
95 views

So I switched directly to 64-bit mode because it was easier. But I want to output pixels, and the command move es, ax crashes my computer (a key part of the pixel output code). And I realized that ...
0 votes
0 answers
491 views

i use Bochs to emulate my kernel. I wrote IDT struct, load_idt function and keyboard handler procedure. Print handler, called by keyboard handler, just read 0x60 port and put char on screen. When ...
0 votes
0 answers
82 views

I have been writing some ata stuff recently. On real hardware the ata controller uses IRQ_11. To get the driver to work I had to mask IRQ_11 because it would constantly fire after issuing the identify ...
0 votes
0 answers
459 views

I have been following the Osdev wiki, and I'm trying to follow their "inline assembly" page. I want to use BIOS in my code, but when I try, it crashes the kernel and returns to the bootloader (which ...
0 votes
0 answers
59 views

I have a function "outside" which is placed on the 2nd sector of the hard drive and I want to access it after executing all the needed stuff in my bootloader. But after reading 2nd sector ...
0 votes
0 answers
376 views

I know that the ARM 32-bit (AArch32) architecture supports 2 types of page tables: the short format (which has 32-bit table entries) and the long format (which has 64-bit table entries and is known as ...
0 votes
0 answers
79 views

For my disk-read function, int ide_read_sectors(uint8 drive, uint8 num_sectors, uint32 lba, uint32 buffer) , the function works as it should for certain small LBA numbers, and then after a while, for ...
0 votes
0 answers
230 views

Said kernel is from this repo in src/kernel/core/main.rs. The bootloader is from the same repo in src/bootloader/bootloader.c. The steps the bootloader takes are: Do UEFI functionality checks Get a ...
0 votes
0 answers
508 views

I have been trying to use a collection of various resources recently (mostly https://wiki.osdev.org and https://www.osdever.net). And currently I am trying to initialize a GDT in my assembly file boot....
0 votes
0 answers
1k views

I'm working on building an RTOS from the ground up and getting stuck on some of the inline assembly used for the context switch. I have a thread object that currently stores the stack pointer for that ...

1 2
3
4 5
7