Changeset 95b3550 in mainline


Ignore:
Timestamp:
2006-10-18T16:59:28Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a000fd71
Parents:
494a54a
Message:

ia32: fix compilation, keyboard not checked yet

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/include/interrupt.h

    r494a54a r95b3550  
    4040
    4141#define IVT_ITEMS               IDT_ITEMS
     42#define IVT_FIRST               0
    4243
    4344#define EXC_COUNT       32
  • kernel/arch/ia32/src/interrupt.c

    r494a54a r95b3550  
    190190}
    191191
    192 static void ipc_int(int n, istate_t *istate)
    193 {
    194         ipc_irq_send_notif(n-IVT_IRQBASE);
    195         trap_virtual_eoi();
    196 }
    197 
    198192/** @}
    199193 */
  • uspace/kbd/arch/ia32/include/kbd.h

    r494a54a r95b3550  
    4343#include <libarch/ddi.h>
    4444
    45 #define KBD_IRQ      1
    46 #define MOUSE_IRQ    12
    47 
    4845#define i8042_DATA      0x60
    4946#define i8042_STATUS    0X64
  • uspace/kbd/arch/ia32/src/kbd.c

    r494a54a r95b3550  
    4343#include <keys.h>
    4444#include <genarch/kbd.h>
     45#include <sysinfo.h>
    4546
    4647/* Interesting bits for status register */
     
    7071
    7172irq_cmd_t i8042_cmds[2] = {
    72         { CMD_PORT_READ_1, (void *)0x64, 0, 1 },
    73         { CMD_PORT_READ_1, (void *)0x60, 0, 2 }
     73        { CMD_PORT_READ_1, (void *) 0x64, 0, 1 },
     74        { CMD_PORT_READ_1, (void *) 0x60, 0, 2 }
    7475};
    7576
     
    9293        int mouseenabled = 0;
    9394
    94         iospace_enable(task_get_id(),(void *)i8042_DATA, 5);
     95        iospace_enable(task_get_id(), (void *) i8042_DATA, 5);
    9596        /* Disable kbd, enable mouse */
    9697        i8042_command_write(i8042_CMD_KBD);
     
    125126                /* enable mouse */
    126127                mouseenabled = 1;
    127 
    128                 ipc_register_irq(MOUSE_IRQ, &i8042_kbd);
     128               
     129                ipc_register_irq(sysinfo_value("mouse.inr"), sysinfo_value("mouse.devno"), 0, &i8042_kbd);
    129130        }
    130131        /* Enable kbd */
    131         ipc_register_irq(KBD_IRQ, &i8042_kbd);
    132         /* Register for irq restart */
    133         ipc_register_irq(IPC_IRQ_KBDRESTART, NULL);
     132        ipc_register_irq(sysinfo_value("kbd.inr"), sysinfo_value("kbd.devno"), 0, &i8042_kbd);
    134133
    135134        int newcontrol = i8042_KBD_IE | i8042_KBD_TRANSLATE;
     
    150149        int status = IPC_GET_ARG1(*call);
    151150
    152         if (IPC_GET_METHOD(*call) == IPC_IRQ_KBDRESTART) {
    153                 kbd_arch_init();
    154                 return 1;
    155         }
    156 
    157151        if ((status & i8042_MOUSE_DATA))
    158152                return 0;
Note: See TracChangeset for help on using the changeset viewer.