arthurmco / annos Goto Github PK
View Code? Open in Web Editor NEWArthur's Not Named Operating System, an OS with a C++ kernel.
License: MIT License
Arthur's Not Named Operating System, an OS with a C++ kernel.
License: MIT License
Reach usermode, and run some basic things on it without crashing
This will require more entries in the GDT, and probably a Task State Segment, for storing kernel register values when jumping to kernel mode from user mode.
Info about TSS: http://wiki.osdev.org/TSS
Getting to ring 3: http://wiki.osdev.org/Getting_to_Ring_3
VGA text mode is deprecated and will not run in UEFI. The VBE (or GOP, in UEFI systems) framebuffer are the way to go here.
Then, we'll be able to load this OS in UEFI environments (GRUB supports UEFI, so no urge to write a bootloader)
Things we need to have
Design an input subsystem.
In the future it will only forward keystrokes to user mode, but for now, and for testing, its objective is to make the sufficient for a getc() ` function in the kernel, for a kernel shell.
We need
The kernel heap allocator serves to do small allocations, less than the 4kb granularity of the virtual memory manager.
#5 and #6 need to be closed. The PMM and the VMM need to be working well. Not bug-free (this is impossible, I think), but bug-free enough.
It provides malloc
and free
-like interfaces. I will use kmalloc
and kfree
here, for simplicity.
kmalloc
will have three variations
It would allocate virtual memory only from the kernel zone. The user zone would receive 4kb pages directly and the C library would do the same thing.
kfree
would free the address allocated by any of these three kmalloc
s.
It would be the unique interface that drivers should use.. This results in a more portable system
I want to run this in my PC ๐
Use a graphical framebuffer ( #8 )
Text-mode doesn't exist in UEFI, only GOP
Support Multiboot2 if we're staying with GRUB
Multiboot2 offer a way of retrieving that EFI function pointer. This can be useful for getting more information about the system.
Design and add syscalls. Not all, just some basic ones
Note that we need to finish some things before even starting this:
Design and create a physical memory manager, so we know how much memory we have, and what blocks are occupied
This will be the base for the virtual memory manager, and for virtual memory allocations, and paging
This might help with directions
Add a driver for the Intel 8254, the legacy programmable interval timer for the x86 architecture.
It's simpler, so we'll start with it.
It should provide us base for a usleep()
function, and a timer for multitasking operations.
More info about it here
Do a virtual memory manager
It should have functions to:
Allocate a virtual address from some zone, with some allocated physical address, from some other physical zone.
Allocate a virtual address from some zone, with a specific physical address. (for things like MMIO, that need a certain, exact physical address)
(Check #5 for some clarification about physical addresses, specially this comment )
It should be divided in zones: just a zone for kernel memory and other for user memory.
It should have a function to switch the CR3 (the page directory base register (PDBR), a register where the physical address of the page directory list go), so it's easy to do it for usermode (each process will have it's own page directory).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.