https://codeberg.org/somerandomratz/pricks-os
I’m hoping to make this a microkernel that I can include as a part of a OS in a separate repo. My current goal is facilitating drivers for the Chromebook EC (For keyboard/mouse functionality and maybe the hinge sensor) which should be at least possible since the EC firmware is open source.
#Pricks: A kernel
1 messages · Page 1 of 1 (latest)
Basically: I want to make this compatible with emulators and my old Samsung Chromebook 3 (Celes) with a custom UEFI rom installed
I already have stuff like the PIT and Serial working and the GDT set up
I’m going to implement a ps/2 keyboard driver next so I can implement some kind of command line later
Btw rn the program is able to run on my Chromebook bare metal and behavior is consistent with the emulator 60% of the time (sometimes the sleep function runs too quick, I have to figure that out)
But it will probably be a while until I can test it on a Chromebook since I have to manually set the keyboard to emulate PS/2 though the EC which I can’t really do yet
I also want to be able to move some of these drivers into userspace
But I’m not up to that point yet so they’re going to be in the kernel for now
sounds like a kernel shell already
ye
Albeit a very simple kernel shell probably. Nothing like bash.
no i mean that kernel shells are notoriously a bad thing (that leads to bad habits)
Oh
Ig I might just implement a memory manager first
And some other stuff so I can implement a shell in userspace
Like a scheduler
thats better
I keep randomly triple faulting (i think) like 10% of the time and I have no idea why
idk I can look at that later
because it eventually runs fine anyway
like most of the time it starts fine but then there will be that one time where it triple faults
I removed nanoprintf, the graphical terminal, and initialized the serial port earlier in an attempt to try and find out where these faults where happening
One thing I noticed when doing that is that when the kernel triple faults it’s before the GDT
But it was working fine before so idk
It’s pretty hard to debug since it seems to be random
Maybe it’s a qemu thing
I should probably implement age verification too…/jk
I also realized that I was popping saved registers off the stack in the wrong order
Fixing that will probably solve the problem with page faults that happen after the IDT is initialized
also please organize your sources
Yeah I should have done that earlier X/
uggggh codeberg is being slow today
I started to implement a bitmap physical memory manager. Right now it can only find usable blocks and set them as free but it works on real hardware so that's cool. https://bsky.app/profile/michealtheratz.bsky.social/post/3mgbzsefyp224
I did absolutely nothing today
I will implement some kind of malloc function next
And then a VMM
kheap?
imo it should be the other way around