Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
88 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 ...
Connor Thomson's user avatar
Advice
0 votes
8 replies
99 views

I am developing my own operating system, and I’ve reached the point where I need to port the C++ standard library to it. I have already ported most components, including memory management and related ...
Wew Auction's user avatar
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 ...
Maksym Semenii's user avatar
3 votes
2 answers
135 views

I am working on a small os with a custom boot loader targeting BIOS. For this, I need to map the kernel to its canonical high address space (0xFFFFFFFF80000000) and jump to its entry point. For this, ...
Holz's user avatar
  • 133
1 vote
1 answer
107 views

I am working on an assembly kernel, using the OSDev Wiki and a PDF from Nick Blundell. I have set up my GDT and it seems to work fine. I am also able to load the IDTR as well. However, when I try to ...
HAXBABA's user avatar
  • 35
2 votes
1 answer
137 views

I've followed the book OS01 by Tuhdo, kind of made a simple bootloader, that loads the kernel. Then I tried to add some code to set up GDT, but I've witnessed unusual behavior in gdb. Here I stopped ...
nhanphamdev's user avatar
-1 votes
1 answer
213 views

void bootmain(void) { struct Proghdr *ph, *eph; // read 1st page off disk readseg((uint32_t) ELFHDR, SECTSIZE*8, 0); // is this a valid ELF? if (ELFHDR->e_magic != ELF_MAGIC) ...
Fw120's user avatar
  • 15
15 votes
1 answer
395 views

I am getting started with a minimal OS kernel (just gdt and place holder idt). Using i386 assembly and freestanding C. I wanted to change the position of the cursor for which i found several sites ...
Anonymous's user avatar
  • 177
0 votes
0 answers
136 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 (...
陈嘉澪's user avatar
3 votes
1 answer
153 views

I am trying to write a simple bootloader which loads my program from LBA=1 into memory and jumps to its start. I emulate my bootloader in qemu with -drive flag passed. When I try to read blocks from ...
Alex Gendelbergen's user avatar
4 votes
1 answer
191 views

So I thought I'd try to make a DOS copy but it runs on a floppy and its just a simple plug and play with fat12 partition for user applications and drivers. I first attempted to load my kernel using ...
laween's user avatar
  • 91
2 votes
1 answer
83 views

im making an os kernel in zig (grub to boot) and im trying to get interrupts to work specifically hardware interrupts and as soon as i enable them (i have a pic, gdt and idt setup) it gives me a ...
Crazy games's user avatar
2 votes
1 answer
91 views

I'm writing a UEFI application in Zig. I'm calling GetMemoryMap() twice: once to get the required buffer size, then again after allocating the buffer using AllocatePool(). Here's my code: fn ...
OrderChaos's user avatar
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 ...
PRoX's user avatar
  • 23
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 ...
ebenezer gmeskel's user avatar
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 ...
Wew Auction's user avatar
-5 votes
2 answers
94 views

For some reason every time I try entering 32bit protected mode.. it always FLICKERS AND FLICKERS FOR NO REASON.. I am using QEMU and my kernel is being assembled into a raw binary and then written ...
user avatar
1 vote
1 answer
159 views

Context: I am a somewhat seasoned C++ and Python developer, and a beginner in Rust with no experience in assembly or machine code following the blogOS guide trying to create a minimal kernel that ...
Sappy Duck's user avatar
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....
clickerticker48's user avatar
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(...
Singing Account's user avatar
2 votes
1 answer
180 views

I am writing an AHCI driver for a minimal kernel and need to handle PCIe interrupts without MSI, relying solely on the legacy PIC 8259 and PCIe INTx virtual wire signaling. I have already implemented ...
NoobCEO's user avatar
  • 23
3 votes
1 answer
88 views

Problem I have assembly code that switches to 32bit mode and prints a character successfully when I have it inside the boot sector - But when I use a disk read to load the code to the next sector the ...
Adi Mehmedičević's user avatar
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 ...
happen's user avatar
  • 11
0 votes
1 answer
49 views

I am learning to write a 16-bit bootloader using NASM with BIOS interrupts to print strings to the screen. I’ve created a simple print subroutine in an external file (printer.asm), and I'm using %...
Kushal's user avatar
  • 33
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 ...
Yoinksawse's user avatar
1 vote
1 answer
111 views

I'm progressing along developing my OS, and I recently implemented a virtual memory manager that handles paging. I used 2 Page Tables: (1) to identity map the first 4 MB and (2) to map the kernel (...
user29935845's user avatar
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/...
jack101yello's user avatar
2 votes
1 answer
171 views

I'm developing an operating system and I'm taking 'Nanobyte OS' as a base because I had trouble with the toolchain and compilation system. The problem comes when loading an ELF, because it throws a ...
Davidgatrex's user avatar
1 vote
1 answer
73 views

This is the code for a program that, when booted by a bootloader, disables interrupts, loads a GDT descriptor, enables the A20 Line, enables protected mode, and jumps into 32-bit code. .code16 ....
oahu8846's user avatar
0 votes
1 answer
116 views

Currently, a memset to kernel_dir is causing my kernel to page fault. The kernel is a higher-half kernel, and is mapped to 0xC0000000 in virtual memory. #include "paging.h" #include "...
xingharvey's user avatar
1 vote
1 answer
165 views

I’m currently implementing a floppy disk controller (FDC) driver for my hobby OS, and I’ve run into a strange issue. Here’s the driver source code: 👉 fdc.c on GitHub After initializing the FDC via ...
Novice's user avatar
  • 55
4 votes
1 answer
113 views

I'm running qemu-system-i386 -s -S -singlestep (and sometimes qemu-system-x86_64), and I connect to it over TCP to address 127.0.0.1:1234 using the GDB remote protocol. I issue the g command to get (...
pts's user avatar
  • 88.7k
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 ...
baponkar's user avatar
  • 466
1 vote
0 answers
63 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 ...
baponkar's user avatar
  • 466
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 ...
Hari's user avatar
  • 21
1 vote
0 answers
72 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 ...
Uday Khare's user avatar
3 votes
1 answer
166 views

I'm following the advice on https://wiki.osdev.org/Real_Mode to return from 32-bit protected mode to real mode. That code includes a far jump. My code looks like this now: ; At this point we are ...
pts's user avatar
  • 88.7k
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 ...
Ioane Baidoshvili's user avatar
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 ...
Daniil's user avatar
  • 17
4 votes
1 answer
136 views

I am trying to make my own OS and am currently stuck on one tiny problem. My welcome messages are not loading in the terminal. Other than that, everything seems to work fine. (I'm not too sure, so ...
James Tan's user avatar
2 votes
1 answer
135 views

I've been trying to build a custom OS following the steps in this guide. However, I continue to get the following error from my Makefile, init :: non DOS media Cannot initialize '::' ::kernel.bin: ...
Joshua Alexander's user avatar
1 vote
1 answer
93 views

I am trying to write a physical allocator, and to do so I need the base address for available memory, the high address for available memory, and a memory map. This is all provided to me by the BIOS (...
user29935845's user avatar
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 ...
wang fuqiang's user avatar
3 votes
1 answer
67 views

I'm porting a tiny experimental 80286 kernel from pure assembler (NASM) to assembler+C (NASM+Open Watcom 1.9). Boot sector code loads the BIN kernel image at address 0x010000 and then jumps to that ...
Alessandro Giancane's user avatar
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. ...
Viliam Holly's user avatar
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&...
baponkar's user avatar
  • 466
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 ...
Viliam Holly's user avatar
3 votes
1 answer
92 views

I'm writing a custom OS with my own bootloader and trying to switch from an assembly-based kernel (kernel.asm) to a C-based kernel (kernel.c). When using kernel.asm, everything works fine. But when I ...
Sunil KhoRwal's user avatar
1 vote
0 answers
118 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 ...
Viliam Holly's user avatar
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 ...
baponkar's user avatar
  • 466

1
2 3 4 5
26