diff options
| -rw-r--r-- | README.md | 14 | ||||
| -rw-r--r-- | kernel/mem.c | 19 |
2 files changed, 31 insertions, 2 deletions
@@ -4,6 +4,8 @@ Welcome to FoolOS Disclaimer ---------- +THIS IS WORK IN PROGRESS. + This is a simple and useless "operating system", with very basic features, sorry. It is the fruit of my fundamental explorations of the 32-bit protected mode, interrupt handling, memory management and @@ -21,6 +23,18 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +Issues +------ + +* memory map may be larger than mbr, but 0x0000 is used to check for end. +* memory map location is hardcoded +* ~4 first 4mb of physical mem are reserved by mem manager (hardcoded) +* bootloader loads only 15sectors of kernel into mem. ~7KB? +* Makefile is hardcoded and contains mistakes too! +* size of bitmap to track free blocks of physical memory is hardcoded to max. +* physical memory manager allocator naively implemented. + + MY NOTES BELOW THIS LINE ======================== diff --git a/kernel/mem.c b/kernel/mem.c index e1253b1..a0a6277 100644 --- a/kernel/mem.c +++ b/kernel/mem.c @@ -132,6 +132,22 @@ void pmmngr_free_block (void* p) { } +/* +void mem_test_3() +{ + uint32_t *addr; + + addr=pmmngr_alloc_block(); + scr_put_string("alloc 1: "); + scr_put_hex32(addr); + scr_put_string_nl(""); + + addr=pmmngr_alloc_block(); + scr_put_string("alloc 2: "); + scr_put_hex32(addr); + scr_put_string_nl(""); +} + void mem_test_2() { //crossing 512MB boundary! @@ -186,6 +202,7 @@ void mem_test(int start, int end, int steps) scr_put_string_nl(""); } } +*/ void mem_init(uint16_t *memmap) { @@ -239,7 +256,5 @@ void mem_init(uint16_t *memmap) scr_put_string_nl(""); - - } |
