Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
101 views

I am making my own UNIX like OS called Connor's UNIX and I am implementing kernel and userspace separation and I have been all day and this is as far as I can get it to work and if you need any more ...
1 vote
0 answers
77 views

I'm trying to compile code in OpenWatcom 1.9 written in assembly. On Windows, utils in use: wasm msys2 command: /d/Maksym/WATCOM/binnt/wasm.exe -5p kstart.asm -fo=kstart.obj output: Open Watcom ...
0 votes
0 answers
137 views

I am writing a hobby OS kernel in Rust for the riscv64gc-unknown-none-elf target. I have defined my trap_entry, as a #[unsafe(naked)] function within a Rust module. When I compile in release mode (...
2 votes
0 answers
114 views

I'm developing a PS/2 mouse driver in 16-bit assembly (NASM) for a custom operating system running in VGA mode 0x12 (640x480, 16 colors). The driver initializes the mouse, handles mouse events, and ...
0 votes
0 answers
96 views

I am working on a simple bootloader in assembly. everything works fine until i enable paging and jump to 64 bit mode but then qemu just flickers. i think its a page fault but i am not sure what's ...
0 votes
0 answers
100 views

I've embarked on the exciting journey of OS development, following the tutorials on BrokenThorn.com. It's an older resource, but I've found it to be incredibly insightful for learning the ropes. I've ...
1 vote
0 answers
81 views

I've been dabbling with writing a small OS in D lang but I'm crashing on boot. I've been debugging my main file and think that the issue is with gdt_flush which is called in gdt.d and defined in gdt.s....
1 vote
0 answers
150 views

I've been trying to get a program running on the QEMU emulator. The issue is that when I pass an empty string or a non-empty string to the print function, the program prints ABC indefinitely. #[unsafe(...
1 vote
0 answers
85 views

I've been making a kernel in pure NASM assembly. And the problem lies in the IDT not jumping to the correct address and triple faulting (expected); and as shown in gdb, causes it to go at the wrong ...
2 votes
0 answers
76 views

I've recently been working on a mini operating system written completely from scratch. After implementing a bootloader and minimalised kernel, I tested the whole program on GDB, with the breakpoint ...
0 votes
0 answers
32 views

I'm trying to port Newlib following this tutorial after following this tutorial, and I'm running into an issue near the end. I'm at this step: mkdir build-newlib cd build-newlib ../newlib-x.y.z/...
0 votes
0 answers
53 views

I want to switch into user mode from kernel mode by switch_to_user_mode: cli mov ax, 0x23 mov ds, ax mov es, ax mov fs, ax mov gs, ax push 0x23 push rdi pushfq ...
1 vote
0 answers
64 views

I am developing a x86 architecture based 64 bit Operating System. I have implemented GDT(Null, Kernel-code, kernel-data, user-code, user-data, tss) . Now I want to switch into user space(Lower half ...
1 vote
0 answers
93 views

I'm writing a 32-bit OS kernel with support for PAE paging. When I enable paging with mov %eax, %cr0 (setting the PG bit), the kernel works fine under QEMU with TCG, but crashes with a General ...
1 vote
0 answers
65 views

I am trying to setup GDT/IDT/Paging. Below code is what i do, global start global CODE_SEG global isr_asm global DATA_SEG global loadGDT global isr_wrapper extern main extern isr section .text bits ...
1 vote
0 answers
73 views

https://github.com/UdayKhare09/EXO_OS is my repo. I am working on a custom bootloader for my operating system, and I am encountering an issue where the bootloader fails to load more than 53 sectors ...
0 votes
0 answers
40 views

amd sdm implies CLGI can block vINTR Table 15-10 Effect of the GIF on Interrupt Handling 15.21.4 Injecting Virtual (INTR) Interrupts The processor takes a virtual INTR interrupt if: V_IRQ and ...
0 votes
0 answers
76 views

[ORG 0x7C00] [BITS 16] CODE_OFFSET equ 0x8 DATA_OFFSET equ 0x10 KERNEL_POS equ 0x1000 ; 4096 bits dec, 512 bytes ; loader - 512 size bytes, ; then kernel will placed to ...
2 votes
0 answers
80 views

I’m developing a custom OS and facing a chicken-and-egg problem with my page frame allocator. I need to map a specific page, but if the corresponding PML4 entry is NULL, I must allocate a PDPT. ...
2 votes
0 answers
78 views

I have made three threads inside of process init_thread, thread1, thread2 by below code void init_processes() { // Create the init process process_t *process = create_process("process0&...
1 vote
0 answers
66 views

I'm developing an OS and encountering an issue with my PS/2 keyboard driver: despite attempting to set the keyboard to scancode set 2, it continues to send scancode set 1 codes. Below is the function ...
1 vote
0 answers
119 views

I'm currently developing an operating system that uses the limine bootloader and follows the limine boot protocol. However, I've encountered an issue: when I call init_PIC(), the CPU resets ...
0 votes
0 answers
41 views

I am trying to enable periodic APIC Timer in x86 architecture based 64 bit OS. void apic_timer_init(uint32_t frequency) { disable_interrupts(); // Ensure APIC is enabled (set Spurious ...
2 votes
0 answers
104 views

I am currently booting my system into a 640x480x32b VESA mode with a linear frame buffer. Using the following code, I flash red and green on the screen: void clear(Color color) { u8* cursor = ...
1 vote
0 answers
92 views

I want to get disk information like no. of disks, size of disks, type of disk etc. I have read this doc but do not understand how can I get disk information by using limine bootloader. I have tried by ...
0 votes
0 answers
27 views

I want to strat process with schedular so I have written following code #define STACK_SIZE 16*1024 // 16 KB process_t *process_list = NULL; process_t *current_process = NULL; uint64_t next_pid = 1; ...
1 vote
0 answers
82 views

Currently I'm having a hard time with my bootloader after I enter protected mode by setting the lsb in register cr0 to 1. I perform a far jump to the kernel code segment as defined by jmp 0x8:...
2 votes
0 answers
111 views

I am developing a x86 architecture based 64 bit Operating System which is using limine-8.6.0 bootloader. I have enabled GDT by global gdt_flush gdt_flush: LGDT [RDI] jmp reloadSegments RET ...
1 vote
0 answers
88 views

I am studying call gate in x86 asm now. I try to use call gate to achieve a segment-to-segment transfer and the virtual machine I use is Bochs. Althougn I say it's a "segment-to-segment" ...
2 votes
0 answers
173 views

I know this is naive but I want my entire OS code written in assembly and that includes the IDT, but I don't recall there having ever been an IDT in assembly so I used objconv but it outputs some code ...
0 votes
0 answers
66 views

I get the error "check_cs(0x0020): not a valid code segment !" from Bochs after going through the isr for the timer: 0x20. Here's the code for the isr: void timer_isr() { // Acknowledge ...
0 votes
0 answers
86 views

I want to enable IDT in x86_64 OS so I have written isr_common_stub function isr_common_stub: call save_registers mov eax, 0x10 ; Load the kernel data segment descriptor mov ...
1 vote
0 answers
168 views

I'm interested in how Invariant TSC behaves on a multi-core CPU, on a classic PC with a single physical CPU. The only thing I could find is that its frequency is constant and the same for all CPU ...
0 votes
0 answers
72 views

I am using limine bootloader to load my x86_64 Kernel. I want to use my custom Paging so I made following codes. Structers #define PML4_INDEX(va) (((va) >> 39) & 0x1FF) // Bits 39-47 #...
0 votes
0 answers
161 views

this is my first question here I am new to the operating system world, I am trying to run this basic bootloder after one hour of troubleshooting I am in a situation that my simulator is opening, but ...
1 vote
0 answers
101 views

When working in a raw/freestanding environment, I have a question about the .bss section in ELF files. If I link and set the output format to binary (not ELF), where will the .bss section be in the ...
1 vote
0 answers
92 views

I'm encountering a double fault in my kernel when loading the Interrupt Descriptor Table (IDT). The interrupt handler outputs the following error: Got Signal: Double Fault (4144) Since a double fault ...
0 votes
0 answers
60 views

I am trying to make an IDT, but when i trigger an interrupt it goes to a location i don't know. I am in 32-bit protected mode using and i am using QEMU. I have created only one entry for the moment, ...
1 vote
0 answers
59 views

I'm experimenting with Linux kernel, trying to reduce its codebase to a minimal "hello, world" that is made of as few files as possible, so that I can get a good understanding of its build ...
2 votes
0 answers
167 views

I want to enable GDT in x86_64 OS by init_gdt() function in kernel.c Where, gdt_entry_t is looks struct gdt_entry_struct {// 128 Bit uint64_t limit_low :16; // limit = 16+4 = 20 ...
1 vote
0 answers
121 views

I'm writing a toy-kernel and the first step would be to set-up the GDT. Obviously I will be using variables on the stack to initialize the GDT; for which, a GDT must already be set up, which is indeed ...
1 vote
0 answers
92 views

So i am following a blog about building an os trying to build a simple kernel.I am on step 2 and am using VGA to display things the function setcharinmem. When i pass 'a' in it displays normally but ...
0 votes
0 answers
60 views

I have recently made an x86-64 OS and wanted to create a keyboard driver. I made basic logic for it and make it register its handler into IRQ1 tried it no faults were made but inside QEMU when I tap a ...
0 votes
0 answers
118 views

I am learning how an operating system works. So I started by writing a bootloader. Everything was working fine until I tried to format my image containing my stages 1 and 2 in FAT12. Currently the ...
2 votes
0 answers
106 views

I'm working on implementing paging for my custom 32-bit kernel. Currently, my kernel is loaded at the physical address 0x100000 (1MB), and I want to remap it to the virtual address 0xC0000000 after ...
2 votes
0 answers
91 views

I need a way to play sound at a certain frequency for a while in C without libraries (the most important thing). How can this be implemented, for example, on the sound blaster 16 audio card (AC97 is ...
2 votes
0 answers
164 views

I am working on building a simple bootloader that loads a kernel from disk into memory at the 1MB mark (0x100000). The bootloader consists of two stages: Stage 1 reads the second stage, and Stage 2 ...
0 votes
0 answers
79 views

I am developing a custom bootloader for my 64-bit OS in x86_64 NASM on macOS aarch64 (yup, LLDB is only available to me) environment using QEMU. The bootloader is a 2-stage. Current Behavior Prints '...
1 vote
0 answers
142 views

I am developing a custom bootloader for my 64-bit OS in x86_64 NASM on macOS environment using QEMU. The bootloader is a 2-stage, and is designed to load operating systems from disks. I am ...
1 vote
0 answers
74 views

I'm getting into OS Develop and recently finished writing my bootloader, now I started to make the kernel. The first thing I've decided to implement was writing text from my kernel_main.cpp (using VGA ...

1
2 3 4 5
7