dreamos82 / dreamos64 Goto Github PK
View Code? Open in Web Editor NEWMy experiments with osdev... again
My experiments with osdev... again
Some text is not properlly overwritten, some strings are partially lost.
this is for the VGA scrolling
Add support for printing negative numbers and support for %u flag.
It should have at least 4 level:
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.
currently they are supporting only 32bits
Probably going to use the bitmap method.
Btw with this task the basic data structure will be created and initialized to the correct sizes.
(other tasks will come)
Same as malloc, but it will allocate only addresses in kernel space.
Try clean all (or most of them) the warning generated by gcc compilation.
If possible
(They are read from multiboot mmap)
Probably \t and \n should go in _printCh not _printStr.
The function given a virtual address should map it into the page table (or page dir if using 4mb pages)
Currently address is not defined and it starts from 0.
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.
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.
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:
It currently is initializing the kernel reserver area setting first 10 bits of itself to 1, done in line 32 in bitmap.c file:
memory_map[0] = 0x3ff
This should be updated and initialize first X item of bitmap as 0, according to the page size used by the system.
// More modules may be added here in the form module path cmdline
Shouldn't it be 'module2'? Since you use multiboot2
edit: format
Parameters: color, x coordinate, y coordinate
Create a function that implement a c wrapper for the rdmsr asm instruction.
Following DreamOs#54 , I'm opening this issue. Would be nice if you could make such a floppy, and I will be happy to test it as a part of laptop's coreboot BIOS.
Implement the C function for write the MSR register.
this first implementation will always allocate an address if a #PF is caused by read/access of unmapped location.
Kernle should start from 0xC0100000
After cpuid functions are called _printStringAndNumber are causing InvalidOpcode Exception or Page fault.
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.
Fix the C and Nasm defined flags support used to enable/disable features of the kernel.
Work is not much and basically it sum up into two parts:
It contains information about memory that can be used by the kernel (so can be useful for phys memory management).
currently it let to free any memory location marked as used.
Currently i'm using 2mib pages.
The idea is to pass to the kernel the addresses of initialized multiboot tags that it needs to use.
It has to take into account the support for 4k/2MB pages.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.