Beispiel #1
0
 public ushort ReadIOWord(ulong Addr)
 {
     tysos.x86_64.IOResource io = a.ios.Contains(Addr, 2);
     if (io != null)
     {
         return((ushort)io.Read(Addr, 2));
     }
     else
     {
         throw new Exception("Invalid IO port: " + Addr.ToString("X"));
     }
 }
Beispiel #2
0
 public byte ReadIOByte(ulong Addr)
 {
     tysos.x86_64.IOResource io = a.ios.Contains(Addr, 1);
     if (io != null)
     {
         return((byte)io.Read(Addr, 1));
     }
     else
     {
         throw new Exception("Invalid IO port: " + Addr.ToString("X"));
     }
 }
Beispiel #3
0
 public uint ReadIODWord(ulong Addr)
 {
     tysos.x86_64.IOResource io = a.ios.Contains(Addr, 4);
     if (io != null)
     {
         var ret = (uint)io.Read(Addr, 4);
         //System.Diagnostics.Debugger.Log(0, "acpipc", "ReadIODWord: " + ret.ToString("X8") + " from: " + Addr.ToString("X8"));
         return(ret);
     }
     else
     {
         throw new Exception("Invalid IO port: " + Addr.ToString("X"));
     }
 }
Beispiel #4
0
 ushort ReadRegister(ushort RegId)
 {
     index.Write(VBE_DISPI_IOPORT_INDEX, 2, RegId);
     return((ushort)index.Read(VBE_DISPI_IOPORT_DATA, 2));
 }