aboutsummaryrefslogtreecommitdiff
path: root/kernel/l0/kmain.c
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ens.fr>2014-12-13 13:10:18 +0100
committerAlex Auvolat <alex.auvolat@ens.fr>2014-12-13 13:10:18 +0100
commit9a494b5b0718eafd89e4bb40dda33b0a4f6ee64f (patch)
tree8c8c70651e74298091c3181d9bdd57a76b0de9bf /kernel/l0/kmain.c
parentd24b3806edddbfff587f1cf91a64338e0fadd48f (diff)
downloadkogata-9a494b5b0718eafd89e4bb40dda33b0a4f6ee64f.tar.gz
kogata-9a494b5b0718eafd89e4bb40dda33b0a4f6ee64f.zip
Remove hard-coded region types.
Diffstat (limited to 'kernel/l0/kmain.c')
-rw-r--r--kernel/l0/kmain.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/l0/kmain.c b/kernel/l0/kmain.c
index 416b802..2e34868 100644
--- a/kernel/l0/kmain.c
+++ b/kernel/l0/kmain.c
@@ -22,16 +22,16 @@ void breakpoint_handler(registers_t *regs) {
}
void region_test1() {
- void* p = region_alloc(0x1000, REGION_T_HW, 0);
+ void* p = region_alloc(0x1000, "Test region", 0);
dbg_printf("Allocated one-page region: 0x%p\n", p);
dbg_print_region_info();
- void* q = region_alloc(0x1000, REGION_T_HW, 0);
+ void* q = region_alloc(0x1000, "Test region", 0);
dbg_printf("Allocated one-page region: 0x%p\n", q);
dbg_print_region_info();
- void* r = region_alloc(0x2000, REGION_T_HW, 0);
+ void* r = region_alloc(0x2000, "Test region", 0);
dbg_printf("Allocated two-page region: 0x%p\n", r);
dbg_print_region_info();
- void* s = region_alloc(0x10000, REGION_T_CORE_HEAP, 0);
+ void* s = region_alloc(0x10000, "Test region", 0);
dbg_printf("Allocated 16-page region: 0x%p\n", s);
dbg_print_region_info();
region_free(p);
@@ -52,7 +52,7 @@ void region_test2() {
// allocate a big region and try to write into it
dbg_printf("Begin region test 2...");
const size_t n = 200;
- void* p0 = region_alloc(n * PAGE_SIZE, REGION_T_HW, default_allocator_pf_handler);
+ void* p0 = region_alloc(n * PAGE_SIZE, "Test big region", default_allocator_pf_handler);
for (size_t i = 0; i < n; i++) {
uint32_t *x = (uint32_t*)(p0 + i * PAGE_SIZE);
x[0] = 12;