Subversion Repositories HelenOS

Rev

Rev 4311 | Rev 4676 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4311 Rev 4610
Line 34... Line 34...
34
 
34
 
35
#include <config.h>
35
#include <config.h>
36
#include <arch.h>
36
#include <arch.h>
37
#include <arch/boot/boot.h>
37
#include <arch/boot/boot.h>
38
#include <genarch/drivers/via-cuda/cuda.h>
38
#include <genarch/drivers/via-cuda/cuda.h>
-
 
39
#include <genarch/kbrd/kbrd.h>
39
#include <arch/interrupt.h>
40
#include <arch/interrupt.h>
40
#include <genarch/fb/fb.h>
41
#include <genarch/fb/fb.h>
41
#include <genarch/fb/visuals.h>
42
#include <genarch/fb/visuals.h>
42
#include <userspace.h>
43
#include <userspace.h>
43
#include <proc/uarg.h>
44
#include <proc/uarg.h>
Line 115... Line 116...
115
#endif
116
#endif
116
       
117
       
117
        /* Initialize IRQ routing */
118
        /* Initialize IRQ routing */
118
        irq_init(IRQ_COUNT, IRQ_COUNT);
119
        irq_init(IRQ_COUNT, IRQ_COUNT);
119
       
120
       
-
 
121
        /* Merge all zones to 1 big zone */
-
 
122
        zone_merge_all();
-
 
123
    }
-
 
124
}
-
 
125
 
-
 
126
void arch_post_cpu_init(void)
-
 
127
{
-
 
128
}
-
 
129
 
-
 
130
void arch_pre_smp_init(void)
-
 
131
{
-
 
132
}
-
 
133
 
-
 
134
void arch_post_smp_init(void)
-
 
135
{
120
        if (bootinfo.macio.addr) {
136
    if (bootinfo.macio.addr) {
121
            /* Initialize PIC */
137
        /* Initialize PIC */
122
            cir_t cir;
138
        cir_t cir;
123
            void *cir_arg;
139
        void *cir_arg;
124
            pic_init(bootinfo.macio.addr, PAGE_SIZE, &cir, &cir_arg);
140
        pic_init(bootinfo.macio.addr, PAGE_SIZE, &cir, &cir_arg);
125
           
141
 
126
#ifdef CONFIG_VIA_CUDA
142
#ifdef CONFIG_MAC_KBD
127
            uintptr_t pa = bootinfo.macio.addr + 0x16000;
143
        uintptr_t pa = bootinfo.macio.addr + 0x16000;
128
            uintptr_t aligned_addr = ALIGN_DOWN(pa, PAGE_SIZE);
144
        uintptr_t aligned_addr = ALIGN_DOWN(pa, PAGE_SIZE);
129
            size_t offset = pa - aligned_addr;
145
        size_t offset = pa - aligned_addr;
130
            size_t size = 2 * PAGE_SIZE;
146
        size_t size = 2 * PAGE_SIZE;
131
           
147
           
Line 134... Line 150...
134
           
150
           
135
            /* Initialize I/O controller */
151
        /* Initialize I/O controller */
136
            cuda_instance_t *cuda_instance =
152
        cuda_instance_t *cuda_instance =
137
                cuda_init(cuda, IRQ_CUDA, cir, cir_arg);
153
            cuda_init(cuda, IRQ_CUDA, cir, cir_arg);
138
            if (cuda_instance) {
154
        if (cuda_instance) {
-
 
155
            kbrd_instance_t *kbrd_instance = kbrd_init();
-
 
156
            if (kbrd_instance) {
139
                indev_t *sink = stdin_wire();
157
                indev_t *sink = stdin_wire();
140
                cuda_wire(cuda_instance, sink);
158
                indev_t *kbrd = kbrd_wire(kbrd_instance, sink);
141
            }
-
 
142
#endif
-
 
143
        }
-
 
144
       
-
 
145
        /* Merge all zones to 1 big zone */
159
                cuda_wire(cuda_instance, kbrd);
146
        zone_merge_all();
160
                pic_enable_interrupt(IRQ_CUDA);
147
    }
-
 
148
}
161
            }
149
 
-
 
150
void arch_post_cpu_init(void)
-
 
151
{
-
 
152
}
162
        }
153
 
-
 
154
void arch_pre_smp_init(void)
-
 
155
{
163
#endif
156
}
164
    }
157
 
-
 
158
void arch_post_smp_init(void)
-
 
159
{
-
 
160
}
165
}
161
 
166
 
162
void calibrate_delay_loop(void)
167
void calibrate_delay_loop(void)
163
{
168
{
164
}
169
}