Changes in kernel/arch/ia32/src/ia32.c [88dfee7:f902d36] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/ia32.c
r88dfee7 rf902d36 36 36 37 37 #include <arch.h> 38 38 39 #include <typedefs.h> 39 #include <errno.h> 40 #include < memstr.h>41 #include <interrupt.h> 42 #include < console/console.h>43 #include < syscall/syscall.h>44 #include < sysinfo/sysinfo.h>45 #include <arch/ bios/bios.h>46 #include < arch/boot/boot.h>47 #include < arch/debugger.h>40 41 #include <arch/pm.h> 42 43 #include <genarch/multiboot/multiboot.h> 44 #include <genarch/drivers/legacy/ia32/io.h> 45 #include <genarch/drivers/ega/ega.h> 46 #include <arch/drivers/vesa.h> 47 #include <genarch/drivers/i8042/i8042.h> 48 #include <genarch/kbrd/kbrd.h> 48 49 #include <arch/drivers/i8254.h> 49 50 #include <arch/drivers/i8259.h> 51 52 #include <arch/context.h> 53 54 #include <config.h> 55 56 #include <arch/interrupt.h> 57 #include <arch/asm.h> 50 58 #include <genarch/acpi/acpi.h> 51 #include <genarch/drivers/ega/ega.h> 52 #include <genarch/drivers/i8042/i8042.h> 53 #include <genarch/drivers/legacy/ia32/io.h> 54 #include <genarch/fb/bfb.h> 55 #include <genarch/kbrd/kbrd.h> 56 #include <genarch/multiboot/multiboot.h> 57 #include <genarch/multiboot/multiboot2.h> 59 60 #include <arch/bios/bios.h> 61 62 #include <interrupt.h> 63 #include <ddi/irq.h> 64 #include <arch/debugger.h> 65 #include <proc/thread.h> 66 #include <syscall/syscall.h> 67 #include <console/console.h> 68 #include <sysinfo/sysinfo.h> 69 #include <arch/boot/boot.h> 70 #include <memstr.h> 58 71 59 72 #ifdef CONFIG_SMP … … 63 76 /** Perform ia32-specific initialization before main_bsp() is called. 64 77 * 65 * @param signature Multiboot signature. 66 * @param info Multiboot information structure. 67 * 68 */ 69 void arch_pre_main(uint32_t signature, void *info) 78 * @param signature Should contain the multiboot signature. 79 * @param mi Pointer to the multiboot information structure. 80 */ 81 void arch_pre_main(uint32_t signature, const multiboot_info_t *mi) 70 82 { 71 83 /* Parse multiboot information obtained from the bootloader. */ 72 multiboot_info_parse(signature, (multiboot_info_t *) info); 73 multiboot2_info_parse(signature, (multiboot2_info_t *) info); 84 multiboot_info_parse(signature, mi); 74 85 75 86 #ifdef CONFIG_SMP … … 103 114 104 115 #if (defined(CONFIG_FB) || defined(CONFIG_EGA)) 105 bool bfb= false;116 bool vesa = false; 106 117 #endif 107 118 108 119 #ifdef CONFIG_FB 109 bfb = bfb_init();120 vesa = vesa_init(); 110 121 #endif 111 122 112 123 #ifdef CONFIG_EGA 113 if (! bfb) {124 if (!vesa) { 114 125 outdev_t *egadev = ega_init(EGA_BASE, EGA_VIDEORAM); 115 126 if (egadev) … … 168 179 } 169 180 } 181 182 /* 183 * This is the necessary evil until the userspace driver is entirely 184 * self-sufficient. 185 */ 186 sysinfo_set_item_val("i8042", NULL, true); 187 sysinfo_set_item_val("i8042.inr_a", NULL, IRQ_KBD); 188 sysinfo_set_item_val("i8042.inr_b", NULL, IRQ_MOUSE); 189 sysinfo_set_item_val("i8042.address.physical", NULL, 190 (uintptr_t) I8042_BASE); 191 sysinfo_set_item_val("i8042.address.kernel", NULL, 192 (uintptr_t) I8042_BASE); 170 193 #endif 171 194 172 195 if (irqs_info != NULL) 173 196 sysinfo_set_item_val(irqs_info, NULL, true); 197 198 sysinfo_set_item_val("netif.ne2000.inr", NULL, IRQ_NE2000); 174 199 } 175 200 … … 191 216 * selector, and the descriptor->base is the correct address. 192 217 */ 193 sysarg_t sys_tls_set( uintptr_t addr)218 sysarg_t sys_tls_set(sysarg_t addr) 194 219 { 195 220 THREAD->arch.tls = addr; 196 221 set_tls_desc(addr); 197 222 198 return EOK;223 return 0; 199 224 } 200 225
Note:
See TracChangeset
for help on using the changeset viewer.