Changes in / [826599a2:4cb938b] in mainline
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/amd64/Makefile.inc
r826599a2 r4cb938b 64 64 $(USPACE_PATH)/app/edit/edit \ 65 65 $(USPACE_PATH)/app/mixerctl/mixerctl \ 66 $(USPACE_PATH)/app/wavplay/wavplay \67 66 $(USPACE_PATH)/app/wavplay/wavplay 67 68 68 BOOT_OUTPUT = $(ROOT_PATH)/image.iso 69 69 PREBUILD = $(INITRD).img -
kernel/arch/ppc32/include/arch/interrupt.h
r826599a2 r4cb938b 49 49 #define VECTOR_DTLB_MISS_STORE 15 50 50 51 extern void start_decrementer(void); 51 extern void decrementer_start(uint32_t); 52 extern void decrementer_restart(void); 52 53 extern void interrupt_init(void); 53 54 extern void extint_handler(unsigned int, istate_t *); -
kernel/arch/ppc32/src/interrupt.c
r826599a2 r4cb938b 38 38 #include <typedefs.h> 39 39 #include <arch.h> 40 #include <time/clock.h>41 40 #include <ipc/sysipc.h> 42 41 #include <arch/drivers/pic.h> … … 46 45 #include <log.h> 47 46 48 void start_decrementer(void) 47 static uint32_t decrementer_value; 48 49 void decrementer_start(uint32_t val) 50 { 51 decrementer_value = val; 52 decrementer_restart(); 53 } 54 55 void decrementer_restart(void) 49 56 { 50 57 asm volatile ( 51 58 "mtdec %[dec]\n" 52 :: [dec] "r" ( 1000)59 :: [dec] "r" (decrementer_value) 53 60 ); 54 61 } … … 140 147 static void exception_decrementer(unsigned int n, istate_t *istate) 141 148 { 142 start_decrementer();149 decrementer_restart(); 143 150 clock(); 144 151 } -
kernel/arch/ppc32/src/ppc32.c
r826599a2 r4cb938b 47 47 #include <mm/page.h> 48 48 #include <mm/km.h> 49 #include <time/clock.h> 49 50 #include <abi/proc/uarg.h> 50 51 #include <console/console.h> … … 99 100 interrupt_init(); 100 101 102 ofw_tree_node_t *cpus_node; 103 ofw_tree_node_t *cpu_node; 104 ofw_tree_property_t *freq_prop; 105 106 cpus_node = ofw_tree_lookup("/cpus"); 107 if (!cpus_node) 108 panic("Could not find cpus node."); 109 110 cpu_node = cpus_node->child; 111 if (!cpu_node) 112 panic("Could not find first cpu."); 113 114 freq_prop = ofw_tree_getprop(cpu_node, "clock-frequency"); 115 if (!freq_prop) 116 panic("Could not get frequency property."); 117 118 uint32_t freq; 119 freq = *((uint32_t *) freq_prop->value); 120 101 121 /* Start decrementer */ 102 start_decrementer();122 decrementer_start(freq / HZ); 103 123 } 104 124
Note:
See TracChangeset
for help on using the changeset viewer.