Subversion Repositories HelenOS

Rev

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

Rev 2411 Rev 2464
Line 31... Line 31...
31
 */
31
 */
32
/** @file
32
/** @file
33
 *  @brief ARM32 architecture specific functions.
33
 *  @brief ARM32 architecture specific functions.
34
 */
34
 */
35
 
35
 
36
 
-
 
37
#include <arch.h>
36
#include <arch.h>
38
#include <arch/boot.h>
37
#include <arch/boot.h>
39
#include <config.h>
38
#include <config.h>
40
#include <arch/console.h>
39
#include <arch/console.h>
41
#include <ddi/device.h>
40
#include <ddi/device.h>
Line 51... Line 50...
51
#include <userspace.h>
50
#include <userspace.h>
52
 
51
 
53
/** Information about loaded tasks. */
52
/** Information about loaded tasks. */
54
bootinfo_t bootinfo;
53
bootinfo_t bootinfo;
55
 
54
 
56
 
-
 
57
/** Performs arm32 specific initialization before main_bsp() is called. */
55
/** Performs arm32 specific initialization before main_bsp() is called. */
58
void arch_pre_main(void)
56
void arch_pre_main(void)
59
{
57
{
60
    int i;
58
    int i;
61
 
59
 
Line 66... Line 64...
66
        init.tasks[i].size = bootinfo.tasks[i].size;
64
        init.tasks[i].size = bootinfo.tasks[i].size;
67
    }
65
    }
68
   
66
   
69
}
67
}
70
 
68
 
71
 
-
 
72
/** Performs arm32 specific initialization before mm is initialized. */
69
/** Performs arm32 specific initialization before mm is initialized. */
73
void arch_pre_mm_init(void)
70
void arch_pre_mm_init(void)
74
{
71
{
75
    /* It is not assumed by default */
72
    /* It is not assumed by default */
76
    interrupts_disable();
73
    interrupts_disable();
77
}
74
}
78
 
75
 
79
 
-
 
80
/** Performs arm32 specific initialization afterr mm is initialized. */
76
/** Performs arm32 specific initialization afterr mm is initialized. */
81
void arch_post_mm_init(void)
77
void arch_post_mm_init(void)
82
{
78
{
83
    machine_hw_map_init();
79
    machine_hw_map_init();
84
 
80
 
85
    /* Initialize dispatch table */
81
    /* Initialize exception dispatch table */
86
    exception_init();
82
    exception_init();
87
 
83
 
88
    interrupt_init();
84
    interrupt_init();
89
   
85
   
90
    console_init(device_assign_devno());
86
    console_init(device_assign_devno());
Line 92... Line 88...
92
#ifdef CONFIG_FB
88
#ifdef CONFIG_FB
93
    fb_init(machine_get_fb_address(), 640, 480, 1920, VISUAL_RGB_8_8_8);
89
    fb_init(machine_get_fb_address(), 640, 480, 1920, VISUAL_RGB_8_8_8);
94
#endif
90
#endif
95
}
91
}
96
 
92
 
97
 
-
 
98
/** Performs arm32 specific tasks needed after cpu is initialized.
93
/** Performs arm32 specific tasks needed after cpu is initialized.
99
 *
94
 *
100
 * Currently the function is empty.
95
 * Currently the function is empty.
101
 */
96
 */
102
void arch_post_cpu_init(void)
97
void arch_post_cpu_init(void)
Line 135... Line 130...
135
 *
130
 *
136
 * It sets supervisor_sp.
131
 * It sets supervisor_sp.
137
 */
132
 */
138
void before_thread_runs_arch(void)
133
void before_thread_runs_arch(void)
139
{
134
{
-
 
135
    uint8_t *stck;
-
 
136
   
140
    supervisor_sp = (uintptr_t) &THREAD->kstack[THREAD_STACK_SIZE-SP_DELTA];
137
    stck = &THREAD->kstack[THREAD_STACK_SIZE - SP_DELTA];
-
 
138
    supervisor_sp = (uintptr_t) stck;
141
}
139
}
142
 
140
 
143
 
-
 
144
/** Performs arm32 specific tasks before a thread stops running.
141
/** Performs arm32 specific tasks before a thread stops running.
145
 *
142
 *
146
 * Currently the function is empty.
143
 * Currently the function is empty.
147
 */
144
 */
148
void after_thread_ran_arch(void)
145
void after_thread_ran_arch(void)
149
{
146
{
150
}
147
}
151
 
148
 
152
 
-
 
153
/** Halts CPU. */
149
/** Halts CPU. */
154
void cpu_halt(void)
150
void cpu_halt(void)
155
{
151
{
156
    machine_cpu_halt();
152
    machine_cpu_halt();
157
}
153
}
158
 
154
 
159
/** @}
155
/** @}
160
 */
156
 */
161
 
-
 
162
 
-
 
163
 
-
 
164
 
-
 
165
 
-
 
166
 
-
 
167
 
-
 
168
 
-
 
169
 
-
 
170
 
-
 
171
 
-
 
172
 
-
 
173
 
-
 
174
 
-