Code Monkey home page Code Monkey logo

vv4os's People

Contributors

vodozhaba avatar

Stargazers

 avatar

Watchers

 avatar

vv4os's Issues

Incorrect operand sizes in PortWrite32()

%w means 'word'.

    static inline void PortWrite32(uint16_t port, uint32_t value) {
        __asm volatile("outl %w0, %w1" : : "a" (value), "d" (port));
    }

    static inline uint32_t PortRead32(uint16_t port) {
        uint32_t ret;
        __asm volatile("inl %w1, %w0" : "=a" (ret) : "d" (port));
        return ret;
    }

Stack is not properly aligned

The boot.asm file aligns bootstrap stack on 4-byte boundaries, but x86 specification requires it to be aligned on 16-byte boundaries!

IRQ1 is only handled once

Try to make a simple handler and register it for IRQ1. It will be called on the first time, but will not on any others. It runs smoothly, however, on IRQ0.

IRQ1 is only handled once

Try to make a simple handler and register it for IRQ1. It will be called on the first time, but will not on any others. It runs smoothly, however, on IRQ0.

printf() features

Add these features to printf():

  • Length specifier
  • Floating point output (including hexadecimal)
  • Binary output
  • Scientific notation
  • %n support

First megabyte protection

The physical memory manager never allocates the NULL frame, however, it may allocate other frames in the first megabyte, e.g. the framebuffer, which will lead to data corruption and/or unexpected peripheral device behaviour.

Replace with logic

/vv4os/io/uart.c:76: PortWrite8(INT_IDENT_AND_FIFO_CTRL, 0xC7); // FIXME: magic number
I copied & pasted that from OSDev wiki without researching. Gotta replace that magic number with logic.

malloc alignment

Accessing unaligned elements in C is undefined behaviour, better fix that.

Page tables aren't mapped

The virtual memory manager creates the tables in the physical memory, but they don't get identity mapped, which causes page faults if they're accessed after enabling paging.

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.