/r/osdev
Recently, I got an idea of what the next generation of an operating system would looks like, and I write a draft concept of it:
https://github.com/toast-jff/manual
Any comment on this idea is welcome, open our minds.
So i'm really a begginer in kernel development. I know that to code one it's either assembly + C or assembly alone. So from what I tried I feel like assembly alone works better for me. It has some benefits.
So what I mean by the last point is based on personal experience. When I normally code it's 99% of the time in C. When I got into kernel development even though I saw that some stuff could be done in C it still looked like black magic to me. Even though I was pretty good in C coding but the kernel stuff that was in C indeed looked nothing from what I learned in this language. However I did code a little bit in assembly. When I tried to do a hello world kernel in assembly alone it didn't really look different than just regular assembly code. This post is really based on my own personal experience but what do you guys think ?
I made a simple discord server for PaybackOS now that I have got somewhere with a simple SIMPLE shell the invite is https://discord.gg/VzHHkc5jSS
For anyone wanting help Osdev is basic Osdev wiki is your mate Delete all games you have maybe keep one or two so you don't get distracted (optional and recommend) Spend your day writing and reading about your/others os Check their github (not to copy) but to UNDERSTAND Read Once again read Study C or C++ bcuz they ate helpful Don't think you are making windows 2 or linux 2 But think you are making a small personal os project That helps you not think you are stupid and Makes you think osdev is easy so you are open to Learn more Libc doesn't exist so creativity is important
HighBird (used to be BreezeOS) got a win 95 like desktop
Hello I got back to osdev and so far I'm trying to write to the frame buffer I got from vesa, but when I try to write to it from my kernel code (tried writing from C and assembly) nothing happens, so I used gdb to see if the struct has the correct data and it doesn't. Before I jump to my kernel code I put the vbe struct at 0x9000 and then write to 0x9028 (which should be the framebuffer address) to make the screen red (which works).
The code can be found here: https://codeberg.org/pizzuhh/AxiomOS (specifaclly second_stage.asm and the files src/kernel)
(If this has a different name/Already exists, please do let me know <3)
I decided to make an allocator that has the advantages of a freelist allocator with the bonus of being able to allocate continuous physical pages. Currently it does not sort them by size so its a little inefficient.
The prototype can be found at:
I wrote a scheduler a year ago. Everything seemed to be working, it was going smoothly and then things broke so miserably that it removed my interest in coding for a whole year tbh. My git was broken too. It took a lot of effort just to get it back to the original state before scheduler. A page fault was occuring after some millions of scheduler calls, I've asked about this on osdev discord and tried fixing it for months but gave up.
Now I want to do it again, cleanly. I've added spinlocks to the mmu, did some important changes to the os and a page fault should be more "fixable" now even if it doesn't occur.
My end goal is running X and playing doom on it, so it's not a microkernel but a full fledged one I'm planning.
Where do I even start? Should I have a global queue or a queue for each core? Which scheduler design should I use? Are there any good implementations I can use as a reference? I mean, Linux would be the best reference but I think it would be too complicated for me to understand even now.
I have tried to get my code to work, I have a simple kshell but for some reason input will not work, and I have no clue if my code is just crappy or if its some obscure bug with the keyboard driver getch function or what, my code is at https://github.com/PaybackOS/PaybackOS/tree/kernelrewrite (its not on main or beta since this is the kernel rewrite)
Hi sounds trivial, but I search for examples on how to implement or integrate the c standard library into my new born „OS“ I know the principles how it should work but am kinda stuck at the moment.
I'd like to learn more about practical bootloading and having my os build itself.
Is allocating 4kb of ram the same as paging Or they are two different things If yes then can you give a short explanation on paging?
Hello !
I started reading ‘Writing a Simple Operating System - from Scratch’ by Nick Blundel. Great stuff! But I'm already at a loss to understand the book.
In chapter 2, he says that the machine code boot sector must start with the values ‘0xe9, 0xfd and 0xff’ and that these are ‘defined by the CPU manufacturer’.
So I went and looked in the Intel documentation (Intel® 64 and IA-32 Architectures Software Developer's Manual). I searched with lots of different keywords (09, boot sector, boot value, etc), but I couldn't find anything. I also tried to search on google, but still nothing.
Can you tell me where I can find this value in an official intel documentation?
I'm just starting out so sorry if I asked a stupid question, feel free to advise me if you think I've missed the basics!
Im setting up paging in my os, and i have several questions about it. I have already set allocating page frames, so my os can dynamically get them.
Did anyone wondered why can’t we build another OS similar to IOS that works on our hardware.
What i wanted to know is i have this feeling that we can build a rivalry to apple. We here means developers and all the hardware engineers.
I believe it takes only couple of smart guys to build a single mobile device similar to apple iphones.
I know it takes a lot of money to build a single device with R&D from scratch. But is there a single developer with this mission to attain this. Or a single electronics engineer to build a chip by himself and a single investor to invest into something like this.
Thoughts……. Please feel free to answer to my post. Anything is welcomed.
Thank you.
I have been working a while on PaybackOS but attempting (from my debian 12 install) to get a disk driver working, I have tried over and over but get nowhere, so how can I actually get a disk driver working? I tried everything I could think of, checked the wiki on all sorts of things, I just have no clue how to do it. (Project is at https://github.com/PaybackOS/PaybackOS )
I have no clue how to do that, no tutorials anywhere :( (before you say that i need to get that knowledge myself and its not hard while you know programming what i know a decent bit, but dang it i aint recoding everythinggg) So, does someone know some tutorial, no matter is it a video or a pdf, or some sofware?
Whenever I boot into windows or ubuntu, I realised that my laptop (lenovo)'s logo appears on the top and the loading animation plays below it. how does it happen and how is it implemented? is the logo put onto screen by uefi? or does the os draw it
I am new to operating system development and currently developing an operating system based in cosmos (c# OS toolkit) . Can i get any guide about real os development?
I've heard that device drivers need to run in kernel mode to access the respective devices. But as far as I know, communication with a device usually works with memory mapped I/O. So, couldn't the OS just map a virtual memory page to the address range of the respective device and run the driver in user mode? I know that there are also CPU instructions that can only be executed in kernel mode, but do device drivers really need these? I wouldn't know why. Do they run drivers in kernel mode just for a speed boost, to avoid the address translation?
I’m a little way off from this yet - but thinking ahead.
At present I’m my os, to run a program I just load it into memory and jump to the first location. But that hits a brick wall as soon as there is any address dependent code in there.
So at some point I’m going to need to have some actual format to executable files. I started reading the ELF spec, found it rather daunting and gave up rather quickly.
Is it anything like as bad as it seams, or is it a case of not-too-bad when you get the hang of it?
(I’m on a completely custom architecture so I will need to write both the assembler end and the os loader side - so could cut things down if that’s easier).
This is the last post about this, i implemented the player input because a kind soul reminded me that I don't need multithreading, just the keyboard driver interrupt. If someone wants to check the code, is here. (Yes i am bad at pong)
so there's this bug in my ahci driver that whenever i try and read the ahci device it stops in an endless loop trying to complete the command anyone able to help? I put a link to where I am experiencing the bug, i just don't see it anywhere, maybe I am just stupid (probably) or there's something else to it i just don't know...
Found in NYC on 14th outside the 1 train.
That's right, a very stupid and poorly done implementation. both players are bots because I didn't implement multithreaded kernel to get player input (I'm lazy and dumb to do that)