Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc32/src/mm/page.c

    ref9a2a8 rb6b02c0  
    4949#include <print.h>
    5050#include <interrupt.h>
    51 #include <macros.h>
    5251
    5352void page_arch_init(void)
    5453{
    55         int flags = PAGE_CACHEABLE | PAGE_EXEC;
    56         page_mapping_operations = &pt_mapping_operations;
    57 
    58         page_table_lock(AS_KERNEL, true);
    59        
    60         /* Kernel identity mapping */
    61         //FIXME: We need to consider the possibility that
    62         //identity_base > identity_size and physmem_end.
    63         //This might lead to overflow if identity_size is too big.
    64         for (uintptr_t cur = PHYSMEM_START_ADDR;
    65             cur < min(KA2PA(config.identity_base) +
    66                 config.identity_size, config.physmem_end);
    67             cur += FRAME_SIZE)
    68                 page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags);
    69        
    70 
    71         page_table_unlock(AS_KERNEL, true);
    72         as_switch(NULL, AS_KERNEL);
    73 
    74         printf("as_context_table=0x%08x\n", as_context_table);
    75 
    76         /* Switch MMU to new context table */
    77         asi_u32_write(ASI_MMUREGS, 0x100, KA2PA(as_context_table) >> 4);
    78 
    79         //boot_page_table_free();
     54        if (config.cpu_active == 1)
     55                page_mapping_operations = &pt_mapping_operations;
    8056}
    8157
Note: See TracChangeset for help on using the changeset viewer.