Changes in kernel/arch/ia64/src/ia64.c [26f407e9:d75628da] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia64/src/ia64.c
r26f407e9 rd75628da 34 34 35 35 #include <arch.h> 36 #include <arch/drivers/ski.h> 37 #include <arch/drivers/it.h> 38 #include <arch/interrupt.h> 39 #include <arch/barrier.h> 40 #include <arch/asm.h> 41 #include <arch/register.h> 36 42 #include <typedefs.h> 37 #include <errno.h> 43 #include <arch/context.h> 44 #include <arch/stack.h> 45 #include <arch/mm/page.h> 38 46 #include <interrupt.h> 47 #include <mm/as.h> 48 #include <config.h> 39 49 #include <macros.h> 40 #include <str.h>41 50 #include <userspace.h> 42 51 #include <console/console.h> 52 #include <abi/proc/uarg.h> 43 53 #include <syscall/syscall.h> 44 #include <sysinfo/sysinfo.h> 45 #include <arch/drivers/it.h> 46 #include <arch/drivers/kbd.h> 47 #include <arch/legacyio.h> 54 #include <ddi/irq.h> 55 #include <arch/bootinfo.h> 56 #include <genarch/drivers/legacy/ia32/io.h> 48 57 #include <genarch/drivers/ega/ega.h> 58 #include <genarch/kbrd/kbrd.h> 59 #include <genarch/srln/srln.h> 49 60 #include <genarch/drivers/i8042/i8042.h> 50 61 #include <genarch/drivers/ns16550/ns16550.h> 51 #include <genarch/drivers/legacy/ia32/io.h> 52 #include <genarch/kbrd/kbrd.h> 53 #include <genarch/srln/srln.h> 54 #include <mm/page.h> 55 #include <mm/km.h> 56 57 #ifdef MACHINE_ski 58 #include <arch/drivers/ski.h> 59 #endif 62 #include <arch/drivers/kbd.h> 63 #include <smp/smp.h> 64 #include <smp/ipi.h> 65 #include <arch/atomic.h> 66 #include <panic.h> 67 #include <print.h> 68 #include <sysinfo/sysinfo.h> 69 #include <str.h> 60 70 61 71 /* NS16550 as a COM 1 */ … … 65 75 66 76 static uint64_t iosapic_base = 0xfec00000; 67 uintptr_t legacyio_virt_base = 0;68 77 69 78 /** Performs ia64-specific initialization before main_bsp() is called. */ 70 79 void arch_pre_main(void) 71 80 { 72 init.cnt = min3(bootinfo->taskmap.cnt, TASKMAP_MAX_RECORDS, 73 CONFIG_INIT_TASKS); 81 init.cnt = min3(bootinfo->taskmap.cnt, TASKMAP_MAX_RECORDS, CONFIG_INIT_TASKS); 74 82 size_t i; 75 76 83 for (i = 0; i < init.cnt; i++) { 77 init.tasks[i].paddr = 78 (uintptr_t) bootinfo->taskmap.tasks[i].addr; 84 init.tasks[i].addr = 85 ((unsigned long) bootinfo->taskmap.tasks[i].addr) | 86 VRN_MASK; 79 87 init.tasks[i].size = bootinfo->taskmap.tasks[i].size; 80 88 str_cpy(init.tasks[i].name, CONFIG_TASK_NAME_BUFLEN, … … 89 97 static void iosapic_init(void) 90 98 { 91 uintptr_t IOSAPIC = km_map(iosapic_base, PAGE_SIZE, 92 PAGE_WRITE | PAGE_NOT_CACHEABLE); 99 uint64_t IOSAPIC = PA2KA((sysarg_t)(iosapic_base)) | FW_OFFSET; 93 100 int i; 94 101 … … 117 124 { 118 125 if (config.cpu_active == 1) { 119 /* Map the page with legacy I/O. */120 legacyio_virt_base = km_map(LEGACYIO_PHYS_BASE, LEGACYIO_SIZE,121 PAGE_WRITE | PAGE_NOT_CACHEABLE);122 123 126 iosapic_init(); 124 127 irq_init(INR_COUNT, INR_COUNT); … … 144 147 #endif 145 148 #ifdef MACHINE_i460GX 146 platform = " pc";149 platform = "i460GX"; 147 150 #endif 148 151 sysinfo_set_item_data("platform", NULL, (void *) platform, … … 188 191 sysinfo_set_item_val("kbd.address.physical", NULL, 189 192 (uintptr_t) NS16550_BASE); 193 sysinfo_set_item_val("kbd.address.kernel", NULL, 194 (uintptr_t) NS16550_BASE); 190 195 #endif 191 196 192 197 #ifdef CONFIG_I8042 193 i8042_instance_t *i8042_instance = i8042_init((i8042_t *) I8042_BASE, 194 IRQ_KBD); 198 i8042_instance_t *i8042_instance = i8042_init((i8042_t *) I8042_BASE, IRQ_KBD); 195 199 if (i8042_instance) { 196 200 kbrd_instance_t *kbrd_instance = kbrd_init(); … … 201 205 } 202 206 } 203 #endif 204 207 208 sysinfo_set_item_val("i8042", NULL, true); 209 sysinfo_set_item_val("i8042.inr_a", NULL, IRQ_KBD); 210 sysinfo_set_item_val("i8042.inr_b", NULL, IRQ_MOUSE); 211 sysinfo_set_item_val("i8042.address.physical", NULL, 212 (uintptr_t) I8042_BASE); 213 sysinfo_set_item_val("i8042.address.kernel", NULL, 214 (uintptr_t) I8042_BASE); 215 #endif 216 217 sysinfo_set_item_val("netif.ne2000.inr", NULL, IRQ_NE2000); 218 205 219 sysinfo_set_item_val("ia64_iospace", NULL, true); 206 220 sysinfo_set_item_val("ia64_iospace.address", NULL, true); 207 sysinfo_set_item_val("ia64_iospace.address.virtual", NULL, LEGACYIO_USER_BASE);221 sysinfo_set_item_val("ia64_iospace.address.virtual", NULL, IO_OFFSET); 208 222 } 209 223 … … 248 262 * We use r13 (a.k.a. tp) for this purpose. 249 263 */ 250 sysarg_t sys_tls_set( uintptr_t addr)251 { 252 return EOK;264 sysarg_t sys_tls_set(sysarg_t addr) 265 { 266 return 0; 253 267 } 254 268 … … 256 270 { 257 271 pio_write_8((ioport8_t *)0x64, 0xfe); 258 while (1); 272 while (1) 273 ; 259 274 } 260 275
Note:
See TracChangeset
for help on using the changeset viewer.