GithubHelp home page GithubHelp logo

mayant15 / bottleos Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 87 KB

A bare bones OS kernel made for educational purposes

License: MIT License

Rust 55.52% Assembly 12.13% C 30.30% Shell 2.05%
kernel os

bottleos's Introduction

Hi there ๐Ÿ‘‹

๐ŸŽ“ Masters' student @UBC-SPL.

๐Ÿ”ญ Interested in Program Analysis, Compilers and Graphics.

โšก Dabbling in Zig

๐Ÿ“ซ Sometimes I write about stuff on my website.

bottleos's People

Contributors

mayant15 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

bottleos's Issues

General protection fault while serving exceptions

Problem:
The iret instruction in isr_handler_stub generates a general protection fault after returning from the fault_handler.

To Reproduce:

  • Remove the abort() call from fault_handler() and run the kernel, general protection faults will flood the screen.

Expected Result:

  • Ideally, the kernel should hang because of the infinite loop in boot.s and not because of the abort()

Proposed Solution:

  • Look into interrupts vs. traps. There are subtle differences in the way iret restores state after each of these
  • Use different fault handlers for different exceptions

References:

Handle hardware interrupts

Problem:

  • The kernel doesn't handle hardware interrupts
  • Some IRQs are mapped by default to positions in the IDT that are already taken, which calls wrong ISRs.

Proposed Solution:

  • Hardware interrupts are handled through calls made in response to IRQs. These should be implemented just like existing ISRs for exceptions.
  • Tell the PIC to remap IRQs based on the current IDT structure.

References:

Add QEMU to GitHub Actions setup

Problem:
Tests require QEMU to function

To Reproduce:

  • Run cargo test without QEMU installed

Expected Result:

  • Tests should pass

Proposed Solution:

  • apt install qemu? or have a docker container for build and test?

Port the project to Rust

Rust is a modern systems programming language that I've been interested in for a while. It seems like there are already a large number of OSes written in Rust. Since the project is still very small, I can migrate it to Rust pretty easily. Some benefits are:

  • Much simpler toolchain and build setup
  • Unit testing, documentation tools etc. can be run through cargo
  • Default Rust conventions are safer to use that C
  • Catch more bugs at compile time

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.