Changeset 7e7c8747 in mainline for kernel/arch/sparc64/src/cpu/cpu.c
- Timestamp:
- 2006-12-17T12:11:00Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 95155b0c
- Parents:
- 771cd22
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/cpu/cpu.c
r771cd22 r7e7c8747 45 45 #include <macros.h> 46 46 47 /** Perform sparc64 specific initialization of the processor structure for the current processor. */ 47 /** Perform sparc64 specific initialization of the processor structure for the 48 * current processor. 49 */ 48 50 void cpu_arch_init(void) 49 51 { … … 67 69 mid = *((uint32_t *) prop->value); 68 70 if (mid == CPU->arch.mid) { 69 prop = ofw_tree_getprop(node, "clock-frequency"); 71 prop = ofw_tree_getprop(node, 72 "clock-frequency"); 70 73 if (prop && prop->value) 71 clock_frequency = *((uint32_t *) prop->value); 74 clock_frequency = *((uint32_t *) 75 prop->value); 72 76 } 73 77 } … … 81 85 * Lock CPU stack in DTLB. 82 86 */ 83 uintptr_t base = ALIGN_DOWN(config.base, 1 <<KERNEL_PAGE_WIDTH);87 uintptr_t base = ALIGN_DOWN(config.base, 1 << KERNEL_PAGE_WIDTH); 84 88 85 if (!overlaps((uintptr_t) CPU->stack, PAGE_SIZE, base, (1<<KERNEL_PAGE_WIDTH))) { 89 if (!overlaps((uintptr_t) CPU->stack, PAGE_SIZE, base, (1 << 90 KERNEL_PAGE_WIDTH))) { 86 91 /* 87 92 * Kernel stack of this processor is not locked in DTLB. … … 89 94 * Second, create a locked mapping for it. 90 95 */ 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); 96 dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_NUCLEUS, (uintptr_t) 97 CPU->stack); 98 dtlb_insert_mapping((uintptr_t) CPU->stack, KA2PA(CPU->stack), 99 PAGESIZE_8K, true, true); 93 100 } 94 101 } … … 104 111 * This function is called by the bootstrap processor. 105 112 * 106 * @param m Processor structure of the CPU for which version information is to be printed. 113 * @param m Processor structure of the CPU for which version information is to 114 * be printed. 107 115 */ 108 116 void cpu_print_report(cpu_t *m) … … 152 160 } 153 161 154 printf("cpu%d: manuf=%s, impl=%s, mask=%d (%dMHz)\n", 155 m->id, manuf, impl, m->arch.ver.mask, m->arch.clock_frequency/1000000);162 printf("cpu%d: manuf=%s, impl=%s, mask=%d (%dMHz)\n", m->id, manuf, 163 impl, m->arch.ver.mask, m->arch.clock_frequency / 1000000); 156 164 } 157 165
Note:
See TracChangeset
for help on using the changeset viewer.