Ignore:
File:
1 edited

Legend:

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

    r88dfee7 rf902d36  
    3636
    3737#include <arch.h>
     38
    3839#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>
    4849#include <arch/drivers/i8254.h>
    4950#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>
    5058#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>
    5871
    5972#ifdef CONFIG_SMP
     
    6376/** Perform ia32-specific initialization before main_bsp() is called.
    6477 *
    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 */
     81void arch_pre_main(uint32_t signature, const multiboot_info_t *mi)
    7082{
    7183        /* 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);
    7485       
    7586#ifdef CONFIG_SMP
     
    103114               
    104115#if (defined(CONFIG_FB) || defined(CONFIG_EGA))
    105                 bool bfb = false;
     116                bool vesa = false;
    106117#endif
    107118               
    108119#ifdef CONFIG_FB
    109                 bfb = bfb_init();
     120                vesa = vesa_init();
    110121#endif
    111122               
    112123#ifdef CONFIG_EGA
    113                 if (!bfb) {
     124                if (!vesa) {
    114125                        outdev_t *egadev = ega_init(EGA_BASE, EGA_VIDEORAM);
    115126                        if (egadev)
     
    168179                }
    169180        }
     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);
    170193#endif
    171194       
    172195        if (irqs_info != NULL)
    173196                sysinfo_set_item_val(irqs_info, NULL, true);
     197       
     198        sysinfo_set_item_val("netif.ne2000.inr", NULL, IRQ_NE2000);
    174199}
    175200
     
    191216 * selector, and the descriptor->base is the correct address.
    192217 */
    193 sysarg_t sys_tls_set(uintptr_t addr)
     218sysarg_t sys_tls_set(sysarg_t addr)
    194219{
    195220        THREAD->arch.tls = addr;
    196221        set_tls_desc(addr);
    197222       
    198         return EOK;
     223        return 0;
    199224}
    200225
Note: See TracChangeset for help on using the changeset viewer.