//////////////////////////////////////////////////////////////////////////////// // // Microsoft Research Singularity - Singularity ABI // // Copyright (c) Microsoft Corporation. All rights reserved. // // File: DeviceService.csi // // Note: // using System; using System.Runtime.CompilerServices; using Microsoft.Singularity; namespace Microsoft.Singularity.V1.Services { public struct DeviceService { [NoHeapAllocation] public static unsafe uint GetPnpSignature(int index, /*[out]*/ char * output, uint maxout); [NoHeapAllocation] public static unsafe bool GetPciPort(out PciPortHandle handle); [NoHeapAllocation] public static int GetIrqCount(byte line); [NoHeapAllocation] public static uint GetDynamicIoRangeCount(); [NoHeapAllocation] public static bool GetDynamicIoPortRange(uint range, out ushort port, out ushort size, out bool readable, out bool writable); [NoHeapAllocation] public static unsafe bool GetDynamicIoMemoryRange(uint range, out byte * data, out uint size, out bool readable, out bool writable); [NoHeapAllocation] public static bool GetDynamicIoIrqRange(uint range, out byte line, out byte size); [NoHeapAllocation] public static bool GetDynamicIoDmaRange(uint range, out byte channel, out byte size); [NoHeapAllocation] public static uint GetFixedIoRangeCount(); [NoHeapAllocation] public static bool GetFixedIoPortRange(uint range, out ushort port, out ushort size, out bool readable, out bool writable); [NoHeapAllocation] public static unsafe bool GetFixedIoMemoryRange(uint range, out byte * data, out uint size, out bool readable, out bool writable); [NoHeapAllocation] public static bool GetFixedIoIrqRange(uint range, out byte line, out byte size); [NoHeapAllocation] public static bool GetFixedIoDmaRange(uint range, out byte channel, out byte size); [NoHeapAllocation] public static UIntPtr MapPhysicalRange(UIntPtr physStart, UIntPtr numBytes, bool readable, bool writable); [NoHeapAllocation] public static void UnmapPhysicalRange(UIntPtr startAddr, UIntPtr limitAddr); [NoHeapAllocation] public static bool GetDmaPhysicalAddress( UIntPtr virtualAddr, out UIntPtr physicalAddr, out UIntPtr physicalRemaining ); } }