From 2df8875a886fb09176ca72b4167ce3f1a7afbe8e Mon Sep 17 00:00:00 2001 From: Bahadir Balban Date: Thu, 7 May 2009 11:08:35 +0300 Subject: [PATCH] Initialisation works OK with new address space structure. Going to add: - Address space create/delete add/remove - KCTB create/delete add/remove --- src/glue/arm/init.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/glue/arm/init.c b/src/glue/arm/init.c index 0c2e849..2828535 100644 --- a/src/glue/arm/init.c +++ b/src/glue/arm/init.c @@ -59,11 +59,14 @@ void init_kernel_mappings(void) memset(current, 0, sizeof(struct ktcb)); /* - * Setup a dummy current ktcb over the bootstack, so that generic - * mapping functions can use this as the pgd source. + * We are currently on the bootstack. End of bootstack would + * eventually become the ktcb of the first pager. We use a + * statically allocated address_space structure for the pager. */ current->space = &pager_space; - TASK_PGD(current) = &kspace; + + /* Access physical address of pager_space to assign with initial pgd */ + ((struct address_space *)virt_to_phys(current->space))->pgd = &kspace; } void print_sections(void) @@ -357,11 +360,9 @@ void start_kernel(void) /* Initialise section mappings for the kernel area */ init_kernel_mappings(); - printascii("\nStarting virtual memory...\n"); /* Enable virtual memory and jump to virtual addresses */ start_vm(); - printascii("\nStarted virtual memory...\n"); /* PMD tables initialised */ init_pmd_tables();