Giter Site home page Giter Site logo

dreamos82 / northport Goto Github PK

View Code? Open in Web Editor NEW

This project forked from deanoburrito/northport

1.0 1.0 0.0 1.15 MB

Osdev round 2! Monolithic kernel design, and targetting x86_64. Check the readme for more details.

License: MIT License

Makefile 3.02% C++ 85.83% C 9.93% Assembly 1.21%

northport's Introduction

Huge stylish northport banner

All builds CI badge

Northport is a monolithic kernel, written in C++ and booted via the Limine protocol. It currently supports x86_64 and riscv64 machines. This repo also contains a completely standalone support library (see libs/np-syslib).

Instructions for building it yourself are available here, and a more in-depth manual can be found under the releases tab or by cloning this repository and running make docs.

A brief summary of the current goals and features are listed below, or check the roadmap for a more granular view. Pre-built isos are made available at major feature milestones, but for the latest and greatest it's recommended to build from the master branch.

Project Goals

  1. To build a usable, extensible and relatively complete kernel. This means an smp-aware scheduler with support for heterogeneous processors, media stacks (graphics, audio and network) and a flexible driver infrastructure.
  2. Support for multiple architectures: the current targets are x86_64 and riscv64, but this may expand over time.
  3. Be self hosting, this includes cross compiling the system.
  4. Clean code and useful documentation.
  5. Usable on both virtual machines and real hardware.

An extended goal (previously goal #5) is to add a comfortable user experience: a window manager, basic programs like a text editor and file explorer.

Project Features

Kernel:

  • Support for multiple architectures: riscv64, x86_64.
  • Memory management:
    • PMM with a fast path for single page allocations (freelist), and a slow path for allocations with imposed limits (required by some drivers).
    • Modular and portable VMM, with demand paging options for anon and vfs backed memory. Inspired by the old SunOS design.
    • General purpose heap provided by slabs for smaller objects and a freelist for larger objects. Slab allocation can be accelerated by core-local caches, and several debug features are available.
  • Logging infrastructure: fast and lock-free with support for several early outputs (uart chips, debugcon) and a built-in graphical terminal (based on gterm from the Limine bootloader).
    • Panic sequence with stack walker and symbol lookup.
  • Global software clock, driven by a number of supported hardware timers: LAPIC, TSC, HPET, PIT, SBI timer.
  • SMP-aware scheduler: round robin with per-core queues, work stealing and DPCs.
  • VFS with a robust tempfs driver. File contents are sparsely cached in a global file cache.
  • Loadable drivers and device management, partially automated by a device tree parser and PCI enumeration.
    • Notable drivers include: NVMe, virtio devices.
  • Optional UB sanitizer, helpful for detecting bugs or increasing code size!

Build System:

  • Uses stock core tools and GNU make, runs anywhere (tm).
  • Xorriso is needed for generating bootable isos.

Glorious Screenshots

11/10/2023: Kernel panic while loading a malformed driver from the initdisk.

Screenshot_20221120_215230 20/11/2022: x86 and riscv kernels running side by side in qemu.

Related Projects

  • DreamOS64: another 64-bit OS by one of the northport contributors, Ivan G.
  • OSdev notes: a repository of notes about various osdev topics. Feel free to contribute!

This is a complete rewrite of the original. If you're looking for that, it's available on the archive-2022-version branch.

northport's People

Contributors

deanoburrito avatar dreamos82 avatar

Stargazers

 avatar

Watchers

 avatar

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.