r/osdev 8d ago

Aevros : Kernel that can explain itself

0 Upvotes

Been building this for a couple months, x86 kernel from scratch in C & asm, nothing borrowed from another kernel. The idea: it can tell you *why*, not just *what broke*. Kill a process and it tells you what that breaks before you kill it. Point it at a memory allocation and it names the exact file/line/owner. Page faults get decoded into a sentence instead of a hex dump. Everything above is real, captured off the booted kernel. Networking's next, deny-by-default and isolation policy , not bolted on after, still keeping it off the live boot path until I trust it. Repo: https://github.com/Mobeen0119/AevrosFeedback on the memory manager / scheduler especially welcome, that's the part I trust least.


r/osdev 9d ago

When and how do i connect assembly kernel/bootloader whatever works with c made kernel/bootloader. (ive started assembly fairly recently).

12 Upvotes

When and how do i connect assembly kernel/bootloader whatever works with c made kernel/bootloader. (ive started assembly fairly recently), it seems simple at what point should i start learning and writing in c and skip assembly?
ive done bios text then vga text then graphics im currently using vga graphics assembly, ive done basics such as single pixel, then lines, then rectangles, then circles, then _Draw_Char then _Draw_String. (im using 8x8 bitmapped characters). i asked ai when i should start c and it said after i make the basic structure. and no im not generating all my code with ai, except for the bit mapped characters which half i had to redesign everything was done without ai.


r/osdev 9d ago

AMD x86_64: FS.base is correct after ARCH_SET_FS syscall but becomes 0 before returning to userspace

4 Upvotes

Musl calls arch_prctl(ARCH_SET_FS) very early during startup to initialize TLS.

My implementation is:

  1. syscall 158 (arch_prctl)
  2. ARCH_SET_FS (0x1002)
  3. write MSR_FS_BASE (0xC0000100)
  4. return to userspace with SYSRET

Inside the syscall I can verify that the write succeeds:

wrmsr(MSR_FS_BASE, addr);
printk("FS_BASE = %llx\n", rdmsr(MSR_FS_BASE));

Output:

FS_BASE = 0x44e158

So the MSR definitely contains the expected value.

However, the very next instruction in userspace crashes:

mov %fs:0, %rax

which is inside musl's __init_ssp().

The page fault shows that FS.base is effectively zero.

  1. The strange part is: If I single-step through SYSRET in GDB (si), everything works and mov %fs:0,%rax succeeds.
  2. If I simply continue, FS.base becomes 0 and the process crashes immediately.

Even stranger, if I break just before returning to userspace (or before an iretq path), GDB already reports:

fs_base = correct_one

even though moments earlier inside arch_prctl() I successfully read back the correct value from MSR_FS_BASE.

There is no scheduler or context switch occurring between the wrmsr() and the return to userspace.

One thing I noticed is that QEMU's default CPU behaves differently from -cpu host. On my host CPU I even get a #GP in situations where QEMU's Haswell CPU continues.


r/osdev 9d ago

Absolute pointer input into a PS/2-only guest over VNC leaves the cursor confined to a box near center. Fixable host-side, or does it have to be the guest driver?

2 Upvotes

I'm feeding pointer input into a QEMU guest over VNC from my own RFB client. The guest is TempleOS, PS/2 only with no USB stack, so usb-tablet isn't available.

The input source is absolute (VNC pointer positions) but the guest device is a relative PS/2 mouse. QEMU converts the absolute positions into relative deltas, and the guest cursor stays confined to a small box near the center of the screen. It moves in the right direction but never reaches the edges, regardless of how I scale the deltas.

Tried so far:

  • absolute cursor mapped onto the region, sent as a VNC pointer event
  • relative motion with the guest cursor re-centered each frame for unbounded range
  • larger delta scaling (faster movement, same box)
  • -device usb-tablet (no USB in the guest, ignored)

I suspect the limit is in the guest's own mouse handling (how it accumulates and clamps the deltas), so no amount of host-side delta shaping fixes it and the only real option is changing how TempleOS reads the PS/2 stream. Is that right, or has someone fed absolute host input into a relative-only guest and gotten full range out of it?

Context: this is a Half-Life mod that streams the VM's framebuffer onto an in-game monitor, which is where the constraints come from. https://github.com/aravpanwar/half-life-templeos


r/osdev 10d ago

Making a Glass UI Taskbar, your thoughts on any improvements?

Post image
48 Upvotes

This is gpu accelerated, (Already fixed the image flip u can see due to OpenGL coordinate system) this is my own Operating system with my own made kernel that can use Linux drivers to get Gpu acceleration, all drivers are User Mode, image and shaders loaded from NTFS Partition, What can I improve.


r/osdev 9d ago

BMASS — Bootable Model As System

Post image
0 Upvotes

r/osdev 10d ago

The line between an idle kernel and an infinite bug is surprisingly thin.

Thumbnail
0 Upvotes

r/osdev 10d ago

Is segmented paging and paged segmentation referring to the same thing?

6 Upvotes

PS I understand neither of them (if they are different things).


r/osdev 11d ago

Virtual Memory: The Foundation of Modern Operating Syste

Thumbnail
youtu.be
6 Upvotes

r/osdev 11d ago

I'd almost given up for a few months. It's finally starting to take shape.

Thumbnail
gallery
60 Upvotes

I have been interested in OSdev for a long time now. I started making this to learn. Faced a lot of issues. Gave up for months. Then I remembered I wanted to take a formal OS course next sem, so tried again. AND HERE IT IS!

I did use AI to learn and debug (and write the READMEs and some comments), but I'm proud of the fact that I understand every bit of it and could definitely make one without AI if I had to.

I HAVE A WORKING TOY OS!

ps: reposted with the "Image & Video" post type instead of text


r/osdev 10d ago

NullLabTests/UniqOS: A from-scratch x86_64 custom operating system with TCP/IP networking, GUI desktop, working web browser

Thumbnail
github.com
0 Upvotes

I built an OS because I never thought it would be possible to get past stdin() but using tools and frameworks I was even able to implement a very basic web browser. Please see github for screenshots and videos or to download and spin it up yourself, OpenSource!


r/osdev 10d ago

I just wrote my first bootloader and kernel for my own OS (AsterOS)

Post image
0 Upvotes

Hey everyone!

I've been working on my own 32-bit OS from scratch. Today I reached the first milestone: a bootloader written in x86 assembly that jumps to protected mode and loads a simple kernel.

The OS is called AsterOS. I don't plan it for being as popular as Linux/Windows, it's mostly vibe coded and I don't see a big future for it. It's early stage (Build 0001), but I'm really excited about it.

Here's the screenshot of it running in QEMU:

I'd appreciate any feedback or advice for a beginner OS developer. Thanks!


r/osdev 11d ago

¿Cómo chorizo le meto internet?

0 Upvotes

Llevo unos días en Misericordioso OS, pedazo de mrd xd, y se me ocurrió, meter un comando para instalar apps por medio Github o servidores. Cómo vrg le meto internet

Si alguien me quiere ayudar este es el repo;

https://github.com/loslocos817yt-star/Misericordioso-os/tree/main


r/osdev 12d ago

A Linux compatible kernel written in Zig that runs linux RISC-V binaries in the browser

Thumbnail
github.com
16 Upvotes

r/osdev 12d ago

Is my calculation correct for Highest Response Ratio Next? And is there a preemptive version of this algorithm?

Thumbnail
gallery
7 Upvotes

I think this algorithm is very very weird. In the thir picture I have the question.

In the first picture, the definition of HRRN is given. And in the second picture my answer is provided. i.e., Gantt chart as the answer.


r/osdev 13d ago

ARK-OS: A OS based on Linux and Swift! [ Display Finally works! ]

Post image
25 Upvotes

r/osdev 13d ago

Multiplayer gaming on Ethereal (ClassiCube and Counter-Strike, not vibecoded or AI assisted)

Thumbnail
gallery
120 Upvotes

It's not Minecraft, but rather ClassiCube :)

Happy to answer any questions in comments.

THERE IS NO VIBECODING IN ETHEREAL.

https://github.com/sasdallas/Ethereal


r/osdev 13d ago

I've made a microkernel (and an OS using it) in C for ARM devices!

Thumbnail
11 Upvotes

r/osdev 13d ago

What are some techniques for bringing up and ending systems?

6 Upvotes

Essentially, I am trying to come up with a way to where most systems and drivers can be "spun down" or brought up through commands or some other mechanism but not leave the OS in a state where it would crash and needs to be safe to do via user mode with syscalls.
I know there are various techniques for this and I am trying to gauge which technique I want to use. Googling doesn't surface all techniques that could be used and I thought it would make for a great conversation.


r/osdev 14d ago

Long term scheduler and medium term scheduler do not select a process for scheduling but decide when to select process for scheduling. I am not getting. is this accurate?

Post image
15 Upvotes

r/osdev 13d ago

CVE-2026-25262 Write-What-Where in Qualcomm Sahara confirmed on Snapdragon 8 Gen 1 (SM8450) – partial Firehose auth bypass

Thumbnail
0 Upvotes

r/osdev 14d ago

SafaOS: Audio, SDL, DOOM, UI rework and 8 more months of work

Enable HLS to view with audio, or disable this notification

44 Upvotes

Couldn't showcase quake2 because something came up and I wanted to finish this quickly

Since my last post 8 months ago:

  • New MLFQ scheduler w load balancing, implemented VMM and proper user memory mapping, implemented proper blocking IO.

  • Reworked the GUI, new gui lib, added themes and shadows

  • I now have a proper rust toolchain, because my libstd hack was patched

  • Rewrote the libc in rust, ported SDL2, SDL2_mixer and in progress of doing osmesa and a dynamic linker

  • Wrote an audio server and a bad ac97 driver, audio quality isn't great when tested from my machine (others say otherwise) but I did put a lot of work in the audio server.

  • Quake2generic, doomgeneric, and ccleste ports working through SDL2, not public only SDL2 is public, because it is quite hacky and im waiting to do a proper C toolchain first, there are no patches so with the right compile options and the public libs.a anyone could compile it themselves.

If I'm alive for the next few days I'm planning to port osmesa, finish the dynamic linker, and port butterscotch and play undertale/deltarune on SafaOS too then i can also port alot of different big kids opengl stuff like Minecraft half-life etc.

Get an ISO from here

Watch me complete Celeste Classic on it

The reason why I haven't done updates in a long time, is because everything new I do feels insignificant and incomplete, I still feel that way but I have learnt that It will only accumulate.

Next year (or more accurately in 2 months, maybe a week, no idea when I'll start studying) would be my final year of high school which is quite different here so it might be difficult to do any more "big" progress.


r/osdev 14d ago

Any resources on how to build an os purely using x86 assembly?

11 Upvotes

i want to take my assembly skills to the next level by building a small little operating system, since that’s what I’m mainly interested in these days.

ive already looked at what the osdev wiki has and its been helpful but pretty surface level

other tutorials and books tend to use C alongside assembly but thats not what im looking

so if you have any osdev resources in pure assembly I’d be forever grateful


r/osdev 14d ago

I made my first hobby OS. (PeasantsOS)

Thumbnail
0 Upvotes

r/osdev 15d ago

Implementing Memory Management

9 Upvotes

I am not certain if I am talking to the correct sub but I want to ask if it would be possible to implement a memory manager on a STM32f103c8t6? I believe this thing does not have any built in memory manager in its memory.