2008-03-05 09:52:00 -05:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Microsoft Research Singularity
|
|
|
|
//
|
|
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
|
//
|
|
|
|
// File: TulipResources.cs
|
|
|
|
//
|
|
|
|
|
|
|
|
using Microsoft.Singularity.Channels;
|
|
|
|
using Microsoft.Singularity.Configuration;
|
|
|
|
using Microsoft.Singularity.Directory;
|
|
|
|
using Microsoft.Singularity.Extending;
|
|
|
|
using Microsoft.Singularity.Io;
|
|
|
|
using Microsoft.Singularity.Io.Net;
|
|
|
|
using Microsoft.SingSharp.Reflection;
|
|
|
|
using Microsoft.Singularity.Drivers;
|
|
|
|
|
|
|
|
[assembly: Transform(typeof(DriverResourceTransform))]
|
|
|
|
namespace Microsoft.Singularity.Drivers.Network.Tulip
|
|
|
|
{
|
|
|
|
// create the resource object for CTR to fill in
|
|
|
|
[DriverCategory]
|
|
|
|
[Signature("pci/ven_1011&dev_0009&cc_0200")] // DEC 21140
|
|
|
|
internal class TulipResources : DriverCategoryDeclaration
|
|
|
|
{
|
|
|
|
[IoPortRange(0, Default = 0xec00, Length = 0x80)]
|
2008-11-17 18:29:00 -05:00
|
|
|
internal readonly IoPortRange csr;
|
2008-03-05 09:52:00 -05:00
|
|
|
|
|
|
|
[IoMemoryRange(1, Default = 0xfebff000, Length = 0x1000)]
|
2008-11-17 18:29:00 -05:00
|
|
|
internal readonly IoMemoryRange mem; // this is unused, but we must declare it
|
2008-03-05 09:52:00 -05:00
|
|
|
|
|
|
|
[IoIrqRange(6, Default = 0x0b, Shared = true)]
|
2008-11-17 18:29:00 -05:00
|
|
|
internal readonly IoIrqRange irq;
|
2008-03-05 09:52:00 -05:00
|
|
|
|
|
|
|
[ExtensionEndpoint]
|
|
|
|
internal TRef<ExtensionContract.Exp:Start> ec;
|
|
|
|
|
|
|
|
[ServiceEndpoint(typeof(NicDeviceContract))]
|
|
|
|
internal TRef<ServiceProviderContract.Exp:Start> nicsp;
|
|
|
|
|
2008-11-17 18:29:00 -05:00
|
|
|
internal int DriverMain(string instance)
|
2008-03-05 09:52:00 -05:00
|
|
|
{
|
|
|
|
return TulipController.DriverMain(this);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// The driver transform needs to be
|
|
|
|
// revised to pass in the matching signature so the driver can
|
|
|
|
// accommodate for other differences than just ranges (as is
|
|
|
|
// largely the case with the PNIC and Tulip).
|
|
|
|
[DriverCategory]
|
|
|
|
[Signature("pci/ven_11ad&dev_0002&cc_0200")]
|
2008-11-17 18:29:00 -05:00
|
|
|
internal class PnicResources : DriverCategoryDeclaration
|
2008-03-05 09:52:00 -05:00
|
|
|
{
|
|
|
|
[IoPortRange(0, Default = 0xec00, Length = 0x100)]
|
2008-11-17 18:29:00 -05:00
|
|
|
internal readonly IoPortRange csr;
|
2008-03-05 09:52:00 -05:00
|
|
|
|
|
|
|
[IoMemoryRange(1, Default = 0xfebff000, Length = 0x100)]
|
2008-11-17 18:29:00 -05:00
|
|
|
internal readonly IoMemoryRange mem;
|
2008-03-05 09:52:00 -05:00
|
|
|
|
|
|
|
[IoIrqRange(6, Default = 0x0b, Shared = true)]
|
2008-11-17 18:29:00 -05:00
|
|
|
internal readonly IoIrqRange irq;
|
2008-03-05 09:52:00 -05:00
|
|
|
|
|
|
|
[ExtensionEndpoint]
|
|
|
|
internal TRef<ExtensionContract.Exp:Start> ec;
|
|
|
|
|
|
|
|
[ServiceEndpoint(typeof(NicDeviceContract))]
|
|
|
|
internal TRef<ServiceProviderContract.Exp:Start> nicsp;
|
|
|
|
|
2008-11-17 18:29:00 -05:00
|
|
|
internal int DriverMain(string instance)
|
2008-03-05 09:52:00 -05:00
|
|
|
{
|
|
|
|
return TulipController.DriverMain(this);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|