fix self test

This commit is contained in:
Mathieu Maret 2018-11-12 18:06:46 +01:00
parent 18be89ebfe
commit fd153e305d
3 changed files with 7 additions and 4 deletions

View File

@ -63,6 +63,9 @@ void kmain(unsigned long magic, unsigned long addr)
printf("Setting up Pagination\n"); printf("Setting up Pagination\n");
paddr_t lastUserByMem; paddr_t lastUserByMem;
memSetup(upper_mem, &lastUserByMem); memSetup(upper_mem, &lastUserByMem);
#ifdef RUN_TEST
testPhymem();
#endif
pagingSetup(lastUserByMem); pagingSetup(lastUserByMem);
printf("Setting up IRQ handlers\n"); printf("Setting up IRQ handlers\n");

View File

@ -3,7 +3,7 @@
#include "serial.h" #include "serial.h"
#include "vga.h" #include "vga.h"
static void testPhymem() void testPhymem(void)
{ {
printf("Testing memory PHY\n"); printf("Testing memory PHY\n");
struct mem_desc *allocated_page_list; struct mem_desc *allocated_page_list;
@ -38,9 +38,8 @@ static void testPhymem()
} }
} }
void run_test() void run_test(void)
{ {
testPhymem();
printf("Testing Serial"); printf("Testing Serial");
serialWrite('h'); serialWrite('h');
serialWrite('e'); serialWrite('e');

View File

@ -1,3 +1,4 @@
#pragma once #pragma once
void run_test(); void testPhymem(void);
void run_test(void);