Example #1
0
void InterruptHandler2c(int *esp)
{
    int data;

    data = IO_In8(KEYB_DATA);
    IO_Out8(PIC1_OCW2, 0x64);
    IO_Out8(PIC0_OCW2, 0x62);
    FIFO32_Put(sendto_m, data + offset_data_m);
    return;
}
Example #2
0
void Initialise_Mouse(DATA_FIFO *sendto, uint offset, UI_MouseInfo *decode)
{
    sendto_m = sendto;
    offset_data_m = offset;
    decode_m = decode;
    Emergency_Out("Mouse Initialise Start");
    decode->phase = 0;
    Mouse_Send_Command(MOUSECMD_RESET);
    Emergency_Out("Mouse Send Command");
    System_GateDescriptor_Set(0x2c, (uint)asm_InterruptHandler2c, 0x02, AR_INTGATE32);
    IO_Out8(PIC1_IMR, IO_In8(PIC1_IMR) & 0xef);
    Emergency_Out("Mouse Set INT");

    return;
}
Example #3
0
void Initialise_ProgrammableIntervalTimer(void)
{
    UI_Timer *watch;

    IO_Out8(PIT_CTRL, 0x34);
    IO_Out8(PIT_CNT0, 0x9c);
    IO_Out8(PIT_CNT0, 0x2e);
    System_GateDescriptor_Set(0x20, (uint)asm_InterruptHandler20, 0x02, AR_INTGATE32);
    IO_Out8(PIC0_IMR, IO_In8(PIC0_IMR) & 0xfe);
    timerctrl.count = 0;
    watch = Timer_Get(0, 0);
    watch->timeout = 0xFFFFFFFF;
    watch->count = 0xFFFFFFFF;
    watch->state = inuse;
    timerctrl.next = watch;
    timerctrl.ts = 0;

    return;
}
Example #4
0
static UINT8 virtio_read8(UINT16 base, UINT16 offset)
{
	return IO_In8(base+offset);
}
Example #5
0
fastcall uint8
PCI_ConfigRead8(const PCIAddress *addr, uint16 offset)
{
   IO_Out32(PCI_REG_CONFIG_ADDRESS, PCIConfigPackAddress(addr, offset));
   return IO_In8(PCI_REG_CONFIG_DATA);
}