Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/src/ia32.c

    rf902d36 r88dfee7  
    3636
    3737#include <arch.h>
    38 
    3938#include <typedefs.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>
     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>
    4948#include <arch/drivers/i8254.h>
    5049#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>
    5850#include <genarch/acpi/acpi.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>
     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>
    7158
    7259#ifdef CONFIG_SMP
     
    7663/** Perform ia32-specific initialization before main_bsp() is called.
    7764 *
    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)
     65 * @param signature Multiboot signature.
     66 * @param info      Multiboot information structure.
     67 *
     68 */
     69void arch_pre_main(uint32_t signature, void *info)
    8270{
    8371        /* Parse multiboot information obtained from the bootloader. */
    84         multiboot_info_parse(signature, mi);
     72        multiboot_info_parse(signature, (multiboot_info_t *) info);
     73        multiboot2_info_parse(signature, (multiboot2_info_t *) info);
    8574       
    8675#ifdef CONFIG_SMP
     
    114103               
    115104#if (defined(CONFIG_FB) || defined(CONFIG_EGA))
    116                 bool vesa = false;
     105                bool bfb = false;
    117106#endif
    118107               
    119108#ifdef CONFIG_FB
    120                 vesa = vesa_init();
     109                bfb = bfb_init();
    121110#endif
    122111               
    123112#ifdef CONFIG_EGA
    124                 if (!vesa) {
     113                if (!bfb) {
    125114                        outdev_t *egadev = ega_init(EGA_BASE, EGA_VIDEORAM);
    126115                        if (egadev)
     
    179168                }
    180169        }
    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);
    193170#endif
    194171       
    195172        if (irqs_info != NULL)
    196173                sysinfo_set_item_val(irqs_info, NULL, true);
    197        
    198         sysinfo_set_item_val("netif.ne2000.inr", NULL, IRQ_NE2000);
    199174}
    200175
     
    216191 * selector, and the descriptor->base is the correct address.
    217192 */
    218 sysarg_t sys_tls_set(sysarg_t addr)
     193sysarg_t sys_tls_set(uintptr_t addr)
    219194{
    220195        THREAD->arch.tls = addr;
    221196        set_tls_desc(addr);
    222197       
    223         return 0;
     198        return EOK;
    224199}
    225200
Note: See TracChangeset for help on using the changeset viewer.