Changeset ef9a2a8 in mainline for kernel/arch/sparc32/src/mm/page.c
- Timestamp:
- 2013-09-15T19:23:19Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3efc35a
- Parents:
- b6b02c0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc32/src/mm/page.c
rb6b02c0 ref9a2a8 49 49 #include <print.h> 50 50 #include <interrupt.h> 51 #include <macros.h> 51 52 52 53 void page_arch_init(void) 53 54 { 54 if (config.cpu_active == 1) 55 page_mapping_operations = &pt_mapping_operations; 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(); 56 80 } 57 81
Note:
See TracChangeset
for help on using the changeset viewer.