GithubHelp home page GithubHelp logo

dreamos82 / dreamos64 Goto Github PK

View Code? Open in Web Editor NEW
144.0 8.0 6.0 478 KB

My experiments with osdev... again

Makefile 2.25% Assembly 5.64% C 92.11%
osdev operating-system c assembly kernel operating-system-development operating-system-kernel operating-system-learning operating-systems-project x86-64

dreamos64's People

Contributors

deanoburrito avatar dreamos82 avatar lspinoti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dreamos64's Issues

Create basic logging feature

It should have at least 4 level:

  • Verbose
  • Info
  • Error
  • Debug

And maybe could be nice to add a draft support for logging device selection (so far there should be only the qemu, but in the future if the loggin service changes, it could be nice to make it easy to update the library.

Probably at this moment could be something like:

switch(OUTPUT):
     case SERIAL:
           //Use the qemu logging
     ...
     case OTHER_DEVICE:
          // To be done...

In theory we can do something like that there is a log_init function where the user can specify the output type, and it will use it in the future, but if not done the qemu logging is going to be used.

I see so far we can log on: Serial IO (aka qemu), Framebuffer, and predispose also a file output (probably at this moment it will revert to qemu logging, and maybe (but it can be discussed since i'm supporting the legacy vga driver too, we should add an option for legacy too?

And other thing to do is that we should probably remove the logging from the printf?

For string formatting i have started a draft of vsprintf function that probably can be used. It doesn't support all the feature of a printf, so if not implemented or they can be left as todo those cases (eventually create an issue with the missing cases), or implemented.

Clean gcc output

Try clean all (or most of them) the warning generated by gcc compilation.

#PF when using 4kb pages

If trying to use 4kb pages, the OS cause a #PF exception when trying to access RSDT items, this is because with 4kb pages we map only the first 4mb, while with 2mb pages we map the first MB.

Ideally all the acpi structures needed by the os should be mapped for the kernel in the higher half, and accessed from there.

Map framebuffer

Framebuffer should be mapped or via Page fault or before loading the kernel, either way it has to be done.

The FB address can't be defined as constant, because it can change depending on the machine, so it should be read directly from mulbitoot structure and mapped.

Improve print functions

should be ideal if _printStr can use the framebuffer (but probably is better to do it after a basic paging handler).

But for now should be ideal to have:

  1. a basic printf (probably it worth copying it from the old DreamOs if possible)
  2. _printch should write to the log instad of the _printStr
  3. a print function that can print substrings
  4. See #74 (print negative numbers and support %u...)

grub.cfg

// More modules may be added here in the form module path cmdline

Shouldn't it be 'module2'? Since you use multiboot2

edit: format

Add rdmsr function

Create a function that implement a c wrapper for the rdmsr asm instruction.

Basic PF handling

this first implementation will always allocate an address if a #PF is caused by read/access of unmapped location.

VirtualBox framebuffer not working with 4k pages

When trying DreamOS on VirtualBox, it doesn't work when 4k pages are used.

The multiboot structure holding the FB information, when read by the kernel it contains all 0s.

If legacy VGA driver is used or 2Mb pages are used it apparently works.

Add x2apic support

Work is not much and basically it sum up into two parts:

  • Identify if the X2Apic is supported, if yes enable it
  • Update the write_apic_register/read_apic_register functions to check what type of apic is being used and use the correct instructions to access the register.

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.