From 670085f41e7706be51a1e99f44a637313b96419c Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Fri, 8 Aug 2014 16:26:48 +0200 Subject: updated readme and minor changes in pmm --- README.md | 14 ++++++++++++++ kernel/mem.c | 19 +++++++++++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4b2ba90..b7a8ce5 100644 --- a/README.md +++ b/README.md @@ -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(""); - - } -- cgit v1.2.3