3 #include <video_defines.h>
 
   6 #include "vga-overlay.h"
 
   8 unsigned int counter = 0;
 
  10 unsigned char vgasave;
 
  14         static int curdev = 0;  /* 0 if kbd, 1 if mouse */
 
  25                 b = inb(cts & 0xFFFF);
 
  26                 dologf("READ: %08x (%02x)", cts, b);
 
  27                 if ((cts & 0xFFFF) == 0x64)
 
  28                         curdev = (b & 0x20) ? 1 : 0;
 
  29                 if ((curdev == 0) && ((cts & 0xFFFF) == 0x60) && (b == 0x01))
 
  31                 *(unsigned char*)0xAFFD0 /* EAX */ = b;
 
  38                 b = *(unsigned char*)0xAFFD0 /* EAX */;
 
  39                 dologf("WRITE: %08x (%02x)", cts, b);
 
  40                 outb(cts & 0xFFFF, b);
 
  44                 dolog("Unhandled PCI cycle");
 
  51 void timer_handler(smi_event_t ev)
 
  53         static unsigned int ticks = 0;
 
  55         smi_disable_event(SMI_EVENT_FAST_TIMER);
 
  56         smi_enable_event(SMI_EVENT_FAST_TIMER);
 
  58         outb(0x80, (ticks++) & 0xFF);
 
  71         sprintf(statstr, "15-412! %08x %08x", smi_status(), counter);
 
  72         strblit(statstr, 0, 0);
 
  74         if (inl(0x834) & 0x1000)
 
  76                 if (inl(0x844) & 0x1000)        /* devact_sts */
 
  79                         outl(0x844, 0x1000);    /* ack it */
 
  82         if (inl(0x840) & 0x1000)