Changeset 84060e2 in mainline for kernel/arch/sparc64/src/cpu/cpu.c
- Timestamp:
- 2006-10-09T19:29:42Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8ce8499
- Parents:
- e4398200
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/cpu/cpu.c
re4398200 r84060e2 41 41 #include <arch/types.h> 42 42 #include <arch/drivers/tick.h> 43 #include <arch/mm/page.h> 44 #include <arch/mm/tlb.h> 45 #include <macros.h> 43 46 44 47 /** Perform sparc64 specific initialization of the processor structure for the current processor. */ … … 53 56 CPU->arch.mid = upa_config.mid; 54 57 58 /* 59 * Detect processor frequency. 60 */ 55 61 node = ofw_tree_find_child_by_device_type(ofw_tree_lookup("/"), "cpu"); 56 62 while (node) { … … 71 77 CPU->arch.clock_frequency = clock_frequency; 72 78 tick_init(); 79 80 /* 81 * Lock CPU stack in DTLB. 82 */ 83 uintptr_t base = ALIGN_DOWN(config.base, 1<<KERNEL_PAGE_WIDTH); 84 85 if (!overlaps((uintptr_t) CPU->stack, PAGE_SIZE, base, (1<<KERNEL_PAGE_WIDTH))) { 86 /* 87 * Kernel stack of this processor is not locked in DTLB. 88 * First, demap any already existing mappings. 89 * Second, create a locked mapping for it. 90 */ 91 dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_NUCLEUS, (uintptr_t) CPU->stack); 92 dtlb_insert_mapping((uintptr_t) CPU->stack, KA2PA(CPU->stack), PAGESIZE_8K, true, true); 93 } 94 73 95 } 74 96
Note:
See TracChangeset
for help on using the changeset viewer.