diff --git a/src/mm/page_tables.c b/src/mm/page_tables.c index 80a157e..bac66df 100644 --- a/src/mm/page_tables.c +++ b/src/mm/page_tables.c @@ -70,6 +70,11 @@ void map_page(void *physaddr, void *virtualaddr, unsigned int flags) { // Here you need to check whether the PT entry is present. // When it is, then there is already a mapping present. What do you do now? + if(pt[ptindex] & 0x1) + { + printf("this page 0x%X is already mapped\n", virtualaddr); + } + pt[ptindex] = ((unsigned long)physaddr) | (flags & 0xFFF); // Present // Now you need to flush the entry in the TLB