Git Product home page Git Product logo

annos's People

Contributors

arthurmco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

annos's Issues

Use a graphical framebuffer instead of the VGA text mode for displaying text

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

  • Working PMM (#5) and VMM (#6). The kernel heap (#7) is encouraged, but not required
  • Ramdisk support, to load a console font and use it
    • Virtual filesystem, implied by the ramdisk

Input subsystem

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

  • A keyboard driver, interrupt-based. PS/2 is a good start
  • A generic keyboard subsystem

Do a kernel heap allocator

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

  • allocate a virtual address, no physical address returned
  • allocate a virtual address in a specific physaddr zone, physical address returned (for DMA)
  • allocate a virtual address, with a specific physaddr (for MMIO)

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 kmallocs.

It would be the unique interface that drivers should use.. This results in a more portable system

UEFI support

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.

Add some syscalls

Design and add syscalls. Not all, just some basic ones

Note that we need to finish some things before even starting this:

  • Working usermode
  • Working device manager

Physical memory manager

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 driver for the PIT timer

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

Virtual memory manager

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.

    • One function might return the physical address too (for things like DMA, that need a physical address but any physical from a certain zone)
    • The another do not need to return the physical address.
  • 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).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.