diff --git a/core/main.c b/core/main.c index c3817e1..eece175 100644 --- a/core/main.c +++ b/core/main.c @@ -63,6 +63,9 @@ void kmain(unsigned long magic, unsigned long addr) printf("Setting up Pagination\n"); paddr_t lastUserByMem; memSetup(upper_mem, &lastUserByMem); +#ifdef RUN_TEST + testPhymem(); +#endif pagingSetup(lastUserByMem); printf("Setting up IRQ handlers\n"); diff --git a/tests/test.c b/tests/test.c index a92b09e..c5662df 100644 --- a/tests/test.c +++ b/tests/test.c @@ -3,7 +3,7 @@ #include "serial.h" #include "vga.h" -static void testPhymem() +void testPhymem(void) { printf("Testing memory PHY\n"); struct mem_desc *allocated_page_list; @@ -38,9 +38,8 @@ static void testPhymem() } } -void run_test() +void run_test(void) { - testPhymem(); printf("Testing Serial"); serialWrite('h'); serialWrite('e'); diff --git a/tests/test.h b/tests/test.h index 3715a92..b05cda1 100644 --- a/tests/test.h +++ b/tests/test.h @@ -1,3 +1,4 @@ #pragma once -void run_test(); +void testPhymem(void); +void run_test(void);