Changes in / [826599a2:4cb938b] in mainline


Ignore:
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/amd64/Makefile.inc

    r826599a2 r4cb938b  
    6464        $(USPACE_PATH)/app/edit/edit \
    6565        $(USPACE_PATH)/app/mixerctl/mixerctl \
    66         $(USPACE_PATH)/app/wavplay/wavplay \
    67        
     66        $(USPACE_PATH)/app/wavplay/wavplay
     67
    6868BOOT_OUTPUT = $(ROOT_PATH)/image.iso
    6969PREBUILD = $(INITRD).img
  • kernel/arch/ppc32/include/arch/interrupt.h

    r826599a2 r4cb938b  
    4949#define VECTOR_DTLB_MISS_STORE      15
    5050
    51 extern void start_decrementer(void);
     51extern void decrementer_start(uint32_t);
     52extern void decrementer_restart(void);
    5253extern void interrupt_init(void);
    5354extern void extint_handler(unsigned int, istate_t *);
  • kernel/arch/ppc32/src/interrupt.c

    r826599a2 r4cb938b  
    3838#include <typedefs.h>
    3939#include <arch.h>
    40 #include <time/clock.h>
    4140#include <ipc/sysipc.h>
    4241#include <arch/drivers/pic.h>
     
    4645#include <log.h>
    4746
    48 void start_decrementer(void)
     47static uint32_t decrementer_value;
     48
     49void decrementer_start(uint32_t val)
     50{
     51        decrementer_value = val;
     52        decrementer_restart();
     53}
     54
     55void decrementer_restart(void)
    4956{
    5057        asm volatile (
    5158                "mtdec %[dec]\n"
    52                 :: [dec] "r" (1000)
     59                :: [dec] "r" (decrementer_value)
    5360        );
    5461}
     
    140147static void exception_decrementer(unsigned int n, istate_t *istate)
    141148{
    142         start_decrementer();
     149        decrementer_restart();
    143150        clock();
    144151}
  • kernel/arch/ppc32/src/ppc32.c

    r826599a2 r4cb938b  
    4747#include <mm/page.h>
    4848#include <mm/km.h>
     49#include <time/clock.h>
    4950#include <abi/proc/uarg.h>
    5051#include <console/console.h>
     
    99100        interrupt_init();
    100101       
     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
    101121        /* Start decrementer */
    102         start_decrementer();
     122        decrementer_start(freq / HZ);
    103123}
    104124
Note: See TracChangeset for help on using the changeset viewer.