eylon-44 / buzz-os Goto Github PK
View Code? Open in Web Editor NEWA small x86 32-bit operating system.
License: MIT License
A small x86 32-bit operating system.
License: MIT License
Currently, the kernel is being loaded as a flat binary by the bootsector at physcial address 0x1000.
The problem is that the kernel size is limited that way.
Because the BIOS loads the bootsector at 0x7c00, and the kernel is being loaded at physcial address 0x1000, we only have 0x7c00-0x1000 memory space for the kernel, i.e. 0x6c00 bytes i.e. 54 sectors.
Loading over 54 sectors will override the bootsector while it's still running, meaning the kernel won't start.
To fix, the kernel must be loaded above 0x7e00 (the end of the bootsector).
The prefered phyical address to load the kernel in is 0x100000 (1MB).
In order to do that we must load the kernel outside of Real-Mode, as it is limited to 1MB in memory.
The bootsector should switch to Protected-Mode and jump to a C script that loads the kernel at 1MB using ATA PIO.
Note
This problem is debugger related only, as the program executes as intended on its own but only has issues with gdb.
After jumping to the higher half kernel (0xC0000000), when using gdb's ni
(next instruction) command on a call
instruction gdb seems to freeze.
This does not occur when
add-symbol-table bin/symbols/kernel.elf 0xC0001000
)n
(next) on C code, or si
(step instruction) commands.jmp
instruction (not call
)Note
I am not sure exactly what is wrong with the symbol table, but even if I am lazy and won't fix this it should be fine as it does not affect the actuall kernel, only a small part of the debugging process that can be replaced with the si
command.
Due to the fact that the problem won't occur when not loading the symbol table, and only happens when trying to skip a call instruction, meaning the debugger has to know where the called function starts and ends in order to be able to execute and skip it, the problem must be in the symbol table.
Assumptions
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.