Rev 573 | Rev 590 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 573 | Rev 575 | ||
|---|---|---|---|
| Line 24... | Line 24... | ||
| 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | */ |
27 | */ |
| 28 | 28 | ||
| - | 29 | ||
| 29 | #include <arch.h> |
30 | #include <arch.h> |
| 30 | #include <arch/cp0.h> |
31 | #include <arch/cp0.h> |
| 31 | #include <arch/exception.h> |
32 | #include <arch/exception.h> |
| 32 | #include <arch/asm/regname.h> |
- | |
| 33 | #include <arch/asm.h> |
33 | #include <arch/asm.h> |
| 34 | #include <mm/vm.h> |
34 | #include <mm/vm.h> |
| - | 35 | ||
| 35 | #include <userspace.h> |
36 | #include <userspace.h> |
| 36 | #include <arch/console.h> |
37 | #include <arch/console.h> |
| 37 | #include <memstr.h> |
38 | #include <memstr.h> |
| 38 | #include <arch/interrupt.h> |
- | |
| 39 | #include <arch/drivers/arc.h> |
- | |
| 40 | #include <arch/drivers/keyboard.h> |
- | |
| 41 | #include <proc/thread.h> |
39 | #include <proc/thread.h> |
| 42 | #include <print.h> |
40 | #include <print.h> |
| 43 | 41 | ||
| - | 42 | #include <arch/interrupt.h> |
|
| - | 43 | #include <arch/drivers/arc.h> |
|
| - | 44 | #include <console/chardev.h> |
|
| - | 45 | ||
| - | 46 | #include <arch/asm/regname.h> |
|
| - | 47 | ||
| 44 | /* Size of the code jumping to the exception handler code |
48 | /* Size of the code jumping to the exception handler code |
| 45 | * - J+NOP |
49 | * - J+NOP |
| 46 | */ |
50 | */ |
| 47 | #define EXCEPTION_JUMP_SIZE 8 |
51 | #define EXCEPTION_JUMP_SIZE 8 |
| 48 | 52 | ||
| Line 52... | Line 56... | ||
| 52 | 56 | ||
| 53 | void arch_pre_mm_init(void) |
57 | void arch_pre_mm_init(void) |
| 54 | { |
58 | { |
| 55 | /* It is not assumed by default */ |
59 | /* It is not assumed by default */ |
| 56 | interrupts_disable(); |
60 | interrupts_disable(); |
| - | 61 | ||
| - | 62 | /* Initialize dispatch table */ |
|
| - | 63 | interrupt_init(); |
|
| 57 | 64 | ||
| 58 | arc_init(); |
65 | arc_init(); |
| 59 | 66 | ||
| 60 | /* Copy the exception vectors to the right places */ |
67 | /* Copy the exception vectors to the right places */ |
| 61 | memcpy(TLB_EXC, (char *)tlb_refill_entry, EXCEPTION_JUMP_SIZE); |
68 | memcpy(TLB_EXC, (char *)tlb_refill_entry, EXCEPTION_JUMP_SIZE); |
| Line 81... | Line 88... | ||
| 81 | * Start hardware clock. |
88 | * Start hardware clock. |
| 82 | */ |
89 | */ |
| 83 | cp0_compare_write(cp0_compare_value + cp0_count_read()); |
90 | cp0_compare_write(cp0_compare_value + cp0_count_read()); |
| 84 | 91 | ||
| 85 | console_init(); |
92 | console_init(); |
| 86 | keyboard_init(); |
- | |
| 87 | arc_print_memory_map(); |
93 | arc_print_memory_map(); |
| 88 | arc_print_devices(); |
94 | arc_print_devices(); |
| 89 | } |
95 | } |
| 90 | 96 | ||
| 91 | void arch_post_mm_init(void) |
97 | void arch_post_mm_init(void) |