Subversion Repositories HelenOS

Rev

Rev 1901 | Rev 2071 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1901 Rev 1936
Line 52... Line 52...
52
#include <arch/drivers/arc.h>
52
#include <arch/drivers/arc.h>
53
#include <console/chardev.h>
53
#include <console/chardev.h>
54
#include <arch/debugger.h>
54
#include <arch/debugger.h>
55
#include <genarch/fb/fb.h>
55
#include <genarch/fb/fb.h>
56
#include <macros.h>
56
#include <macros.h>
-
 
57
#include <ddi/device.h>
57
 
58
 
58
#include <arch/asm/regname.h>
59
#include <arch/asm/regname.h>
59
 
60
 
60
/* Size of the code jumping to the exception handler code
61
/* Size of the code jumping to the exception handler code
61
 * - J+NOP
62
 * - J+NOP
Line 96... Line 97...
96
    /* Initialize dispatch table */
97
    /* Initialize dispatch table */
97
    exception_init();
98
    exception_init();
98
    arc_init();
99
    arc_init();
99
 
100
 
100
    /* Copy the exception vectors to the right places */
101
    /* Copy the exception vectors to the right places */
101
    memcpy(TLB_EXC, (char *)tlb_refill_entry, EXCEPTION_JUMP_SIZE);
102
    memcpy(TLB_EXC, (char *) tlb_refill_entry, EXCEPTION_JUMP_SIZE);
102
    memcpy(NORM_EXC, (char *)exception_entry, EXCEPTION_JUMP_SIZE);
103
    memcpy(NORM_EXC, (char *) exception_entry, EXCEPTION_JUMP_SIZE);
103
    memcpy(CACHE_EXC, (char *)cache_error_entry, EXCEPTION_JUMP_SIZE);
104
    memcpy(CACHE_EXC, (char *) cache_error_entry, EXCEPTION_JUMP_SIZE);
104
 
105
   
105
    interrupt_init();
-
 
106
    /*
106
    /*
107
     * Switch to BEV normal level so that exception vectors point to the kernel.
107
     * Switch to BEV normal level so that exception vectors point to the kernel.
108
     * Clear the error level.
108
     * Clear the error level.
109
     */
109
     */
110
    cp0_status_write(cp0_status_read() & ~(cp0_status_bev_bootstrap_bit|cp0_status_erl_error_bit));
110
    cp0_status_write(cp0_status_read() & ~(cp0_status_bev_bootstrap_bit|cp0_status_erl_error_bit));
111
 
111
 
112
    /*
112
    /*
113
     * Mask all interrupts
113
     * Mask all interrupts
114
     */
114
     */
115
    cp0_mask_all_int();
115
    cp0_mask_all_int();
116
 
-
 
117
    /*
116
       
118
     * Unmask hardware clock interrupt.
-
 
119
     */
-
 
120
    cp0_unmask_int(TIMER_IRQ);
-
 
121
 
-
 
122
    console_init();
-
 
123
    debugger_init();
117
    debugger_init();
124
}
118
}
125
 
119
 
126
void arch_post_mm_init(void)
120
void arch_post_mm_init(void)
127
{
121
{
-
 
122
    interrupt_init();
-
 
123
    console_init(device_assign_devno());
128
#ifdef CONFIG_FB
124
#ifdef CONFIG_FB
129
    fb_init(0x12000000, 640, 480, 24, 1920, false); // gxemul framebuffer
125
    fb_init(0x12000000, 640, 480, 24, 1920, false); // gxemul framebuffer
130
#endif
126
#endif
131
    sysinfo_set_item_val("machine." STRING(MACHINE),NULL,1);
127
    sysinfo_set_item_val("machine." STRING(MACHINE), NULL, 1);
132
}
128
}
133
 
129
 
134
void arch_post_cpu_init(void)
130
void arch_post_cpu_init(void)
135
{
131
{
136
}
132
}