Rev 330 | Rev 341 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 330 | Rev 332 | ||
---|---|---|---|
Line 34... | Line 34... | ||
34 | #include <mm/vm.h> |
34 | #include <mm/vm.h> |
35 | #include <userspace.h> |
35 | #include <userspace.h> |
36 | #include <arch/console.h> |
36 | #include <arch/console.h> |
37 | #include <memstr.h> |
37 | #include <memstr.h> |
38 | #include <arch/interrupt.h> |
38 | #include <arch/interrupt.h> |
- | 39 | #include <arch/drivers/arc.h> |
|
39 | 40 | ||
40 | #include <print.h> |
41 | #include <print.h> |
41 | 42 | ||
42 | /* Size of the code jumping to the exception handler code |
43 | /* Size of the code jumping to the exception handler code |
43 | * - J+NOP |
44 | * - J+NOP |
Line 51... | Line 52... | ||
51 | void arch_pre_mm_init(void) |
52 | void arch_pre_mm_init(void) |
52 | { |
53 | { |
53 | /* It is not assumed by default */ |
54 | /* It is not assumed by default */ |
54 | cpu_priority_high(); |
55 | cpu_priority_high(); |
55 | 56 | ||
- | 57 | init_arc(); |
|
- | 58 | ||
56 | /* Copy the exception vectors to the right places */ |
59 | /* Copy the exception vectors to the right places */ |
57 | memcpy(TLB_EXC, (char *)tlb_refill_entry, EXCEPTION_JUMP_SIZE); |
60 | memcpy(TLB_EXC, (char *)tlb_refill_entry, EXCEPTION_JUMP_SIZE); |
58 | memcpy(NORM_EXC, (char *)exception_entry, EXCEPTION_JUMP_SIZE); |
61 | memcpy(NORM_EXC, (char *)exception_entry, EXCEPTION_JUMP_SIZE); |
59 | memcpy(CACHE_EXC, (char *)cache_error_entry, EXCEPTION_JUMP_SIZE); |
62 | memcpy(CACHE_EXC, (char *)cache_error_entry, EXCEPTION_JUMP_SIZE); |
60 | 63 | ||
Line 77... | Line 80... | ||
77 | * Start hardware clock. |
80 | * Start hardware clock. |
78 | */ |
81 | */ |
79 | cp0_compare_write(cp0_compare_value + cp0_count_read()); |
82 | cp0_compare_write(cp0_compare_value + cp0_count_read()); |
80 | 83 | ||
81 | console_init(); |
84 | console_init(); |
- | 85 | arc_print_memory_map(); |
|
82 | } |
86 | } |
83 | 87 | ||
84 | void arch_post_mm_init(void) |
88 | void arch_post_mm_init(void) |
85 | { |
89 | { |
86 | } |
90 | } |
Line 108... | Line 112... | ||
108 | 112 | ||
109 | void before_thread_runs_arch(void) |
113 | void before_thread_runs_arch(void) |
110 | { |
114 | { |
111 | supervisor_sp = (__address) &THREAD->kstack[THREAD_STACK_SIZE-SP_DELTA]; |
115 | supervisor_sp = (__address) &THREAD->kstack[THREAD_STACK_SIZE-SP_DELTA]; |
112 | } |
116 | } |
113 | - | ||
114 | - |