Skip to content

Simple, self-contained, clean code, well-documented, hobbyist 64-bit operating system for Intel and AMD processors. It's written in Assembly (Intel syntax) and C (GNU99 Standard) in which I strive for adding comments to the source code so it could be used as a reference for future OS developers

License

Notifications You must be signed in to change notification settings

PauloMigAlmeida/AlmeidaOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AlmeidaOS

Codacy Badge

Simple, self-contained, clean code, well-documented, hobbyist 64-bit operating system for Intel and AMD processors. It's written in Assembly (Intel syntax) and C (GNU99 Standard) in which I strive for adding comments to the source code as much as possible so it could be used as a reference for future OS developers.

It contains the following components written from scratch:

BIOS

Component Description Source code
MBR First stage bootloader code
Loader Second stage bootloader code

Kernel

Component Description Source code
PML4 Paging Structure code
Buddy Memory allocator System code
PrintK printf-like string format parsing utility code
Serial Driver send printk msgs via RS232 to help debugging code
Core Dump Dump CPU registers for debugging purposes code
Syscall/Sysret method chosen to jump to Ring 3 and back code
PIT Programmable Interval Timer code
PIC Programmable Interrupt Controller code
(x)delay Based on tightloops given that I'm using PIT code
CMOS RTC Real-time clock code
Scheduler Simple Round-Robin scheduler code

libc

functions are being added on-demand: code

More to come! Star/Watch this repo to stay tuned!

Build

In order to build this app, you are expected to have make and docker installed in your machine. All of the other building dependencies should be taken care of automatically by the docker image created during this step.

To build it you have to run:

make build

Run

In order to run this app, you are expected to have make and qemu-system-x86_64 installed in your machine.

make test

Wishlist

To make sure I won't lose focus on what I want this OS to be able to do, I decided to write a list of features that I want to implement in the short to medium term.

  • Serial port driver
  • Early printk (contingent on serial port driver) -> will help debugging in real computers
  • limited libc -> (It will always be "Work in progress" as I add functions as I need them)
  • Userspace
  • Rudimentary Bash-like terminal

Stretch goals

Things that would be fantastic to have but I am not sure if I have what it takes to do within my lifetime.

  • networking capabilities (I would be damn happy with UDP already..I wouldn't dare trying to implement TCP)
  • Filesystem
  • Scheduler / Time-sharing OS

References

These are all the references that helped me a lot during the development of AlmeidaOS

Forums:

Books:

Existing OSes:

Courses:

About

Simple, self-contained, clean code, well-documented, hobbyist 64-bit operating system for Intel and AMD processors. It's written in Assembly (Intel syntax) and C (GNU99 Standard) in which I strive for adding comments to the source code so it could be used as a reference for future OS developers

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages