提交 4d643114 编写于 作者: G Greg Kroah-Hartman

Staging: hv: remove UINT32 and INT32 typedefs

The UINT32 and INT32 typedefs are now removed from the Hyper-V driver
code.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 5cd508bc
...@@ -33,9 +33,9 @@ ...@@ -33,9 +33,9 @@
static int static int
VmbusChannelCreateGpadlHeader( VmbusChannelCreateGpadlHeader(
void * Kbuffer, // must be phys and virt contiguous void * Kbuffer, // must be phys and virt contiguous
UINT32 Size, // page-size multiple u32 Size, // page-size multiple
VMBUS_CHANNEL_MSGINFO **msgInfo, VMBUS_CHANNEL_MSGINFO **msgInfo,
UINT32 *MessageCount u32 *MessageCount
); );
static void static void
...@@ -77,7 +77,7 @@ DumpMonitorPage( ...@@ -77,7 +77,7 @@ DumpMonitorPage(
{ {
for (j=0; j<32; j++) for (j=0; j<32; j++)
{ {
DPRINT_DBG(VMBUS, "param-conn id (%d)(%d) - %d", i, j, MonitorPage->Parameter[i][j].ConnectionId.AsUINT32); DPRINT_DBG(VMBUS, "param-conn id (%d)(%d) - %d", i, j, MonitorPage->Parameter[i][j].ConnectionId.Asu32);
DPRINT_DBG(VMBUS, "param-flag (%d)(%d) - %d", i, j, MonitorPage->Parameter[i][j].FlagNumber); DPRINT_DBG(VMBUS, "param-flag (%d)(%d) - %d", i, j, MonitorPage->Parameter[i][j].FlagNumber);
} }
...@@ -105,13 +105,13 @@ VmbusChannelSetEvent( ...@@ -105,13 +105,13 @@ VmbusChannelSetEvent(
if (Channel->OfferMsg.MonitorAllocated) if (Channel->OfferMsg.MonitorAllocated)
{ {
// Each UINT32 represents 32 channels // Each u32 represents 32 channels
BitSet((UINT32*)gVmbusConnection.SendInterruptPage + (Channel->OfferMsg.ChildRelId >> 5), Channel->OfferMsg.ChildRelId & 31); BitSet((u32*)gVmbusConnection.SendInterruptPage + (Channel->OfferMsg.ChildRelId >> 5), Channel->OfferMsg.ChildRelId & 31);
monitorPage = (HV_MONITOR_PAGE*)gVmbusConnection.MonitorPages; monitorPage = (HV_MONITOR_PAGE*)gVmbusConnection.MonitorPages;
monitorPage++; // Get the child to parent monitor page monitorPage++; // Get the child to parent monitor page
BitSet((UINT32*) &monitorPage->TriggerGroup[Channel->MonitorGroup].Pending, Channel->MonitorBit); BitSet((u32*) &monitorPage->TriggerGroup[Channel->MonitorGroup].Pending, Channel->MonitorBit);
} }
else else
{ {
...@@ -133,13 +133,13 @@ VmbusChannelClearEvent( ...@@ -133,13 +133,13 @@ VmbusChannelClearEvent(
if (Channel->OfferMsg.MonitorAllocated) if (Channel->OfferMsg.MonitorAllocated)
{ {
// Each UINT32 represents 32 channels // Each u32 represents 32 channels
BitClear((UINT32*)gVmbusConnection.SendInterruptPage + (Channel->OfferMsg.ChildRelId >> 5), Channel->OfferMsg.ChildRelId & 31); BitClear((u32*)gVmbusConnection.SendInterruptPage + (Channel->OfferMsg.ChildRelId >> 5), Channel->OfferMsg.ChildRelId & 31);
monitorPage = (HV_MONITOR_PAGE*)gVmbusConnection.MonitorPages; monitorPage = (HV_MONITOR_PAGE*)gVmbusConnection.MonitorPages;
monitorPage++; // Get the child to parent monitor page monitorPage++; // Get the child to parent monitor page
BitClear((UINT32*) &monitorPage->TriggerGroup[Channel->MonitorGroup].Pending, Channel->MonitorBit); BitClear((u32*) &monitorPage->TriggerGroup[Channel->MonitorGroup].Pending, Channel->MonitorBit);
} }
DPRINT_EXIT(VMBUS); DPRINT_EXIT(VMBUS);
...@@ -164,7 +164,7 @@ VmbusChannelGetDebugInfo( ...@@ -164,7 +164,7 @@ VmbusChannelGetDebugInfo(
HV_MONITOR_PAGE *monitorPage; HV_MONITOR_PAGE *monitorPage;
u8 monitorGroup = (u8)Channel->OfferMsg.MonitorId / 32; u8 monitorGroup = (u8)Channel->OfferMsg.MonitorId / 32;
u8 monitorOffset = (u8)Channel->OfferMsg.MonitorId % 32; u8 monitorOffset = (u8)Channel->OfferMsg.MonitorId % 32;
//UINT32 monitorBit = 1 << monitorOffset; //u32 monitorBit = 1 << monitorOffset;
DebugInfo->RelId = Channel->OfferMsg.ChildRelId; DebugInfo->RelId = Channel->OfferMsg.ChildRelId;
DebugInfo->State = Channel->State; DebugInfo->State = Channel->State;
...@@ -202,10 +202,10 @@ VmbusChannelGetDebugInfo( ...@@ -202,10 +202,10 @@ VmbusChannelGetDebugInfo(
int int
VmbusChannelOpen( VmbusChannelOpen(
VMBUS_CHANNEL *NewChannel, VMBUS_CHANNEL *NewChannel,
UINT32 SendRingBufferSize, u32 SendRingBufferSize,
UINT32 RecvRingBufferSize, u32 RecvRingBufferSize,
void * UserData, void * UserData,
UINT32 UserDataLen, u32 UserDataLen,
PFN_CHANNEL_CALLBACK pfnOnChannelCallback, PFN_CHANNEL_CALLBACK pfnOnChannelCallback,
void * Context void * Context
) )
...@@ -330,7 +330,7 @@ VmbusChannelOpen( ...@@ -330,7 +330,7 @@ VmbusChannelOpen(
--*/ --*/
static void DumpGpadlBody( static void DumpGpadlBody(
VMBUS_CHANNEL_GPADL_BODY *Gpadl, VMBUS_CHANNEL_GPADL_BODY *Gpadl,
UINT32 Len) u32 Len)
{ {
int i=0; int i=0;
int pfnCount=0; int pfnCount=0;
...@@ -393,9 +393,9 @@ static void DumpGpadlHeader( ...@@ -393,9 +393,9 @@ static void DumpGpadlHeader(
static int static int
VmbusChannelCreateGpadlHeader( VmbusChannelCreateGpadlHeader(
void * Kbuffer, // from kmalloc() void * Kbuffer, // from kmalloc()
UINT32 Size, // page-size multiple u32 Size, // page-size multiple
VMBUS_CHANNEL_MSGINFO **MsgInfo, VMBUS_CHANNEL_MSGINFO **MsgInfo,
UINT32 *MessageCount) u32 *MessageCount)
{ {
int i; int i;
int pageCount; int pageCount;
...@@ -404,7 +404,7 @@ VmbusChannelCreateGpadlHeader( ...@@ -404,7 +404,7 @@ VmbusChannelCreateGpadlHeader(
VMBUS_CHANNEL_GPADL_BODY* gpadlBody; VMBUS_CHANNEL_GPADL_BODY* gpadlBody;
VMBUS_CHANNEL_MSGINFO* msgHeader; VMBUS_CHANNEL_MSGINFO* msgHeader;
VMBUS_CHANNEL_MSGINFO* msgBody; VMBUS_CHANNEL_MSGINFO* msgBody;
UINT32 msgSize; u32 msgSize;
int pfnSum, pfnCount, pfnLeft, pfnCurr, pfnSize; int pfnSum, pfnCount, pfnLeft, pfnCurr, pfnSize;
...@@ -465,7 +465,7 @@ VmbusChannelCreateGpadlHeader( ...@@ -465,7 +465,7 @@ VmbusChannelCreateGpadlHeader(
(*MessageCount)++; (*MessageCount)++;
gpadlBody = (VMBUS_CHANNEL_GPADL_BODY*)msgBody->Msg; gpadlBody = (VMBUS_CHANNEL_GPADL_BODY*)msgBody->Msg;
// FIXME: Gpadl is UINT32 and we are using a pointer which could be 64-bit // FIXME: Gpadl is u32 and we are using a pointer which could be 64-bit
//gpadlBody->Gpadl = kbuffer; //gpadlBody->Gpadl = kbuffer;
for (i=0; i<pfnCurr; i++) for (i=0; i<pfnCurr; i++)
{ {
...@@ -516,8 +516,8 @@ int ...@@ -516,8 +516,8 @@ int
VmbusChannelEstablishGpadl( VmbusChannelEstablishGpadl(
VMBUS_CHANNEL *Channel, VMBUS_CHANNEL *Channel,
void * Kbuffer, // from kmalloc() void * Kbuffer, // from kmalloc()
UINT32 Size, // page-size multiple u32 Size, // page-size multiple
UINT32 *GpadlHandle u32 *GpadlHandle
) )
{ {
int ret=0; int ret=0;
...@@ -528,10 +528,10 @@ VmbusChannelEstablishGpadl( ...@@ -528,10 +528,10 @@ VmbusChannelEstablishGpadl(
VMBUS_CHANNEL_MSGINFO *msgInfo; VMBUS_CHANNEL_MSGINFO *msgInfo;
VMBUS_CHANNEL_MSGINFO *subMsgInfo; VMBUS_CHANNEL_MSGINFO *subMsgInfo;
UINT32 msgCount; u32 msgCount;
LIST_ENTRY* anchor; LIST_ENTRY* anchor;
LIST_ENTRY* curr; LIST_ENTRY* curr;
UINT32 nextGpadlHandle; u32 nextGpadlHandle;
DPRINT_ENTER(VMBUS); DPRINT_ENTER(VMBUS);
...@@ -619,7 +619,7 @@ VmbusChannelEstablishGpadl( ...@@ -619,7 +619,7 @@ VmbusChannelEstablishGpadl(
int int
VmbusChannelTeardownGpadl( VmbusChannelTeardownGpadl(
VMBUS_CHANNEL *Channel, VMBUS_CHANNEL *Channel,
UINT32 GpadlHandle u32 GpadlHandle
) )
{ {
int ret=0; int ret=0;
...@@ -753,16 +753,16 @@ int ...@@ -753,16 +753,16 @@ int
VmbusChannelSendPacket( VmbusChannelSendPacket(
VMBUS_CHANNEL *Channel, VMBUS_CHANNEL *Channel,
const void * Buffer, const void * Buffer,
UINT32 BufferLen, u32 BufferLen,
UINT64 RequestId, UINT64 RequestId,
VMBUS_PACKET_TYPE Type, VMBUS_PACKET_TYPE Type,
UINT32 Flags u32 Flags
) )
{ {
int ret=0; int ret=0;
VMPACKET_DESCRIPTOR desc; VMPACKET_DESCRIPTOR desc;
UINT32 packetLen = sizeof(VMPACKET_DESCRIPTOR) + BufferLen; u32 packetLen = sizeof(VMPACKET_DESCRIPTOR) + BufferLen;
UINT32 packetLenAligned = ALIGN_UP(packetLen, sizeof(UINT64)); u32 packetLenAligned = ALIGN_UP(packetLen, sizeof(UINT64));
SG_BUFFER_LIST bufferList[3]; SG_BUFFER_LIST bufferList[3];
UINT64 alignedData=0; UINT64 alignedData=0;
...@@ -819,18 +819,18 @@ int ...@@ -819,18 +819,18 @@ int
VmbusChannelSendPacketPageBuffer( VmbusChannelSendPacketPageBuffer(
VMBUS_CHANNEL *Channel, VMBUS_CHANNEL *Channel,
PAGE_BUFFER PageBuffers[], PAGE_BUFFER PageBuffers[],
UINT32 PageCount, u32 PageCount,
void * Buffer, void * Buffer,
UINT32 BufferLen, u32 BufferLen,
UINT64 RequestId UINT64 RequestId
) )
{ {
int ret=0; int ret=0;
int i=0; int i=0;
VMBUS_CHANNEL_PACKET_PAGE_BUFFER desc; VMBUS_CHANNEL_PACKET_PAGE_BUFFER desc;
UINT32 descSize; u32 descSize;
UINT32 packetLen; u32 packetLen;
UINT32 packetLenAligned; u32 packetLenAligned;
SG_BUFFER_LIST bufferList[3]; SG_BUFFER_LIST bufferList[3];
UINT64 alignedData=0; UINT64 alignedData=0;
...@@ -903,18 +903,18 @@ VmbusChannelSendPacketMultiPageBuffer( ...@@ -903,18 +903,18 @@ VmbusChannelSendPacketMultiPageBuffer(
VMBUS_CHANNEL *Channel, VMBUS_CHANNEL *Channel,
MULTIPAGE_BUFFER *MultiPageBuffer, MULTIPAGE_BUFFER *MultiPageBuffer,
void * Buffer, void * Buffer,
UINT32 BufferLen, u32 BufferLen,
UINT64 RequestId UINT64 RequestId
) )
{ {
int ret=0; int ret=0;
VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER desc; VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER desc;
UINT32 descSize; u32 descSize;
UINT32 packetLen; u32 packetLen;
UINT32 packetLenAligned; u32 packetLenAligned;
SG_BUFFER_LIST bufferList[3]; SG_BUFFER_LIST bufferList[3];
UINT64 alignedData=0; UINT64 alignedData=0;
UINT32 PfnCount = NUM_PAGES_SPANNED(MultiPageBuffer->Offset, MultiPageBuffer->Length); u32 PfnCount = NUM_PAGES_SPANNED(MultiPageBuffer->Offset, MultiPageBuffer->Length);
DPRINT_ENTER(VMBUS); DPRINT_ENTER(VMBUS);
...@@ -985,14 +985,14 @@ int ...@@ -985,14 +985,14 @@ int
VmbusChannelRecvPacket( VmbusChannelRecvPacket(
VMBUS_CHANNEL *Channel, VMBUS_CHANNEL *Channel,
void * Buffer, void * Buffer,
UINT32 BufferLen, u32 BufferLen,
UINT32* BufferActualLen, u32* BufferActualLen,
UINT64* RequestId UINT64* RequestId
) )
{ {
VMPACKET_DESCRIPTOR desc; VMPACKET_DESCRIPTOR desc;
UINT32 packetLen; u32 packetLen;
UINT32 userLen; u32 userLen;
int ret; int ret;
DPRINT_ENTER(VMBUS); DPRINT_ENTER(VMBUS);
...@@ -1062,14 +1062,14 @@ int ...@@ -1062,14 +1062,14 @@ int
VmbusChannelRecvPacketRaw( VmbusChannelRecvPacketRaw(
VMBUS_CHANNEL *Channel, VMBUS_CHANNEL *Channel,
void * Buffer, void * Buffer,
UINT32 BufferLen, u32 BufferLen,
UINT32* BufferActualLen, u32* BufferActualLen,
UINT64* RequestId UINT64* RequestId
) )
{ {
VMPACKET_DESCRIPTOR desc; VMPACKET_DESCRIPTOR desc;
UINT32 packetLen; u32 packetLen;
UINT32 userLen; u32 userLen;
int ret; int ret;
DPRINT_ENTER(VMBUS); DPRINT_ENTER(VMBUS);
......
...@@ -38,8 +38,8 @@ typedef struct _VMBUS_CHANNEL_PACKET_PAGE_BUFFER { ...@@ -38,8 +38,8 @@ typedef struct _VMBUS_CHANNEL_PACKET_PAGE_BUFFER {
u16 Length8; u16 Length8;
u16 Flags; u16 Flags;
UINT64 TransactionId; UINT64 TransactionId;
UINT32 Reserved; u32 Reserved;
UINT32 RangeCount; u32 RangeCount;
PAGE_BUFFER Range[MAX_PAGE_BUFFER_COUNT]; PAGE_BUFFER Range[MAX_PAGE_BUFFER_COUNT];
} VMBUS_CHANNEL_PACKET_PAGE_BUFFER; } VMBUS_CHANNEL_PACKET_PAGE_BUFFER;
...@@ -51,8 +51,8 @@ typedef struct _VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER { ...@@ -51,8 +51,8 @@ typedef struct _VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER {
u16 Length8; u16 Length8;
u16 Flags; u16 Flags;
UINT64 TransactionId; UINT64 TransactionId;
UINT32 Reserved; u32 Reserved;
UINT32 RangeCount; // Always 1 in this case u32 RangeCount; // Always 1 in this case
MULTIPAGE_BUFFER Range; MULTIPAGE_BUFFER Range;
} VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER; } VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER;
...@@ -65,10 +65,10 @@ typedef struct _VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER { ...@@ -65,10 +65,10 @@ typedef struct _VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER {
static int static int
VmbusChannelOpen( VmbusChannelOpen(
VMBUS_CHANNEL *Channel, VMBUS_CHANNEL *Channel,
UINT32 SendRingBufferSize, u32 SendRingBufferSize,
UINT32 RecvRingBufferSize, u32 RecvRingBufferSize,
void * UserData, void * UserData,
UINT32 UserDataLen, u32 UserDataLen,
PFN_CHANNEL_CALLBACK pfnOnChannelCallback, PFN_CHANNEL_CALLBACK pfnOnChannelCallback,
void * Context void * Context
); );
...@@ -82,19 +82,19 @@ static int ...@@ -82,19 +82,19 @@ static int
VmbusChannelSendPacket( VmbusChannelSendPacket(
VMBUS_CHANNEL *Channel, VMBUS_CHANNEL *Channel,
const void * Buffer, const void * Buffer,
UINT32 BufferLen, u32 BufferLen,
UINT64 RequestId, UINT64 RequestId,
VMBUS_PACKET_TYPE Type, VMBUS_PACKET_TYPE Type,
UINT32 Flags u32 Flags
); );
static int static int
VmbusChannelSendPacketPageBuffer( VmbusChannelSendPacketPageBuffer(
VMBUS_CHANNEL *Channel, VMBUS_CHANNEL *Channel,
PAGE_BUFFER PageBuffers[], PAGE_BUFFER PageBuffers[],
UINT32 PageCount, u32 PageCount,
void * Buffer, void * Buffer,
UINT32 BufferLen, u32 BufferLen,
UINT64 RequestId UINT64 RequestId
); );
...@@ -103,7 +103,7 @@ VmbusChannelSendPacketMultiPageBuffer( ...@@ -103,7 +103,7 @@ VmbusChannelSendPacketMultiPageBuffer(
VMBUS_CHANNEL *Channel, VMBUS_CHANNEL *Channel,
MULTIPAGE_BUFFER *MultiPageBuffer, MULTIPAGE_BUFFER *MultiPageBuffer,
void * Buffer, void * Buffer,
UINT32 BufferLen, u32 BufferLen,
UINT64 RequestId UINT64 RequestId
); );
...@@ -111,22 +111,22 @@ static int ...@@ -111,22 +111,22 @@ static int
VmbusChannelEstablishGpadl( VmbusChannelEstablishGpadl(
VMBUS_CHANNEL *Channel, VMBUS_CHANNEL *Channel,
void * Kbuffer, // from kmalloc() void * Kbuffer, // from kmalloc()
UINT32 Size, // page-size multiple u32 Size, // page-size multiple
UINT32 *GpadlHandle u32 *GpadlHandle
); );
static int static int
VmbusChannelTeardownGpadl( VmbusChannelTeardownGpadl(
VMBUS_CHANNEL *Channel, VMBUS_CHANNEL *Channel,
UINT32 GpadlHandle u32 GpadlHandle
); );
static int static int
VmbusChannelRecvPacket( VmbusChannelRecvPacket(
VMBUS_CHANNEL *Channel, VMBUS_CHANNEL *Channel,
void * Buffer, void * Buffer,
UINT32 BufferLen, u32 BufferLen,
UINT32* BufferActualLen, u32* BufferActualLen,
UINT64* RequestId UINT64* RequestId
); );
...@@ -134,8 +134,8 @@ static int ...@@ -134,8 +134,8 @@ static int
VmbusChannelRecvPacketRaw( VmbusChannelRecvPacketRaw(
VMBUS_CHANNEL *Channel, VMBUS_CHANNEL *Channel,
void * Buffer, void * Buffer,
UINT32 BufferLen, u32 BufferLen,
UINT32* BufferActualLen, u32* BufferActualLen,
UINT64* RequestId UINT64* RequestId
); );
......
...@@ -26,10 +26,10 @@ ...@@ -26,10 +26,10 @@
static int static int
IVmbusChannelOpen( IVmbusChannelOpen(
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
UINT32 SendBufferSize, u32 SendBufferSize,
UINT32 RecvRingBufferSize, u32 RecvRingBufferSize,
void * UserData, void * UserData,
UINT32 UserDataLen, u32 UserDataLen,
VMBUS_CHANNEL_CALLBACK ChannelCallback, VMBUS_CHANNEL_CALLBACK ChannelCallback,
void * Context void * Context
) )
...@@ -57,10 +57,10 @@ static int ...@@ -57,10 +57,10 @@ static int
IVmbusChannelSendPacket( IVmbusChannelSendPacket(
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
const void * Buffer, const void * Buffer,
UINT32 BufferLen, u32 BufferLen,
UINT64 RequestId, UINT64 RequestId,
UINT32 Type, u32 Type,
UINT32 Flags u32 Flags
) )
{ {
return VmbusChannelSendPacket((VMBUS_CHANNEL*)Device->context, return VmbusChannelSendPacket((VMBUS_CHANNEL*)Device->context,
...@@ -75,9 +75,9 @@ static int ...@@ -75,9 +75,9 @@ static int
IVmbusChannelSendPacketPageBuffer( IVmbusChannelSendPacketPageBuffer(
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
PAGE_BUFFER PageBuffers[], PAGE_BUFFER PageBuffers[],
UINT32 PageCount, u32 PageCount,
void * Buffer, void * Buffer,
UINT32 BufferLen, u32 BufferLen,
UINT64 RequestId UINT64 RequestId
) )
{ {
...@@ -94,7 +94,7 @@ IVmbusChannelSendPacketMultiPageBuffer( ...@@ -94,7 +94,7 @@ IVmbusChannelSendPacketMultiPageBuffer(
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
MULTIPAGE_BUFFER *MultiPageBuffer, MULTIPAGE_BUFFER *MultiPageBuffer,
void * Buffer, void * Buffer,
UINT32 BufferLen, u32 BufferLen,
UINT64 RequestId UINT64 RequestId
) )
{ {
...@@ -109,8 +109,8 @@ static int ...@@ -109,8 +109,8 @@ static int
IVmbusChannelRecvPacket ( IVmbusChannelRecvPacket (
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
void * Buffer, void * Buffer,
UINT32 BufferLen, u32 BufferLen,
UINT32* BufferActualLen, u32* BufferActualLen,
UINT64* RequestId UINT64* RequestId
) )
{ {
...@@ -125,8 +125,8 @@ static int ...@@ -125,8 +125,8 @@ static int
IVmbusChannelRecvPacketRaw( IVmbusChannelRecvPacketRaw(
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
void * Buffer, void * Buffer,
UINT32 BufferLen, u32 BufferLen,
UINT32* BufferActualLen, u32* BufferActualLen,
UINT64* RequestId UINT64* RequestId
) )
{ {
...@@ -141,8 +141,8 @@ static int ...@@ -141,8 +141,8 @@ static int
IVmbusChannelEstablishGpadl( IVmbusChannelEstablishGpadl(
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
void * Buffer, void * Buffer,
UINT32 BufferLen, u32 BufferLen,
UINT32* GpadlHandle u32* GpadlHandle
) )
{ {
return VmbusChannelEstablishGpadl((VMBUS_CHANNEL*)Device->context, return VmbusChannelEstablishGpadl((VMBUS_CHANNEL*)Device->context,
...@@ -154,7 +154,7 @@ IVmbusChannelEstablishGpadl( ...@@ -154,7 +154,7 @@ IVmbusChannelEstablishGpadl(
static int static int
IVmbusChannelTeardownGpadl( IVmbusChannelTeardownGpadl(
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
UINT32 GpadlHandle u32 GpadlHandle
) )
{ {
return VmbusChannelTeardownGpadl((VMBUS_CHANNEL*)Device->context, return VmbusChannelTeardownGpadl((VMBUS_CHANNEL*)Device->context,
......
...@@ -56,11 +56,11 @@ typedef struct _VMBUS_CHANNEL { ...@@ -56,11 +56,11 @@ typedef struct _VMBUS_CHANNEL {
u8 MonitorGroup; u8 MonitorGroup;
u8 MonitorBit; u8 MonitorBit;
UINT32 RingBufferGpadlHandle; u32 RingBufferGpadlHandle;
// Allocated memory for ring buffer // Allocated memory for ring buffer
void * RingBufferPages; void * RingBufferPages;
UINT32 RingBufferPageCount; u32 RingBufferPageCount;
RING_BUFFER_INFO Outbound; // send to parent RING_BUFFER_INFO Outbound; // send to parent
RING_BUFFER_INFO Inbound; // receive from parent RING_BUFFER_INFO Inbound; // receive from parent
HANDLE InboundLock; HANDLE InboundLock;
...@@ -76,17 +76,17 @@ typedef struct _VMBUS_CHANNEL { ...@@ -76,17 +76,17 @@ typedef struct _VMBUS_CHANNEL {
typedef struct _VMBUS_CHANNEL_DEBUG_INFO { typedef struct _VMBUS_CHANNEL_DEBUG_INFO {
UINT32 RelId; u32 RelId;
VMBUS_CHANNEL_STATE State; VMBUS_CHANNEL_STATE State;
GUID InterfaceType; GUID InterfaceType;
GUID InterfaceInstance; GUID InterfaceInstance;
UINT32 MonitorId; u32 MonitorId;
UINT32 ServerMonitorPending; u32 ServerMonitorPending;
UINT32 ServerMonitorLatency; u32 ServerMonitorLatency;
UINT32 ServerMonitorConnectionId; u32 ServerMonitorConnectionId;
UINT32 ClientMonitorPending; u32 ClientMonitorPending;
UINT32 ClientMonitorLatency; u32 ClientMonitorLatency;
UINT32 ClientMonitorConnectionId; u32 ClientMonitorConnectionId;
RING_BUFFER_DEBUG_INFO Inbound; RING_BUFFER_DEBUG_INFO Inbound;
RING_BUFFER_DEBUG_INFO Outbound; RING_BUFFER_DEBUG_INFO Outbound;
...@@ -117,7 +117,7 @@ typedef struct _VMBUS_CHANNEL_MSGINFO { ...@@ -117,7 +117,7 @@ typedef struct _VMBUS_CHANNEL_MSGINFO {
VMBUS_CHANNEL_MESSAGE_RESPONSE Response; VMBUS_CHANNEL_MESSAGE_RESPONSE Response;
UINT32 MessageSize; u32 MessageSize;
// The channel message that goes out on the "wire". // The channel message that goes out on the "wire".
// It will contain at minimum the VMBUS_CHANNEL_MESSAGE_HEADER header // It will contain at minimum the VMBUS_CHANNEL_MESSAGE_HEADER header
unsigned char Msg[0]; unsigned char Msg[0];
......
...@@ -253,7 +253,7 @@ VmbusDisconnect( ...@@ -253,7 +253,7 @@ VmbusDisconnect(
--*/ --*/
VMBUS_CHANNEL* VMBUS_CHANNEL*
GetChannelFromRelId( GetChannelFromRelId(
UINT32 relId u32 relId
) )
{ {
VMBUS_CHANNEL* channel; VMBUS_CHANNEL* channel;
...@@ -294,7 +294,7 @@ VmbusProcessChannelEvent( ...@@ -294,7 +294,7 @@ VmbusProcessChannelEvent(
) )
{ {
VMBUS_CHANNEL* channel; VMBUS_CHANNEL* channel;
UINT32 relId = (UINT32)(ULONG_PTR)context; u32 relId = (u32)(ULONG_PTR)context;
ASSERT(relId > 0); ASSERT(relId > 0);
...@@ -333,7 +333,7 @@ VmbusOnEvents( ...@@ -333,7 +333,7 @@ VmbusOnEvents(
int maxdword = MAX_NUM_CHANNELS_SUPPORTED >> 5; int maxdword = MAX_NUM_CHANNELS_SUPPORTED >> 5;
int bit; int bit;
int relid; int relid;
UINT32* recvInterruptPage = gVmbusConnection.RecvInterruptPage; u32* recvInterruptPage = gVmbusConnection.RecvInterruptPage;
//VMBUS_CHANNEL_MESSAGE* receiveMsg; //VMBUS_CHANNEL_MESSAGE* receiveMsg;
DPRINT_ENTER(VMBUS); DPRINT_ENTER(VMBUS);
...@@ -393,7 +393,7 @@ VmbusPostMessage( ...@@ -393,7 +393,7 @@ VmbusPostMessage(
HV_CONNECTION_ID connId; HV_CONNECTION_ID connId;
connId.AsUINT32 =0; connId.Asu32 =0;
connId.u.Id = VMBUS_MESSAGE_CONNECTION_ID; connId.u.Id = VMBUS_MESSAGE_CONNECTION_ID;
ret = HvPostMessage( ret = HvPostMessage(
connId, connId,
...@@ -414,14 +414,14 @@ VmbusPostMessage( ...@@ -414,14 +414,14 @@ VmbusPostMessage(
--*/ --*/
int int
VmbusSetEvent(UINT32 childRelId) VmbusSetEvent(u32 childRelId)
{ {
int ret=0; int ret=0;
DPRINT_ENTER(VMBUS); DPRINT_ENTER(VMBUS);
// Each UINT32 represents 32 channels // Each u32 represents 32 channels
BitSet((UINT32*)gVmbusConnection.SendInterruptPage + (childRelId >> 5), childRelId & 31); BitSet((u32*)gVmbusConnection.SendInterruptPage + (childRelId >> 5), childRelId & 31);
ret = HvSignalEvent(); ret = HvSignalEvent();
DPRINT_EXIT(VMBUS); DPRINT_EXIT(VMBUS);
......
...@@ -188,16 +188,16 @@ HvDoHypercall ( ...@@ -188,16 +188,16 @@ HvDoHypercall (
#else #else
UINT32 controlHi = Control >> 32; u32 controlHi = Control >> 32;
UINT32 controlLo = Control & 0xFFFFFFFF; u32 controlLo = Control & 0xFFFFFFFF;
UINT32 hvStatusHi = 1; u32 hvStatusHi = 1;
UINT32 hvStatusLo = 1; u32 hvStatusLo = 1;
UINT64 inputAddress = (Input) ? GetPhysicalAddress(Input) : 0; UINT64 inputAddress = (Input) ? GetPhysicalAddress(Input) : 0;
UINT32 inputAddressHi = inputAddress >> 32; u32 inputAddressHi = inputAddress >> 32;
UINT32 inputAddressLo = inputAddress & 0xFFFFFFFF; u32 inputAddressLo = inputAddress & 0xFFFFFFFF;
UINT64 outputAddress = (Output) ?GetPhysicalAddress(Output) : 0; UINT64 outputAddress = (Output) ?GetPhysicalAddress(Output) : 0;
UINT32 outputAddressHi = outputAddress >> 32; u32 outputAddressHi = outputAddress >> 32;
UINT32 outputAddressLo = outputAddress & 0xFFFFFFFF; u32 outputAddressLo = outputAddress & 0xFFFFFFFF;
volatile void* hypercallPage = gHvContext.HypercallPage; volatile void* hypercallPage = gHvContext.HypercallPage;
DPRINT_DBG(VMBUS, "Hypercall <control %llx input %p output %p>", DPRINT_DBG(VMBUS, "Hypercall <control %llx input %p output %p>",
...@@ -312,7 +312,7 @@ HvInit ( ...@@ -312,7 +312,7 @@ HvInit (
} }
gHvContext.SignalEventParam = (PHV_INPUT_SIGNAL_EVENT)(ALIGN_UP((ULONG_PTR)gHvContext.SignalEventBuffer, HV_HYPERCALL_PARAM_ALIGN)); gHvContext.SignalEventParam = (PHV_INPUT_SIGNAL_EVENT)(ALIGN_UP((ULONG_PTR)gHvContext.SignalEventBuffer, HV_HYPERCALL_PARAM_ALIGN));
gHvContext.SignalEventParam->ConnectionId.AsUINT32 = 0; gHvContext.SignalEventParam->ConnectionId.Asu32 = 0;
gHvContext.SignalEventParam->ConnectionId.u.Id = VMBUS_EVENT_CONNECTION_ID; gHvContext.SignalEventParam->ConnectionId.u.Id = VMBUS_EVENT_CONNECTION_ID;
gHvContext.SignalEventParam->FlagNumber = 0; gHvContext.SignalEventParam->FlagNumber = 0;
gHvContext.SignalEventParam->RsvdZ = 0; gHvContext.SignalEventParam->RsvdZ = 0;
...@@ -471,7 +471,7 @@ HvSignalEvent( ...@@ -471,7 +471,7 @@ HvSignalEvent(
--*/ --*/
int int
HvSynicInit ( HvSynicInit (
UINT32 irqVector u32 irqVector
) )
{ {
UINT64 version; UINT64 version;
......
...@@ -173,7 +173,7 @@ HvSignalEvent( ...@@ -173,7 +173,7 @@ HvSignalEvent(
static int static int
HvSynicInit( HvSynicInit(
UINT32 irqVector u32 irqVector
); );
static void static void
......
...@@ -1402,7 +1402,7 @@ NetVscOnChannelCallback( ...@@ -1402,7 +1402,7 @@ NetVscOnChannelCallback(
DEVICE_OBJECT *device=(DEVICE_OBJECT*)Context; DEVICE_OBJECT *device=(DEVICE_OBJECT*)Context;
NETVSC_DEVICE *netDevice; NETVSC_DEVICE *netDevice;
UINT32 bytesRecvd; u32 bytesRecvd;
UINT64 requestId; UINT64 requestId;
UCHAR packet[netPacketSize]; UCHAR packet[netPacketSize];
VMPACKET_DESCRIPTOR *desc; VMPACKET_DESCRIPTOR *desc;
......
...@@ -66,15 +66,15 @@ typedef struct _NETVSC_DEVICE { ...@@ -66,15 +66,15 @@ typedef struct _NETVSC_DEVICE {
// Send buffer allocated by us but manages by NetVSP // Send buffer allocated by us but manages by NetVSP
void * SendBuffer; void * SendBuffer;
UINT32 SendBufferSize; u32 SendBufferSize;
UINT32 SendBufferGpadlHandle; u32 SendBufferGpadlHandle;
UINT32 SendSectionSize; u32 SendSectionSize;
// Receive buffer allocated by us but manages by NetVSP // Receive buffer allocated by us but manages by NetVSP
void * ReceiveBuffer; void * ReceiveBuffer;
UINT32 ReceiveBufferSize; u32 ReceiveBufferSize;
UINT32 ReceiveBufferGpadlHandle; u32 ReceiveBufferGpadlHandle;
UINT32 ReceiveSectionCount; u32 ReceiveSectionCount;
PNVSP_1_RECEIVE_BUFFER_SECTION ReceiveSections; PNVSP_1_RECEIVE_BUFFER_SECTION ReceiveSections;
// Used for NetVSP initialization protocol // Used for NetVSP initialization protocol
......
...@@ -44,9 +44,9 @@ ...@@ -44,9 +44,9 @@
--*/ --*/
static inline void static inline void
GetRingBufferAvailBytes(RING_BUFFER_INFO *rbi, UINT32 *read, UINT32 *write) GetRingBufferAvailBytes(RING_BUFFER_INFO *rbi, u32 *read, u32 *write)
{ {
UINT32 read_loc,write_loc; u32 read_loc,write_loc;
// Capture the read/write indices before they changed // Capture the read/write indices before they changed
read_loc = rbi->RingBuffer->ReadIndex; read_loc = rbi->RingBuffer->ReadIndex;
...@@ -65,10 +65,10 @@ GetRingBufferAvailBytes(RING_BUFFER_INFO *rbi, UINT32 *read, UINT32 *write) ...@@ -65,10 +65,10 @@ GetRingBufferAvailBytes(RING_BUFFER_INFO *rbi, UINT32 *read, UINT32 *write)
Get the next write location for the specified ring buffer Get the next write location for the specified ring buffer
--*/ --*/
static inline UINT32 static inline u32
GetNextWriteLocation(RING_BUFFER_INFO* RingInfo) GetNextWriteLocation(RING_BUFFER_INFO* RingInfo)
{ {
UINT32 next = RingInfo->RingBuffer->WriteIndex; u32 next = RingInfo->RingBuffer->WriteIndex;
ASSERT(next < RingInfo->RingDataSize); ASSERT(next < RingInfo->RingDataSize);
...@@ -85,7 +85,7 @@ GetNextWriteLocation(RING_BUFFER_INFO* RingInfo) ...@@ -85,7 +85,7 @@ GetNextWriteLocation(RING_BUFFER_INFO* RingInfo)
--*/ --*/
static inline void static inline void
SetNextWriteLocation(RING_BUFFER_INFO* RingInfo, UINT32 NextWriteLocation) SetNextWriteLocation(RING_BUFFER_INFO* RingInfo, u32 NextWriteLocation)
{ {
RingInfo->RingBuffer->WriteIndex = NextWriteLocation; RingInfo->RingBuffer->WriteIndex = NextWriteLocation;
} }
...@@ -99,10 +99,10 @@ SetNextWriteLocation(RING_BUFFER_INFO* RingInfo, UINT32 NextWriteLocation) ...@@ -99,10 +99,10 @@ SetNextWriteLocation(RING_BUFFER_INFO* RingInfo, UINT32 NextWriteLocation)
Get the next read location for the specified ring buffer Get the next read location for the specified ring buffer
--*/ --*/
static inline UINT32 static inline u32
GetNextReadLocation(RING_BUFFER_INFO* RingInfo) GetNextReadLocation(RING_BUFFER_INFO* RingInfo)
{ {
UINT32 next = RingInfo->RingBuffer->ReadIndex; u32 next = RingInfo->RingBuffer->ReadIndex;
ASSERT(next < RingInfo->RingDataSize); ASSERT(next < RingInfo->RingDataSize);
...@@ -119,10 +119,10 @@ GetNextReadLocation(RING_BUFFER_INFO* RingInfo) ...@@ -119,10 +119,10 @@ GetNextReadLocation(RING_BUFFER_INFO* RingInfo)
This allows the caller to skip This allows the caller to skip
--*/ --*/
static inline UINT32 static inline u32
GetNextReadLocationWithOffset(RING_BUFFER_INFO* RingInfo, UINT32 Offset) GetNextReadLocationWithOffset(RING_BUFFER_INFO* RingInfo, u32 Offset)
{ {
UINT32 next = RingInfo->RingBuffer->ReadIndex; u32 next = RingInfo->RingBuffer->ReadIndex;
ASSERT(next < RingInfo->RingDataSize); ASSERT(next < RingInfo->RingDataSize);
next += Offset; next += Offset;
...@@ -141,7 +141,7 @@ GetNextReadLocationWithOffset(RING_BUFFER_INFO* RingInfo, UINT32 Offset) ...@@ -141,7 +141,7 @@ GetNextReadLocationWithOffset(RING_BUFFER_INFO* RingInfo, UINT32 Offset)
--*/ --*/
static inline void static inline void
SetNextReadLocation(RING_BUFFER_INFO* RingInfo, UINT32 NextReadLocation) SetNextReadLocation(RING_BUFFER_INFO* RingInfo, u32 NextReadLocation)
{ {
RingInfo->RingBuffer->ReadIndex = NextReadLocation; RingInfo->RingBuffer->ReadIndex = NextReadLocation;
} }
...@@ -172,7 +172,7 @@ GetRingBuffer(RING_BUFFER_INFO* RingInfo) ...@@ -172,7 +172,7 @@ GetRingBuffer(RING_BUFFER_INFO* RingInfo)
Get the size of the ring buffer Get the size of the ring buffer
--*/ --*/
static inline UINT32 static inline u32
GetRingBufferSize(RING_BUFFER_INFO* RingInfo) GetRingBufferSize(RING_BUFFER_INFO* RingInfo)
{ {
return RingInfo->RingDataSize; return RingInfo->RingDataSize;
...@@ -206,8 +206,8 @@ GetRingBufferIndices(RING_BUFFER_INFO* RingInfo) ...@@ -206,8 +206,8 @@ GetRingBufferIndices(RING_BUFFER_INFO* RingInfo)
void void
DumpRingInfo(RING_BUFFER_INFO* RingInfo, char *Prefix) DumpRingInfo(RING_BUFFER_INFO* RingInfo, char *Prefix)
{ {
UINT32 bytesAvailToWrite; u32 bytesAvailToWrite;
UINT32 bytesAvailToRead; u32 bytesAvailToRead;
GetRingBufferAvailBytes(RingInfo, &bytesAvailToRead, &bytesAvailToWrite); GetRingBufferAvailBytes(RingInfo, &bytesAvailToRead, &bytesAvailToWrite);
...@@ -224,19 +224,19 @@ DumpRingInfo(RING_BUFFER_INFO* RingInfo, char *Prefix) ...@@ -224,19 +224,19 @@ DumpRingInfo(RING_BUFFER_INFO* RingInfo, char *Prefix)
// //
// Internal routines // Internal routines
// //
static UINT32 static u32
CopyToRingBuffer( CopyToRingBuffer(
RING_BUFFER_INFO *RingInfo, RING_BUFFER_INFO *RingInfo,
UINT32 StartWriteOffset, u32 StartWriteOffset,
void * Src, void * Src,
UINT32 SrcLen); u32 SrcLen);
static UINT32 static u32
CopyFromRingBuffer( CopyFromRingBuffer(
RING_BUFFER_INFO *RingInfo, RING_BUFFER_INFO *RingInfo,
void * Dest, void * Dest,
UINT32 DestLen, u32 DestLen,
UINT32 StartReadOffset); u32 StartReadOffset);
...@@ -255,8 +255,8 @@ RingBufferGetDebugInfo( ...@@ -255,8 +255,8 @@ RingBufferGetDebugInfo(
RING_BUFFER_DEBUG_INFO *DebugInfo RING_BUFFER_DEBUG_INFO *DebugInfo
) )
{ {
UINT32 bytesAvailToWrite; u32 bytesAvailToWrite;
UINT32 bytesAvailToRead; u32 bytesAvailToRead;
if (RingInfo->RingBuffer) if (RingInfo->RingBuffer)
{ {
...@@ -281,7 +281,7 @@ RingBufferGetDebugInfo( ...@@ -281,7 +281,7 @@ RingBufferGetDebugInfo(
Get the interrupt mask for the specified ring buffer Get the interrupt mask for the specified ring buffer
--*/ --*/
UINT32 u32
GetRingBufferInterruptMask( GetRingBufferInterruptMask(
RING_BUFFER_INFO *rbi RING_BUFFER_INFO *rbi
) )
...@@ -302,7 +302,7 @@ int ...@@ -302,7 +302,7 @@ int
RingBufferInit( RingBufferInit(
RING_BUFFER_INFO *RingInfo, RING_BUFFER_INFO *RingInfo,
void *Buffer, void *Buffer,
UINT32 BufferLen u32 BufferLen
) )
{ {
ASSERT(sizeof(RING_BUFFER) == PAGE_SIZE); ASSERT(sizeof(RING_BUFFER) == PAGE_SIZE);
...@@ -350,15 +350,15 @@ int ...@@ -350,15 +350,15 @@ int
RingBufferWrite( RingBufferWrite(
RING_BUFFER_INFO* OutRingInfo, RING_BUFFER_INFO* OutRingInfo,
SG_BUFFER_LIST SgBuffers[], SG_BUFFER_LIST SgBuffers[],
UINT32 SgBufferCount u32 SgBufferCount
) )
{ {
int i=0; int i=0;
UINT32 byteAvailToWrite; u32 byteAvailToWrite;
UINT32 byteAvailToRead; u32 byteAvailToRead;
UINT32 totalBytesToWrite=0; u32 totalBytesToWrite=0;
volatile UINT32 nextWriteLocation; volatile u32 nextWriteLocation;
UINT64 prevIndices=0; UINT64 prevIndices=0;
DPRINT_ENTER(VMBUS); DPRINT_ENTER(VMBUS);
...@@ -439,12 +439,12 @@ int ...@@ -439,12 +439,12 @@ int
RingBufferPeek( RingBufferPeek(
RING_BUFFER_INFO* InRingInfo, RING_BUFFER_INFO* InRingInfo,
void* Buffer, void* Buffer,
UINT32 BufferLen u32 BufferLen
) )
{ {
UINT32 bytesAvailToWrite; u32 bytesAvailToWrite;
UINT32 bytesAvailToRead; u32 bytesAvailToRead;
UINT32 nextReadLocation=0; u32 nextReadLocation=0;
SpinlockAcquire(InRingInfo->RingLock); SpinlockAcquire(InRingInfo->RingLock);
...@@ -487,13 +487,13 @@ int ...@@ -487,13 +487,13 @@ int
RingBufferRead( RingBufferRead(
RING_BUFFER_INFO* InRingInfo, RING_BUFFER_INFO* InRingInfo,
void * Buffer, void * Buffer,
UINT32 BufferLen, u32 BufferLen,
UINT32 Offset u32 Offset
) )
{ {
UINT32 bytesAvailToWrite; u32 bytesAvailToWrite;
UINT32 bytesAvailToRead; u32 bytesAvailToRead;
UINT32 nextReadLocation=0; u32 nextReadLocation=0;
UINT64 prevIndices=0; UINT64 prevIndices=0;
ASSERT(BufferLen > 0); ASSERT(BufferLen > 0);
...@@ -553,16 +553,16 @@ RingBufferRead( ...@@ -553,16 +553,16 @@ RingBufferRead(
Assume there is enough room. Handles wrap-around in dest case only!! Assume there is enough room. Handles wrap-around in dest case only!!
--*/ --*/
UINT32 u32
CopyToRingBuffer( CopyToRingBuffer(
RING_BUFFER_INFO *RingInfo, RING_BUFFER_INFO *RingInfo,
UINT32 StartWriteOffset, u32 StartWriteOffset,
void * Src, void * Src,
UINT32 SrcLen) u32 SrcLen)
{ {
void * ringBuffer=GetRingBuffer(RingInfo); void * ringBuffer=GetRingBuffer(RingInfo);
UINT32 ringBufferSize=GetRingBufferSize(RingInfo); u32 ringBufferSize=GetRingBufferSize(RingInfo);
UINT32 fragLen; u32 fragLen;
if (SrcLen > ringBufferSize - StartWriteOffset) // wrap-around detected! if (SrcLen > ringBufferSize - StartWriteOffset) // wrap-around detected!
{ {
...@@ -594,17 +594,17 @@ CopyToRingBuffer( ...@@ -594,17 +594,17 @@ CopyToRingBuffer(
Assume there is enough room. Handles wrap-around in src case only!! Assume there is enough room. Handles wrap-around in src case only!!
--*/ --*/
UINT32 u32
CopyFromRingBuffer( CopyFromRingBuffer(
RING_BUFFER_INFO *RingInfo, RING_BUFFER_INFO *RingInfo,
void * Dest, void * Dest,
UINT32 DestLen, u32 DestLen,
UINT32 StartReadOffset) u32 StartReadOffset)
{ {
void * ringBuffer=GetRingBuffer(RingInfo); void * ringBuffer=GetRingBuffer(RingInfo);
UINT32 ringBufferSize=GetRingBufferSize(RingInfo); u32 ringBufferSize=GetRingBufferSize(RingInfo);
UINT32 fragLen; u32 fragLen;
if (DestLen > ringBufferSize - StartReadOffset) // wrap-around detected at the src if (DestLen > ringBufferSize - StartReadOffset) // wrap-around detected at the src
{ {
......
...@@ -29,39 +29,39 @@ ...@@ -29,39 +29,39 @@
typedef struct _SG_BUFFER_LIST { typedef struct _SG_BUFFER_LIST {
void * Data; void * Data;
UINT32 Length; u32 Length;
} SG_BUFFER_LIST; } SG_BUFFER_LIST;
typedef struct _RING_BUFFER { typedef struct _RING_BUFFER {
volatile UINT32 WriteIndex; // Offset in bytes from the start of ring data below volatile u32 WriteIndex; // Offset in bytes from the start of ring data below
volatile UINT32 ReadIndex; // Offset in bytes from the start of ring data below volatile u32 ReadIndex; // Offset in bytes from the start of ring data below
volatile UINT32 InterruptMask; volatile u32 InterruptMask;
u8 Reserved[4084]; // Pad it to PAGE_SIZE so that data starts on page boundary u8 Reserved[4084]; // Pad it to PAGE_SIZE so that data starts on page boundary
// NOTE: The InterruptMask field is used only for channels but since our vmbus connection // NOTE: The InterruptMask field is used only for channels but since our vmbus connection
// also uses this data structure and its data starts here, we commented out this field. // also uses this data structure and its data starts here, we commented out this field.
// volatile UINT32 InterruptMask; // volatile u32 InterruptMask;
// Ring data starts here + RingDataStartOffset !!! DO NOT place any fields below this !!! // Ring data starts here + RingDataStartOffset !!! DO NOT place any fields below this !!!
u8 Buffer[0]; u8 Buffer[0];
} STRUCT_PACKED RING_BUFFER; } STRUCT_PACKED RING_BUFFER;
typedef struct _RING_BUFFER_INFO { typedef struct _RING_BUFFER_INFO {
RING_BUFFER* RingBuffer; RING_BUFFER* RingBuffer;
UINT32 RingSize; // Include the shared header u32 RingSize; // Include the shared header
HANDLE RingLock; HANDLE RingLock;
UINT32 RingDataSize; // < ringSize u32 RingDataSize; // < ringSize
UINT32 RingDataStartOffset; u32 RingDataStartOffset;
} RING_BUFFER_INFO; } RING_BUFFER_INFO;
typedef struct _RING_BUFFER_DEBUG_INFO { typedef struct _RING_BUFFER_DEBUG_INFO {
UINT32 CurrentInterruptMask; u32 CurrentInterruptMask;
UINT32 CurrentReadIndex; u32 CurrentReadIndex;
UINT32 CurrentWriteIndex; u32 CurrentWriteIndex;
UINT32 BytesAvailToRead; u32 BytesAvailToRead;
UINT32 BytesAvailToWrite; u32 BytesAvailToWrite;
}RING_BUFFER_DEBUG_INFO; }RING_BUFFER_DEBUG_INFO;
...@@ -73,7 +73,7 @@ static int ...@@ -73,7 +73,7 @@ static int
RingBufferInit( RingBufferInit(
RING_BUFFER_INFO *RingInfo, RING_BUFFER_INFO *RingInfo,
void * Buffer, void * Buffer,
UINT32 BufferLen u32 BufferLen
); );
static void static void
...@@ -85,25 +85,25 @@ static int ...@@ -85,25 +85,25 @@ static int
RingBufferWrite( RingBufferWrite(
RING_BUFFER_INFO *RingInfo, RING_BUFFER_INFO *RingInfo,
SG_BUFFER_LIST SgBuffers[], SG_BUFFER_LIST SgBuffers[],
UINT32 SgBufferCount u32 SgBufferCount
); );
static int static int
RingBufferPeek( RingBufferPeek(
RING_BUFFER_INFO *RingInfo, RING_BUFFER_INFO *RingInfo,
void * Buffer, void * Buffer,
UINT32 BufferLen u32 BufferLen
); );
static int static int
RingBufferRead( RingBufferRead(
RING_BUFFER_INFO *RingInfo, RING_BUFFER_INFO *RingInfo,
void * Buffer, void * Buffer,
UINT32 BufferLen, u32 BufferLen,
UINT32 Offset u32 Offset
); );
static UINT32 static u32
GetRingBufferInterruptMask( GetRingBufferInterruptMask(
RING_BUFFER_INFO *RingInfo RING_BUFFER_INFO *RingInfo
); );
......
...@@ -50,8 +50,8 @@ typedef struct _RNDIS_DEVICE { ...@@ -50,8 +50,8 @@ typedef struct _RNDIS_DEVICE {
NETVSC_DEVICE *NetDevice; NETVSC_DEVICE *NetDevice;
RNDIS_DEVICE_STATE State; RNDIS_DEVICE_STATE State;
UINT32 LinkStatus; u32 LinkStatus;
UINT32 NewRequestId; u32 NewRequestId;
HANDLE RequestLock; HANDLE RequestLock;
LIST_ENTRY RequestList; LIST_ENTRY RequestList;
...@@ -120,9 +120,9 @@ RndisFilterOnReceive( ...@@ -120,9 +120,9 @@ RndisFilterOnReceive(
static int static int
RndisFilterQueryDevice( RndisFilterQueryDevice(
RNDIS_DEVICE *Device, RNDIS_DEVICE *Device,
UINT32 Oid, u32 Oid,
void *Result, void *Result,
UINT32 *ResultSize u32 *ResultSize
); );
static inline int static inline int
...@@ -138,7 +138,7 @@ RndisFilterQueryDeviceLinkStatus( ...@@ -138,7 +138,7 @@ RndisFilterQueryDeviceLinkStatus(
static int static int
RndisFilterSetPacketFilter( RndisFilterSetPacketFilter(
RNDIS_DEVICE *Device, RNDIS_DEVICE *Device,
UINT32 NewFilter u32 NewFilter
); );
static int static int
...@@ -235,7 +235,7 @@ static inline void PutRndisDevice(RNDIS_DEVICE *Device) ...@@ -235,7 +235,7 @@ static inline void PutRndisDevice(RNDIS_DEVICE *Device)
MemFree(Device); MemFree(Device);
} }
static inline RNDIS_REQUEST* GetRndisRequest(RNDIS_DEVICE *Device, UINT32 MessageType, UINT32 MessageLength) static inline RNDIS_REQUEST* GetRndisRequest(RNDIS_DEVICE *Device, u32 MessageType, u32 MessageLength)
{ {
RNDIS_REQUEST *request; RNDIS_REQUEST *request;
RNDIS_MESSAGE *rndisMessage; RNDIS_MESSAGE *rndisMessage;
...@@ -465,7 +465,7 @@ RndisFilterReceiveData( ...@@ -465,7 +465,7 @@ RndisFilterReceiveData(
) )
{ {
RNDIS_PACKET *rndisPacket; RNDIS_PACKET *rndisPacket;
UINT32 dataOffset; u32 dataOffset;
DPRINT_ENTER(NETVSC); DPRINT_ENTER(NETVSC);
...@@ -585,13 +585,13 @@ RndisFilterOnReceive( ...@@ -585,13 +585,13 @@ RndisFilterOnReceive(
static int static int
RndisFilterQueryDevice( RndisFilterQueryDevice(
RNDIS_DEVICE *Device, RNDIS_DEVICE *Device,
UINT32 Oid, u32 Oid,
void *Result, void *Result,
UINT32 *ResultSize u32 *ResultSize
) )
{ {
RNDIS_REQUEST *request; RNDIS_REQUEST *request;
UINT32 inresultSize = *ResultSize; u32 inresultSize = *ResultSize;
RNDIS_QUERY_REQUEST *query; RNDIS_QUERY_REQUEST *query;
RNDIS_QUERY_COMPLETE *queryComplete; RNDIS_QUERY_COMPLETE *queryComplete;
int ret=0; int ret=0;
...@@ -653,7 +653,7 @@ RndisFilterQueryDeviceMac( ...@@ -653,7 +653,7 @@ RndisFilterQueryDeviceMac(
RNDIS_DEVICE *Device RNDIS_DEVICE *Device
) )
{ {
UINT32 size=HW_MACADDR_LEN; u32 size=HW_MACADDR_LEN;
return RndisFilterQueryDevice(Device, return RndisFilterQueryDevice(Device,
RNDIS_OID_802_3_PERMANENT_ADDRESS, RNDIS_OID_802_3_PERMANENT_ADDRESS,
...@@ -666,7 +666,7 @@ RndisFilterQueryDeviceLinkStatus( ...@@ -666,7 +666,7 @@ RndisFilterQueryDeviceLinkStatus(
RNDIS_DEVICE *Device RNDIS_DEVICE *Device
) )
{ {
UINT32 size=sizeof(UINT32); u32 size=sizeof(u32);
return RndisFilterQueryDevice(Device, return RndisFilterQueryDevice(Device,
RNDIS_OID_GEN_MEDIA_CONNECT_STATUS, RNDIS_OID_GEN_MEDIA_CONNECT_STATUS,
...@@ -677,20 +677,20 @@ RndisFilterQueryDeviceLinkStatus( ...@@ -677,20 +677,20 @@ RndisFilterQueryDeviceLinkStatus(
static int static int
RndisFilterSetPacketFilter( RndisFilterSetPacketFilter(
RNDIS_DEVICE *Device, RNDIS_DEVICE *Device,
UINT32 NewFilter u32 NewFilter
) )
{ {
RNDIS_REQUEST *request; RNDIS_REQUEST *request;
RNDIS_SET_REQUEST *set; RNDIS_SET_REQUEST *set;
RNDIS_SET_COMPLETE *setComplete; RNDIS_SET_COMPLETE *setComplete;
UINT32 status; u32 status;
int ret; int ret;
DPRINT_ENTER(NETVSC); DPRINT_ENTER(NETVSC);
ASSERT(RNDIS_MESSAGE_SIZE(RNDIS_SET_REQUEST) + sizeof(UINT32) <= sizeof(RNDIS_MESSAGE)); ASSERT(RNDIS_MESSAGE_SIZE(RNDIS_SET_REQUEST) + sizeof(u32) <= sizeof(RNDIS_MESSAGE));
request = GetRndisRequest(Device, REMOTE_NDIS_SET_MSG, RNDIS_MESSAGE_SIZE(RNDIS_SET_REQUEST) + sizeof(UINT32)); request = GetRndisRequest(Device, REMOTE_NDIS_SET_MSG, RNDIS_MESSAGE_SIZE(RNDIS_SET_REQUEST) + sizeof(u32));
if (!request) if (!request)
{ {
ret = -1; ret = -1;
...@@ -700,10 +700,10 @@ RndisFilterSetPacketFilter( ...@@ -700,10 +700,10 @@ RndisFilterSetPacketFilter(
// Setup the rndis set // Setup the rndis set
set = &request->RequestMessage.Message.SetRequest; set = &request->RequestMessage.Message.SetRequest;
set->Oid = RNDIS_OID_GEN_CURRENT_PACKET_FILTER; set->Oid = RNDIS_OID_GEN_CURRENT_PACKET_FILTER;
set->InformationBufferLength = sizeof(UINT32); set->InformationBufferLength = sizeof(u32);
set->InformationBufferOffset = sizeof(RNDIS_SET_REQUEST); set->InformationBufferOffset = sizeof(RNDIS_SET_REQUEST);
memcpy((void*)(ULONG_PTR)set + sizeof(RNDIS_SET_REQUEST), &NewFilter, sizeof(UINT32)); memcpy((void*)(ULONG_PTR)set + sizeof(RNDIS_SET_REQUEST), &NewFilter, sizeof(u32));
ret = RndisFilterSendRequest(Device, request); ret = RndisFilterSendRequest(Device, request);
if (ret != 0) if (ret != 0)
...@@ -795,7 +795,7 @@ RndisFilterInitDevice( ...@@ -795,7 +795,7 @@ RndisFilterInitDevice(
RNDIS_REQUEST *request; RNDIS_REQUEST *request;
RNDIS_INITIALIZE_REQUEST *init; RNDIS_INITIALIZE_REQUEST *init;
RNDIS_INITIALIZE_COMPLETE *initComplete; RNDIS_INITIALIZE_COMPLETE *initComplete;
UINT32 status; u32 status;
int ret; int ret;
DPRINT_ENTER(NETVSC); DPRINT_ENTER(NETVSC);
...@@ -1091,7 +1091,7 @@ RndisFilterOnSend( ...@@ -1091,7 +1091,7 @@ RndisFilterOnSend(
RNDIS_FILTER_PACKET *filterPacket; RNDIS_FILTER_PACKET *filterPacket;
RNDIS_MESSAGE *rndisMessage; RNDIS_MESSAGE *rndisMessage;
RNDIS_PACKET *rndisPacket; RNDIS_PACKET *rndisPacket;
UINT32 rndisMessageSize; u32 rndisMessageSize;
DPRINT_ENTER(NETVSC); DPRINT_ENTER(NETVSC);
......
...@@ -908,7 +908,7 @@ StorVscOnChannelCallback( ...@@ -908,7 +908,7 @@ StorVscOnChannelCallback(
int ret=0; int ret=0;
DEVICE_OBJECT *device = (DEVICE_OBJECT*)Context; DEVICE_OBJECT *device = (DEVICE_OBJECT*)Context;
STORVSC_DEVICE *storDevice; STORVSC_DEVICE *storDevice;
UINT32 bytesRecvd; u32 bytesRecvd;
UINT64 requestId; UINT64 requestId;
UCHAR packet[ALIGN_UP(sizeof(VSTOR_PACKET),8)]; UCHAR packet[ALIGN_UP(sizeof(VSTOR_PACKET),8)];
STORVSC_REQUEST_EXTENSION *request; STORVSC_REQUEST_EXTENSION *request;
......
...@@ -307,7 +307,7 @@ VmbusOnDeviceAdd( ...@@ -307,7 +307,7 @@ VmbusOnDeviceAdd(
void *AdditionalInfo void *AdditionalInfo
) )
{ {
UINT32 *irqvector = (UINT32*) AdditionalInfo; u32 *irqvector = (u32*) AdditionalInfo;
int ret=0; int ret=0;
DPRINT_ENTER(VMBUS); DPRINT_ENTER(VMBUS);
......
...@@ -64,7 +64,7 @@ typedef struct _VMBUS_CONNECTION { ...@@ -64,7 +64,7 @@ typedef struct _VMBUS_CONNECTION {
VMBUS_CONNECT_STATE ConnectState; VMBUS_CONNECT_STATE ConnectState;
UINT32 NextGpadlHandle; u32 NextGpadlHandle;
// Represents channel interrupts. Each bit position // Represents channel interrupts. Each bit position
// represents a channel. // represents a channel.
...@@ -130,7 +130,7 @@ VmbusChildDeviceRemove( ...@@ -130,7 +130,7 @@ VmbusChildDeviceRemove(
static VMBUS_CHANNEL* static VMBUS_CHANNEL*
GetChannelFromRelId( GetChannelFromRelId(
UINT32 relId u32 relId
); );
// //
...@@ -154,7 +154,7 @@ VmbusPostMessage( ...@@ -154,7 +154,7 @@ VmbusPostMessage(
static int static int
VmbusSetEvent( VmbusSetEvent(
UINT32 childRelId u32 childRelId
); );
static void static void
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include "VmbusPacketFormat.h" #include "VmbusPacketFormat.h"
#define C_ASSERT(x) #define C_ASSERT(x)
typedef UINT32 NTSTATUS; typedef u32 NTSTATUS;
#pragma pack(push,1) #pragma pack(push,1)
...@@ -68,14 +68,14 @@ typedef enum _VMBUS_CHANNEL_MESSAGE_TYPE ...@@ -68,14 +68,14 @@ typedef enum _VMBUS_CHANNEL_MESSAGE_TYPE
typedef struct _VMBUS_CHANNEL_MESSAGE_HEADER typedef struct _VMBUS_CHANNEL_MESSAGE_HEADER
{ {
VMBUS_CHANNEL_MESSAGE_TYPE MessageType; VMBUS_CHANNEL_MESSAGE_TYPE MessageType;
UINT32 Padding; u32 Padding;
} VMBUS_CHANNEL_MESSAGE_HEADER, *PVMBUS_CHANNEL_MESSAGE_HEADER; } VMBUS_CHANNEL_MESSAGE_HEADER, *PVMBUS_CHANNEL_MESSAGE_HEADER;
// Query VMBus Version parameters // Query VMBus Version parameters
typedef struct _VMBUS_CHANNEL_QUERY_VMBUS_VERSION typedef struct _VMBUS_CHANNEL_QUERY_VMBUS_VERSION
{ {
VMBUS_CHANNEL_MESSAGE_HEADER Header; VMBUS_CHANNEL_MESSAGE_HEADER Header;
UINT32 Version; u32 Version;
} VMBUS_CHANNEL_QUERY_VMBUS_VERSION, *PVMBUS_CHANNEL_QUERY_VMBUS_VERSION; } VMBUS_CHANNEL_QUERY_VMBUS_VERSION, *PVMBUS_CHANNEL_QUERY_VMBUS_VERSION;
// VMBus Version Supported parameters // VMBus Version Supported parameters
...@@ -90,7 +90,7 @@ typedef struct _VMBUS_CHANNEL_OFFER_CHANNEL ...@@ -90,7 +90,7 @@ typedef struct _VMBUS_CHANNEL_OFFER_CHANNEL
{ {
VMBUS_CHANNEL_MESSAGE_HEADER Header; VMBUS_CHANNEL_MESSAGE_HEADER Header;
VMBUS_CHANNEL_OFFER Offer; VMBUS_CHANNEL_OFFER Offer;
UINT32 ChildRelId; u32 ChildRelId;
u8 MonitorId; u8 MonitorId;
BOOLEAN MonitorAllocated; BOOLEAN MonitorAllocated;
} VMBUS_CHANNEL_OFFER_CHANNEL, *PVMBUS_CHANNEL_OFFER_CHANNEL; } VMBUS_CHANNEL_OFFER_CHANNEL, *PVMBUS_CHANNEL_OFFER_CHANNEL;
...@@ -104,7 +104,7 @@ C_ASSERT(sizeof(VMBUS_CHANNEL_OFFER_CHANNEL) <= MAXIMUM_SYNIC_MESSAGE_BYTES); ...@@ -104,7 +104,7 @@ C_ASSERT(sizeof(VMBUS_CHANNEL_OFFER_CHANNEL) <= MAXIMUM_SYNIC_MESSAGE_BYTES);
typedef struct _VMBUS_CHANNEL_RESCIND_OFFER typedef struct _VMBUS_CHANNEL_RESCIND_OFFER
{ {
VMBUS_CHANNEL_MESSAGE_HEADER Header; VMBUS_CHANNEL_MESSAGE_HEADER Header;
UINT32 ChildRelId; u32 ChildRelId;
} VMBUS_CHANNEL_RESCIND_OFFER, *PVMBUS_CHANNEL_RESCIND_OFFER; } VMBUS_CHANNEL_RESCIND_OFFER, *PVMBUS_CHANNEL_RESCIND_OFFER;
// Request Offer -- no parameters, SynIC message contains the partition ID // Request Offer -- no parameters, SynIC message contains the partition ID
...@@ -121,12 +121,12 @@ typedef struct _VMBUS_CHANNEL_OPEN_CHANNEL ...@@ -121,12 +121,12 @@ typedef struct _VMBUS_CHANNEL_OPEN_CHANNEL
// //
// Identifies the specific VMBus channel that is being opened. // Identifies the specific VMBus channel that is being opened.
// //
UINT32 ChildRelId; u32 ChildRelId;
// //
// ID making a particular open request at a channel offer unique. // ID making a particular open request at a channel offer unique.
// //
UINT32 OpenId; u32 OpenId;
// //
// GPADL for the channel's ring buffer. // GPADL for the channel's ring buffer.
...@@ -143,7 +143,7 @@ typedef struct _VMBUS_CHANNEL_OPEN_CHANNEL ...@@ -143,7 +143,7 @@ typedef struct _VMBUS_CHANNEL_OPEN_CHANNEL
// by RingBufferGpadlHandle. The downstream ring buffer follows it at this // by RingBufferGpadlHandle. The downstream ring buffer follows it at this
// offset (in pages). // offset (in pages).
// //
UINT32 DownstreamRingBufferPageOffset; u32 DownstreamRingBufferPageOffset;
// //
// User-specific data to be passed along to the server endpoint. // User-specific data to be passed along to the server endpoint.
...@@ -159,8 +159,8 @@ typedef VMBUS_CHANNEL_OPEN_CHANNEL VMBUS_CHANNEL_REOPEN_CHANNEL, *PVMBUS_CHANNEL ...@@ -159,8 +159,8 @@ typedef VMBUS_CHANNEL_OPEN_CHANNEL VMBUS_CHANNEL_REOPEN_CHANNEL, *PVMBUS_CHANNEL
typedef struct _VMBUS_CHANNEL_OPEN_RESULT typedef struct _VMBUS_CHANNEL_OPEN_RESULT
{ {
VMBUS_CHANNEL_MESSAGE_HEADER Header; VMBUS_CHANNEL_MESSAGE_HEADER Header;
UINT32 ChildRelId; u32 ChildRelId;
UINT32 OpenId; u32 OpenId;
NTSTATUS Status; NTSTATUS Status;
} VMBUS_CHANNEL_OPEN_RESULT, *PVMBUS_CHANNEL_OPEN_RESULT; } VMBUS_CHANNEL_OPEN_RESULT, *PVMBUS_CHANNEL_OPEN_RESULT;
...@@ -168,7 +168,7 @@ typedef struct _VMBUS_CHANNEL_OPEN_RESULT ...@@ -168,7 +168,7 @@ typedef struct _VMBUS_CHANNEL_OPEN_RESULT
typedef struct _VMBUS_CHANNEL_CLOSE_CHANNEL typedef struct _VMBUS_CHANNEL_CLOSE_CHANNEL
{ {
VMBUS_CHANNEL_MESSAGE_HEADER Header; VMBUS_CHANNEL_MESSAGE_HEADER Header;
UINT32 ChildRelId; u32 ChildRelId;
} VMBUS_CHANNEL_CLOSE_CHANNEL, *PVMBUS_CHANNEL_CLOSE_CHANNEL; } VMBUS_CHANNEL_CLOSE_CHANNEL, *PVMBUS_CHANNEL_CLOSE_CHANNEL;
// Channel Message GPADL // Channel Message GPADL
...@@ -186,8 +186,8 @@ typedef struct _VMBUS_CHANNEL_CLOSE_CHANNEL ...@@ -186,8 +186,8 @@ typedef struct _VMBUS_CHANNEL_CLOSE_CHANNEL
typedef struct _VMBUS_CHANNEL_GPADL_HEADER typedef struct _VMBUS_CHANNEL_GPADL_HEADER
{ {
VMBUS_CHANNEL_MESSAGE_HEADER Header; VMBUS_CHANNEL_MESSAGE_HEADER Header;
UINT32 ChildRelId; u32 ChildRelId;
UINT32 Gpadl; u32 Gpadl;
u16 RangeBufLen; u16 RangeBufLen;
u16 RangeCount; u16 RangeCount;
GPA_RANGE Range[0]; GPA_RANGE Range[0];
...@@ -201,8 +201,8 @@ typedef struct _VMBUS_CHANNEL_GPADL_HEADER ...@@ -201,8 +201,8 @@ typedef struct _VMBUS_CHANNEL_GPADL_HEADER
typedef struct _VMBUS_CHANNEL_GPADL_BODY typedef struct _VMBUS_CHANNEL_GPADL_BODY
{ {
VMBUS_CHANNEL_MESSAGE_HEADER Header; VMBUS_CHANNEL_MESSAGE_HEADER Header;
UINT32 MessageNumber; u32 MessageNumber;
UINT32 Gpadl; u32 Gpadl;
UINT64 Pfn[0]; UINT64 Pfn[0];
} VMBUS_CHANNEL_GPADL_BODY, *PVMBUS_CHANNEL_GPADL_BODY; } VMBUS_CHANNEL_GPADL_BODY, *PVMBUS_CHANNEL_GPADL_BODY;
...@@ -210,22 +210,22 @@ typedef struct _VMBUS_CHANNEL_GPADL_BODY ...@@ -210,22 +210,22 @@ typedef struct _VMBUS_CHANNEL_GPADL_BODY
typedef struct _VMBUS_CHANNEL_GPADL_CREATED typedef struct _VMBUS_CHANNEL_GPADL_CREATED
{ {
VMBUS_CHANNEL_MESSAGE_HEADER Header; VMBUS_CHANNEL_MESSAGE_HEADER Header;
UINT32 ChildRelId; u32 ChildRelId;
UINT32 Gpadl; u32 Gpadl;
UINT32 CreationStatus; u32 CreationStatus;
} VMBUS_CHANNEL_GPADL_CREATED, *PVMBUS_CHANNEL_GPADL_CREATED; } VMBUS_CHANNEL_GPADL_CREATED, *PVMBUS_CHANNEL_GPADL_CREATED;
typedef struct _VMBUS_CHANNEL_GPADL_TEARDOWN typedef struct _VMBUS_CHANNEL_GPADL_TEARDOWN
{ {
VMBUS_CHANNEL_MESSAGE_HEADER Header; VMBUS_CHANNEL_MESSAGE_HEADER Header;
UINT32 ChildRelId; u32 ChildRelId;
UINT32 Gpadl; u32 Gpadl;
} VMBUS_CHANNEL_GPADL_TEARDOWN, *PVMBUS_CHANNEL_GPADL_TEARDOWN; } VMBUS_CHANNEL_GPADL_TEARDOWN, *PVMBUS_CHANNEL_GPADL_TEARDOWN;
typedef struct _VMBUS_CHANNEL_GPADL_TORNDOWN typedef struct _VMBUS_CHANNEL_GPADL_TORNDOWN
{ {
VMBUS_CHANNEL_MESSAGE_HEADER Header; VMBUS_CHANNEL_MESSAGE_HEADER Header;
UINT32 Gpadl; u32 Gpadl;
} VMBUS_CHANNEL_GPADL_TORNDOWN, *PVMBUS_CHANNEL_GPADL_TORNDOWN; } VMBUS_CHANNEL_GPADL_TORNDOWN, *PVMBUS_CHANNEL_GPADL_TORNDOWN;
#ifdef VMBUS_FEATURE_PARENT_OR_PEER_MEMORY_MAPPED_INTO_A_CHILD #ifdef VMBUS_FEATURE_PARENT_OR_PEER_MEMORY_MAPPED_INTO_A_CHILD
...@@ -234,28 +234,28 @@ typedef struct _VMBUS_CHANNEL_VIEW_RANGE_ADD ...@@ -234,28 +234,28 @@ typedef struct _VMBUS_CHANNEL_VIEW_RANGE_ADD
VMBUS_CHANNEL_MESSAGE_HEADER Header; VMBUS_CHANNEL_MESSAGE_HEADER Header;
PHYSICAL_ADDRESS ViewRangeBase; PHYSICAL_ADDRESS ViewRangeBase;
UINT64 ViewRangeLength; UINT64 ViewRangeLength;
UINT32 ChildRelId; u32 ChildRelId;
} VMBUS_CHANNEL_VIEW_RANGE_ADD, *PVMBUS_CHANNEL_VIEW_RANGE_ADD; } VMBUS_CHANNEL_VIEW_RANGE_ADD, *PVMBUS_CHANNEL_VIEW_RANGE_ADD;
typedef struct _VMBUS_CHANNEL_VIEW_RANGE_REMOVE typedef struct _VMBUS_CHANNEL_VIEW_RANGE_REMOVE
{ {
VMBUS_CHANNEL_MESSAGE_HEADER Header; VMBUS_CHANNEL_MESSAGE_HEADER Header;
PHYSICAL_ADDRESS ViewRangeBase; PHYSICAL_ADDRESS ViewRangeBase;
UINT32 ChildRelId; u32 ChildRelId;
} VMBUS_CHANNEL_VIEW_RANGE_REMOVE, *PVMBUS_CHANNEL_VIEW_RANGE_REMOVE; } VMBUS_CHANNEL_VIEW_RANGE_REMOVE, *PVMBUS_CHANNEL_VIEW_RANGE_REMOVE;
#endif #endif
typedef struct _VMBUS_CHANNEL_RELID_RELEASED typedef struct _VMBUS_CHANNEL_RELID_RELEASED
{ {
VMBUS_CHANNEL_MESSAGE_HEADER Header; VMBUS_CHANNEL_MESSAGE_HEADER Header;
UINT32 ChildRelId; u32 ChildRelId;
} VMBUS_CHANNEL_RELID_RELEASED, *PVMBUS_CHANNEL_RELID_RELEASED; } VMBUS_CHANNEL_RELID_RELEASED, *PVMBUS_CHANNEL_RELID_RELEASED;
typedef struct _VMBUS_CHANNEL_INITIATE_CONTACT typedef struct _VMBUS_CHANNEL_INITIATE_CONTACT
{ {
VMBUS_CHANNEL_MESSAGE_HEADER Header; VMBUS_CHANNEL_MESSAGE_HEADER Header;
UINT32 VMBusVersionRequested; u32 VMBusVersionRequested;
UINT32 Padding2; u32 Padding2;
UINT64 InterruptPage; UINT64 InterruptPage;
UINT64 MonitorPage1; UINT64 MonitorPage1;
UINT64 MonitorPage2; UINT64 MonitorPage2;
......
...@@ -41,9 +41,9 @@ typedef enum _HV_CALL_CODE ...@@ -41,9 +41,9 @@ typedef enum _HV_CALL_CODE
typedef struct _HV_INPUT_POST_MESSAGE typedef struct _HV_INPUT_POST_MESSAGE
{ {
HV_CONNECTION_ID ConnectionId; HV_CONNECTION_ID ConnectionId;
UINT32 Reserved; u32 Reserved;
HV_MESSAGE_TYPE MessageType; HV_MESSAGE_TYPE MessageType;
UINT32 PayloadSize; u32 PayloadSize;
UINT64 Payload[HV_MESSAGE_PAYLOAD_QWORD_COUNT]; UINT64 Payload[HV_MESSAGE_PAYLOAD_QWORD_COUNT];
} HV_INPUT_POST_MESSAGE, *PHV_INPUT_POST_MESSAGE; } HV_INPUT_POST_MESSAGE, *PHV_INPUT_POST_MESSAGE;
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
#define HV_EVENT_FLAGS_COUNT (256 * 8) #define HV_EVENT_FLAGS_COUNT (256 * 8)
#define HV_EVENT_FLAGS_BYTE_COUNT (256) #define HV_EVENT_FLAGS_BYTE_COUNT (256)
#define HV_EVENT_FLAGS_DWORD_COUNT (256 / sizeof(UINT32)) #define HV_EVENT_FLAGS_DWORD_COUNT (256 / sizeof(u32))
// //
// Define hypervisor message types. // Define hypervisor message types.
...@@ -139,7 +139,7 @@ typedef enum _HV_MESSAGE_TYPE ...@@ -139,7 +139,7 @@ typedef enum _HV_MESSAGE_TYPE
// Define the synthetic interrupt source index type. // Define the synthetic interrupt source index type.
// //
typedef UINT32 HV_SYNIC_SINT_INDEX, *PHV_SYNIC_SINT_INDEX; typedef u32 HV_SYNIC_SINT_INDEX, *PHV_SYNIC_SINT_INDEX;
// //
// Define partition identifier type. // Define partition identifier type.
...@@ -158,12 +158,12 @@ typedef UINT64 HV_PARTITION_ID, *PHV_PARTITION_ID; ...@@ -158,12 +158,12 @@ typedef UINT64 HV_PARTITION_ID, *PHV_PARTITION_ID;
typedef union _HV_CONNECTION_ID typedef union _HV_CONNECTION_ID
{ {
UINT32 AsUINT32; u32 Asu32;
struct struct
{ {
UINT32 Id:24; u32 Id:24;
UINT32 Reserved:8; u32 Reserved:8;
} u; } u;
} HV_CONNECTION_ID, *PHV_CONNECTION_ID; } HV_CONNECTION_ID, *PHV_CONNECTION_ID;
...@@ -174,12 +174,12 @@ typedef union _HV_CONNECTION_ID ...@@ -174,12 +174,12 @@ typedef union _HV_CONNECTION_ID
typedef union _HV_PORT_ID typedef union _HV_PORT_ID
{ {
UINT32 AsUINT32; u32 Asu32;
struct struct
{ {
UINT32 Id:24; u32 Id:24;
UINT32 Reserved:8; u32 Reserved:8;
} u ; } u ;
} HV_PORT_ID, *PHV_PORT_ID; } HV_PORT_ID, *PHV_PORT_ID;
...@@ -202,7 +202,7 @@ typedef enum _HV_PORT_TYPE ...@@ -202,7 +202,7 @@ typedef enum _HV_PORT_TYPE
typedef struct _HV_PORT_INFO typedef struct _HV_PORT_INFO
{ {
HV_PORT_TYPE PortType; HV_PORT_TYPE PortType;
UINT32 Padding; u32 Padding;
union union
{ {
...@@ -219,7 +219,7 @@ typedef struct _HV_PORT_INFO ...@@ -219,7 +219,7 @@ typedef struct _HV_PORT_INFO
HV_VP_INDEX TargetVp; HV_VP_INDEX TargetVp;
u16 BaseFlagNumber; u16 BaseFlagNumber;
u16 FlagCount; u16 FlagCount;
UINT32 RsvdZ; u32 RsvdZ;
} EventPortInfo; } EventPortInfo;
struct struct
...@@ -235,7 +235,7 @@ typedef const HV_PORT_INFO *PCHV_PORT_INFO; ...@@ -235,7 +235,7 @@ typedef const HV_PORT_INFO *PCHV_PORT_INFO;
typedef struct _HV_CONNECTION_INFO typedef struct _HV_CONNECTION_INFO
{ {
HV_PORT_TYPE PortType; HV_PORT_TYPE PortType;
UINT32 Padding; u32 Padding;
union union
{ {
...@@ -296,8 +296,8 @@ typedef struct _HV_MESSAGE_HEADER ...@@ -296,8 +296,8 @@ typedef struct _HV_MESSAGE_HEADER
// //
typedef struct _HV_TIMER_MESSAGE_PAYLOAD typedef struct _HV_TIMER_MESSAGE_PAYLOAD
{ {
UINT32 TimerIndex; u32 TimerIndex;
UINT32 Reserved; u32 Reserved;
HV_NANO100_TIME ExpirationTime; // When the timer expired HV_NANO100_TIME ExpirationTime; // When the timer expired
HV_NANO100_TIME DeliveryTime; // When the message was delivered HV_NANO100_TIME DeliveryTime; // When the message was delivered
} HV_TIMER_MESSAGE_PAYLOAD, *PHV_TIMER_MESSAGE_PAYLOAD; } HV_TIMER_MESSAGE_PAYLOAD, *PHV_TIMER_MESSAGE_PAYLOAD;
...@@ -338,7 +338,7 @@ typedef struct _HV_MESSAGE_PAGE ...@@ -338,7 +338,7 @@ typedef struct _HV_MESSAGE_PAGE
typedef union _HV_SYNIC_EVENT_FLAGS typedef union _HV_SYNIC_EVENT_FLAGS
{ {
u8 Flags8[HV_EVENT_FLAGS_BYTE_COUNT]; u8 Flags8[HV_EVENT_FLAGS_BYTE_COUNT];
UINT32 Flags32[HV_EVENT_FLAGS_DWORD_COUNT]; u32 Flags32[HV_EVENT_FLAGS_DWORD_COUNT];
} HV_SYNIC_EVENT_FLAGS, *PHV_SYNIC_EVENT_FLAGS; } HV_SYNIC_EVENT_FLAGS, *PHV_SYNIC_EVENT_FLAGS;
...@@ -422,8 +422,8 @@ typedef union _HV_MONITOR_TRIGGER_GROUP ...@@ -422,8 +422,8 @@ typedef union _HV_MONITOR_TRIGGER_GROUP
struct struct
{ {
UINT32 Pending; u32 Pending;
UINT32 Armed; u32 Armed;
}; };
} HV_MONITOR_TRIGGER_GROUP, *PHV_MONITOR_TRIGGER_GROUP; } HV_MONITOR_TRIGGER_GROUP, *PHV_MONITOR_TRIGGER_GROUP;
...@@ -437,12 +437,12 @@ typedef struct _HV_MONITOR_PARAMETER ...@@ -437,12 +437,12 @@ typedef struct _HV_MONITOR_PARAMETER
typedef union _HV_MONITOR_TRIGGER_STATE typedef union _HV_MONITOR_TRIGGER_STATE
{ {
UINT32 AsUINT32; u32 Asu32;
struct struct
{ {
UINT32 GroupEnable : 4; u32 GroupEnable : 4;
UINT32 RsvdZ : 28; u32 RsvdZ : 28;
}; };
} HV_MONITOR_TRIGGER_STATE, *PHV_MONITOR_TRIGGER_STATE; } HV_MONITOR_TRIGGER_STATE, *PHV_MONITOR_TRIGGER_STATE;
...@@ -471,12 +471,12 @@ typedef union _HV_MONITOR_TRIGGER_STATE ...@@ -471,12 +471,12 @@ typedef union _HV_MONITOR_TRIGGER_STATE
typedef struct _HV_MONITOR_PAGE typedef struct _HV_MONITOR_PAGE
{ {
HV_MONITOR_TRIGGER_STATE TriggerState; HV_MONITOR_TRIGGER_STATE TriggerState;
UINT32 RsvdZ1; u32 RsvdZ1;
HV_MONITOR_TRIGGER_GROUP TriggerGroup[4]; HV_MONITOR_TRIGGER_GROUP TriggerGroup[4];
UINT64 RsvdZ2[3]; UINT64 RsvdZ2[3];
INT32 NextCheckTime[4][32]; s32 NextCheckTime[4][32];
u16 Latency[4][32]; u16 Latency[4][32];
UINT64 RsvdZ3[32]; UINT64 RsvdZ3[32];
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
// //
// Virtual Processor Indices // Virtual Processor Indices
// //
typedef UINT32 HV_VP_INDEX, *PHV_VP_INDEX; typedef u32 HV_VP_INDEX, *PHV_VP_INDEX;
// //
// The below CPUID leaves are present if VersionAndFeatures.HypervisorPresent // The below CPUID leaves are present if VersionAndFeatures.HypervisorPresent
......
...@@ -52,14 +52,14 @@ typedef int (*PFN_ON_SEND)(DEVICE_OBJECT *dev, PNETVSC_PACKET packet); ...@@ -52,14 +52,14 @@ typedef int (*PFN_ON_SEND)(DEVICE_OBJECT *dev, PNETVSC_PACKET packet);
typedef void (*PFN_ON_SENDRECVCOMPLETION)(void * Context); typedef void (*PFN_ON_SENDRECVCOMPLETION)(void * Context);
typedef int (*PFN_ON_RECVCALLBACK)(DEVICE_OBJECT *dev, PNETVSC_PACKET packet); typedef int (*PFN_ON_RECVCALLBACK)(DEVICE_OBJECT *dev, PNETVSC_PACKET packet);
typedef void (*PFN_ON_LINKSTATUS_CHANGED)(DEVICE_OBJECT *dev, UINT32 Status); typedef void (*PFN_ON_LINKSTATUS_CHANGED)(DEVICE_OBJECT *dev, u32 Status);
// Represent the xfer page packet which contains 1 or more netvsc packet // Represent the xfer page packet which contains 1 or more netvsc packet
typedef struct _XFERPAGE_PACKET { typedef struct _XFERPAGE_PACKET {
DLIST_ENTRY ListEntry; DLIST_ENTRY ListEntry;
// # of netvsc packets this xfer packet contains // # of netvsc packets this xfer packet contains
UINT32 Count; u32 Count;
} XFERPAGE_PACKET; } XFERPAGE_PACKET;
...@@ -93,9 +93,9 @@ typedef struct _NETVSC_PACKET { ...@@ -93,9 +93,9 @@ typedef struct _NETVSC_PACKET {
// This points to the memory after PageBuffers // This points to the memory after PageBuffers
void * Extension; void * Extension;
UINT32 TotalDataBufferLength; u32 TotalDataBufferLength;
// Points to the send/receive buffer where the ethernet frame is // Points to the send/receive buffer where the ethernet frame is
UINT32 PageBufferCount; u32 PageBufferCount;
PAGE_BUFFER PageBuffers[NETVSC_PACKET_MAXPAGE]; PAGE_BUFFER PageBuffers[NETVSC_PACKET_MAXPAGE];
} NETVSC_PACKET; } NETVSC_PACKET;
...@@ -105,11 +105,11 @@ typedef struct _NETVSC_PACKET { ...@@ -105,11 +105,11 @@ typedef struct _NETVSC_PACKET {
typedef struct _NETVSC_DRIVER_OBJECT { typedef struct _NETVSC_DRIVER_OBJECT {
DRIVER_OBJECT Base; // Must be the first field DRIVER_OBJECT Base; // Must be the first field
UINT32 RingBufferSize; u32 RingBufferSize;
UINT32 RequestExtSize; u32 RequestExtSize;
// Additional num of page buffers to allocate // Additional num of page buffers to allocate
UINT32 AdditionalRequestPageBufferCount; u32 AdditionalRequestPageBufferCount;
// This is set by the caller to allow us to callback when we receive a packet // This is set by the caller to allow us to callback when we receive a packet
// from the "wire" // from the "wire"
......
...@@ -71,17 +71,17 @@ typedef enum _STORVSC_REQUEST_TYPE{ ...@@ -71,17 +71,17 @@ typedef enum _STORVSC_REQUEST_TYPE{
typedef struct _STORVSC_REQUEST { typedef struct _STORVSC_REQUEST {
STORVSC_REQUEST_TYPE Type; STORVSC_REQUEST_TYPE Type;
UINT32 Host; u32 Host;
UINT32 Bus; u32 Bus;
UINT32 TargetId; u32 TargetId;
UINT32 LunId; u32 LunId;
u8 * Cdb; u8 * Cdb;
UINT32 CdbLen; u32 CdbLen;
UINT32 Status; u32 Status;
UINT32 BytesXfer; u32 BytesXfer;
UCHAR* SenseBuffer; UCHAR* SenseBuffer;
UINT32 SenseBufferSize; u32 SenseBufferSize;
void * Context; void * Context;
...@@ -99,13 +99,13 @@ typedef struct _STORVSC_DRIVER_OBJECT { ...@@ -99,13 +99,13 @@ typedef struct _STORVSC_DRIVER_OBJECT {
DRIVER_OBJECT Base; // Must be the first field DRIVER_OBJECT Base; // Must be the first field
// Set by caller (in bytes) // Set by caller (in bytes)
UINT32 RingBufferSize; u32 RingBufferSize;
// Allocate this much private extension for each I/O request // Allocate this much private extension for each I/O request
UINT32 RequestExtSize; u32 RequestExtSize;
// Maximum # of requests in flight per channel/device // Maximum # of requests in flight per channel/device
UINT32 MaxOutstandingRequestsPerChannel; u32 MaxOutstandingRequestsPerChannel;
// Set by the caller to allow us to re-enumerate the bus on the host // Set by the caller to allow us to re-enumerate the bus on the host
PFN_ON_HOST_RESCAN OnHostRescan; PFN_ON_HOST_RESCAN OnHostRescan;
......
...@@ -49,16 +49,16 @@ typedef struct _DEVICE_OBJECT *PDEVICE_OBJECT; ...@@ -49,16 +49,16 @@ typedef struct _DEVICE_OBJECT *PDEVICE_OBJECT;
// Single-page buffer // Single-page buffer
typedef struct _PAGE_BUFFER { typedef struct _PAGE_BUFFER {
UINT32 Length; u32 Length;
UINT32 Offset; u32 Offset;
UINT64 Pfn; UINT64 Pfn;
} PAGE_BUFFER; } PAGE_BUFFER;
// Multiple-page buffer // Multiple-page buffer
typedef struct _MULTIPAGE_BUFFER { typedef struct _MULTIPAGE_BUFFER {
// Length and Offset determines the # of pfns in the array // Length and Offset determines the # of pfns in the array
UINT32 Length; u32 Length;
UINT32 Offset; u32 Offset;
UINT64 PfnArray[MAX_MULTIPAGE_BUFFER_COUNT]; UINT64 PfnArray[MAX_MULTIPAGE_BUFFER_COUNT];
}MULTIPAGE_BUFFER; }MULTIPAGE_BUFFER;
...@@ -92,10 +92,10 @@ typedef void (*VMBUS_CHANNEL_CALLBACK)(void * context); ...@@ -92,10 +92,10 @@ typedef void (*VMBUS_CHANNEL_CALLBACK)(void * context);
typedef int (*VMBUS_CHANNEL_OPEN)( typedef int (*VMBUS_CHANNEL_OPEN)(
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
UINT32 SendBufferSize, u32 SendBufferSize,
UINT32 RecvRingBufferSize, u32 RecvRingBufferSize,
void * UserData, void * UserData,
UINT32 UserDataLen, u32 UserDataLen,
VMBUS_CHANNEL_CALLBACK ChannelCallback, VMBUS_CHANNEL_CALLBACK ChannelCallback,
void * Context void * Context
); );
...@@ -107,18 +107,18 @@ typedef void (*VMBUS_CHANNEL_CLOSE)( ...@@ -107,18 +107,18 @@ typedef void (*VMBUS_CHANNEL_CLOSE)(
typedef int (*VMBUS_CHANNEL_SEND_PACKET)( typedef int (*VMBUS_CHANNEL_SEND_PACKET)(
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
const void * Buffer, const void * Buffer,
UINT32 BufferLen, u32 BufferLen,
UINT64 RequestId, UINT64 RequestId,
UINT32 Type, u32 Type,
UINT32 Flags u32 Flags
); );
typedef int (*VMBUS_CHANNEL_SEND_PACKET_PAGEBUFFER)( typedef int (*VMBUS_CHANNEL_SEND_PACKET_PAGEBUFFER)(
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
PAGE_BUFFER PageBuffers[], PAGE_BUFFER PageBuffers[],
UINT32 PageCount, u32 PageCount,
void * Buffer, void * Buffer,
UINT32 BufferLen, u32 BufferLen,
UINT64 RequestId UINT64 RequestId
); );
...@@ -126,61 +126,61 @@ typedef int (*VMBUS_CHANNEL_SEND_PACKET_MULTIPAGEBUFFER)( ...@@ -126,61 +126,61 @@ typedef int (*VMBUS_CHANNEL_SEND_PACKET_MULTIPAGEBUFFER)(
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
MULTIPAGE_BUFFER *MultiPageBuffer, MULTIPAGE_BUFFER *MultiPageBuffer,
void * Buffer, void * Buffer,
UINT32 BufferLen, u32 BufferLen,
UINT64 RequestId UINT64 RequestId
); );
typedef int (*VMBUS_CHANNEL_RECV_PACKET)( typedef int (*VMBUS_CHANNEL_RECV_PACKET)(
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
void * Buffer, void * Buffer,
UINT32 BufferLen, u32 BufferLen,
UINT32* BufferActualLen, u32* BufferActualLen,
UINT64* RequestId UINT64* RequestId
); );
typedef int (*VMBUS_CHANNEL_RECV_PACKET_PAW)( typedef int (*VMBUS_CHANNEL_RECV_PACKET_PAW)(
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
void * Buffer, void * Buffer,
UINT32 BufferLen, u32 BufferLen,
UINT32* BufferActualLen, u32* BufferActualLen,
UINT64* RequestId UINT64* RequestId
); );
typedef int (*VMBUS_CHANNEL_ESTABLISH_GPADL)( typedef int (*VMBUS_CHANNEL_ESTABLISH_GPADL)(
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
void * Buffer, // from kmalloc() void * Buffer, // from kmalloc()
UINT32 BufferLen, // page-size multiple u32 BufferLen, // page-size multiple
UINT32* GpadlHandle u32* GpadlHandle
); );
typedef int (*VMBUS_CHANNEL_TEARDOWN_GPADL)( typedef int (*VMBUS_CHANNEL_TEARDOWN_GPADL)(
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
UINT32 GpadlHandle u32 GpadlHandle
); );
typedef struct _PORT_INFO { typedef struct _PORT_INFO {
UINT32 InterruptMask; u32 InterruptMask;
UINT32 ReadIndex; u32 ReadIndex;
UINT32 WriteIndex; u32 WriteIndex;
UINT32 BytesAvailToRead; u32 BytesAvailToRead;
UINT32 BytesAvailToWrite; u32 BytesAvailToWrite;
} PORT_INFO; } PORT_INFO;
typedef struct _DEVICE_INFO { typedef struct _DEVICE_INFO {
UINT32 ChannelId; u32 ChannelId;
UINT32 ChannelState; u32 ChannelState;
GUID ChannelType; GUID ChannelType;
GUID ChannelInstance; GUID ChannelInstance;
UINT32 MonitorId; u32 MonitorId;
UINT32 ServerMonitorPending; u32 ServerMonitorPending;
UINT32 ServerMonitorLatency; u32 ServerMonitorLatency;
UINT32 ServerMonitorConnectionId; u32 ServerMonitorConnectionId;
UINT32 ClientMonitorPending; u32 ClientMonitorPending;
UINT32 ClientMonitorLatency; u32 ClientMonitorLatency;
UINT32 ClientMonitorConnectionId; u32 ClientMonitorConnectionId;
PORT_INFO Inbound; PORT_INFO Inbound;
PORT_INFO Outbound; PORT_INFO Outbound;
......
...@@ -67,8 +67,8 @@ typedef struct ...@@ -67,8 +67,8 @@ typedef struct
GUID InterfaceType; GUID InterfaceType;
GUID InterfaceInstance; GUID InterfaceInstance;
UINT64 InterruptLatencyIn100nsUnits; UINT64 InterruptLatencyIn100nsUnits;
UINT32 InterfaceRevision; u32 InterfaceRevision;
UINT32 ServerContextAreaSize; // in bytes u32 ServerContextAreaSize; // in bytes
u16 ChannelFlags; u16 ChannelFlags;
u16 MmioMegabytes; // in bytes * 1024 * 1024 u16 MmioMegabytes; // in bytes * 1024 * 1024
...@@ -89,11 +89,11 @@ typedef struct ...@@ -89,11 +89,11 @@ typedef struct
// //
struct struct
{ {
UINT32 PipeMode; u32 PipeMode;
UCHAR UserDefined[MAX_PIPE_USER_DEFINED_BYTES]; UCHAR UserDefined[MAX_PIPE_USER_DEFINED_BYTES];
} Pipe; } Pipe;
} u; } u;
UINT32 Padding; u32 Padding;
} VMBUS_CHANNEL_OFFER, *PVMBUS_CHANNEL_OFFER; } VMBUS_CHANNEL_OFFER, *PVMBUS_CHANNEL_OFFER;
#pragma pack(pop) #pragma pack(pop)
...@@ -107,7 +107,7 @@ typedef struct ...@@ -107,7 +107,7 @@ typedef struct
// FIELD_OFFSET(VMBUS_CHANNEL_OFFER, u.Standard.UserDefined))); // FIELD_OFFSET(VMBUS_CHANNEL_OFFER, u.Standard.UserDefined)));
// //
typedef UINT32 GPADL_HANDLE; typedef u32 GPADL_HANDLE;
// //
// Server Flags // Server Flags
......
...@@ -41,8 +41,8 @@ typedef struct ...@@ -41,8 +41,8 @@ typedef struct
{ {
struct struct
{ {
volatile UINT32 In; // Offset in bytes from the ring base volatile u32 In; // Offset in bytes from the ring base
volatile UINT32 Out; // Offset in bytes from the ring base volatile u32 Out; // Offset in bytes from the ring base
}; };
volatile LONGLONG InOut; volatile LONGLONG InOut;
}; };
...@@ -52,7 +52,7 @@ typedef struct ...@@ -52,7 +52,7 @@ typedef struct
// endpoint should not send any interrupts. // endpoint should not send any interrupts.
// //
volatile UINT32 InterruptMask; volatile u32 InterruptMask;
} VMRCB, *PVMRCB; } VMRCB, *PVMRCB;
...@@ -86,7 +86,7 @@ typedef struct ...@@ -86,7 +86,7 @@ typedef struct
UINT64 TransactionId; UINT64 TransactionId;
} VMPACKET_DESCRIPTOR, *PVMPACKET_DESCRIPTOR; } VMPACKET_DESCRIPTOR, *PVMPACKET_DESCRIPTOR;
typedef UINT32 PREVIOUS_PACKET_OFFSET, *PPREVIOUS_PACKET_OFFSET; typedef u32 PREVIOUS_PACKET_OFFSET, *PPREVIOUS_PACKET_OFFSET;
typedef struct typedef struct
{ {
...@@ -96,8 +96,8 @@ typedef struct ...@@ -96,8 +96,8 @@ typedef struct
typedef struct typedef struct
{ {
UINT32 ByteCount; u32 ByteCount;
UINT32 ByteOffset; u32 ByteOffset;
} VMTRANSFER_PAGE_RANGE, *PVMTRANSFER_PAGE_RANGE; } VMTRANSFER_PAGE_RANGE, *PVMTRANSFER_PAGE_RANGE;
#ifdef __cplusplus #ifdef __cplusplus
...@@ -115,7 +115,7 @@ typedef struct VMTRANSFER_PAGE_PACKET_HEADER { ...@@ -115,7 +115,7 @@ typedef struct VMTRANSFER_PAGE_PACKET_HEADER {
u16 TransferPageSetId; u16 TransferPageSetId;
BOOLEAN SenderOwnsSet; BOOLEAN SenderOwnsSet;
u8 Reserved; u8 Reserved;
UINT32 RangeCount; u32 RangeCount;
VMTRANSFER_PAGE_RANGE Ranges[1]; VMTRANSFER_PAGE_RANGE Ranges[1];
} VMTRANSFER_PAGE_PACKET_HEADER, *PVMTRANSFER_PAGE_PACKET_HEADER; } VMTRANSFER_PAGE_PACKET_HEADER, *PVMTRANSFER_PAGE_PACKET_HEADER;
...@@ -134,8 +134,8 @@ typedef struct _VMGPADL_PACKET_HEADER { ...@@ -134,8 +134,8 @@ typedef struct _VMGPADL_PACKET_HEADER {
#endif #endif
UINT32 Gpadl; u32 Gpadl;
UINT32 Reserved; u32 Reserved;
} VMGPADL_PACKET_HEADER, *PVMGPADL_PACKET_HEADER; } VMGPADL_PACKET_HEADER, *PVMGPADL_PACKET_HEADER;
...@@ -151,7 +151,7 @@ typedef struct _VMADD_REMOVE_TRANSFER_PAGE_SET { ...@@ -151,7 +151,7 @@ typedef struct _VMADD_REMOVE_TRANSFER_PAGE_SET {
#endif #endif
UINT32 Gpadl; u32 Gpadl;
u16 TransferPageSetId; u16 TransferPageSetId;
u16 Reserved; u16 Reserved;
...@@ -166,8 +166,8 @@ typedef struct _VMADD_REMOVE_TRANSFER_PAGE_SET { ...@@ -166,8 +166,8 @@ typedef struct _VMADD_REMOVE_TRANSFER_PAGE_SET {
typedef struct _GPA_RANGE { typedef struct _GPA_RANGE {
UINT32 ByteCount; u32 ByteCount;
UINT32 ByteOffset; u32 ByteOffset;
UINT64 PfnArray[0]; UINT64 PfnArray[0];
} GPA_RANGE, *PGPA_RANGE; } GPA_RANGE, *PGPA_RANGE;
...@@ -196,8 +196,8 @@ typedef struct _VMESTABLISH_GPADL { ...@@ -196,8 +196,8 @@ typedef struct _VMESTABLISH_GPADL {
#endif #endif
UINT32 Gpadl; u32 Gpadl;
UINT32 RangeCount; u32 RangeCount;
GPA_RANGE Range[1]; GPA_RANGE Range[1];
} VMESTABLISH_GPADL, *PVMESTABLISH_GPADL; } VMESTABLISH_GPADL, *PVMESTABLISH_GPADL;
...@@ -220,8 +220,8 @@ typedef struct _VMTEARDOWN_GPADL { ...@@ -220,8 +220,8 @@ typedef struct _VMTEARDOWN_GPADL {
#endif #endif
UINT32 Gpadl; u32 Gpadl;
UINT32 Reserved; // for alignment to a 8-byte boundary u32 Reserved; // for alignment to a 8-byte boundary
} VMTEARDOWN_GPADL, *PVMTEARDOWN_GPADL; } VMTEARDOWN_GPADL, *PVMTEARDOWN_GPADL;
...@@ -242,8 +242,8 @@ typedef struct _VMDATA_GPA_DIRECT { ...@@ -242,8 +242,8 @@ typedef struct _VMDATA_GPA_DIRECT {
#endif #endif
UINT32 Reserved; u32 Reserved;
UINT32 RangeCount; u32 RangeCount;
GPA_RANGE Range[1]; GPA_RANGE Range[1];
} VMDATA_GPA_DIRECT, *PVMDATA_GPA_DIRECT; } VMDATA_GPA_DIRECT, *PVMDATA_GPA_DIRECT;
...@@ -267,8 +267,8 @@ typedef struct _VMADDITIONAL_DATA { ...@@ -267,8 +267,8 @@ typedef struct _VMADDITIONAL_DATA {
#endif #endif
UINT64 TotalBytes; UINT64 TotalBytes;
UINT32 ByteOffset; u32 ByteOffset;
UINT32 ByteCount; u32 ByteCount;
UCHAR Data[1]; UCHAR Data[1];
} VMADDITIONAL_DATA, *PVMADDITIONAL_DATA; } VMADDITIONAL_DATA, *PVMADDITIONAL_DATA;
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "VmbusChannelInterface.h" #include "VmbusChannelInterface.h"
#define NVSP_INVALID_PROTOCOL_VERSION ((UINT32)0xFFFFFFFF) #define NVSP_INVALID_PROTOCOL_VERSION ((u32)0xFFFFFFFF)
#define NVSP_PROTOCOL_VERSION_1 2 #define NVSP_PROTOCOL_VERSION_1 2
#define NVSP_MIN_PROTOCOL_VERSION NVSP_PROTOCOL_VERSION_1 #define NVSP_MIN_PROTOCOL_VERSION NVSP_PROTOCOL_VERSION_1
...@@ -84,7 +84,7 @@ typedef enum _NVSP_STATUS ...@@ -84,7 +84,7 @@ typedef enum _NVSP_STATUS
typedef struct _NVSP_MESSAGE_HEADER typedef struct _NVSP_MESSAGE_HEADER
{ {
UINT32 MessageType; u32 MessageType;
} NVSP_MESSAGE_HEADER, *PNVSP_MESSAGE_HEADER; } NVSP_MESSAGE_HEADER, *PNVSP_MESSAGE_HEADER;
// //
...@@ -99,8 +99,8 @@ typedef struct _NVSP_MESSAGE_HEADER ...@@ -99,8 +99,8 @@ typedef struct _NVSP_MESSAGE_HEADER
// //
typedef struct _NVSP_MESSAGE_INIT typedef struct _NVSP_MESSAGE_INIT
{ {
UINT32 MinProtocolVersion; u32 MinProtocolVersion;
UINT32 MaxProtocolVersion; u32 MaxProtocolVersion;
} NVSP_MESSAGE_INIT, *PNVSP_MESSAGE_INIT; } NVSP_MESSAGE_INIT, *PNVSP_MESSAGE_INIT;
// //
...@@ -110,9 +110,9 @@ typedef struct _NVSP_MESSAGE_INIT ...@@ -110,9 +110,9 @@ typedef struct _NVSP_MESSAGE_INIT
// //
typedef struct _NVSP_MESSAGE_INIT_COMPLETE typedef struct _NVSP_MESSAGE_INIT_COMPLETE
{ {
UINT32 NegotiatedProtocolVersion; u32 NegotiatedProtocolVersion;
UINT32 MaximumMdlChainLength; u32 MaximumMdlChainLength;
UINT32 Status; u32 Status;
} NVSP_MESSAGE_INIT_COMPLETE, *PNVSP_MESSAGE_INIT_COMPLETE; } NVSP_MESSAGE_INIT_COMPLETE, *PNVSP_MESSAGE_INIT_COMPLETE;
typedef union _NVSP_MESSAGE_INIT_UBER typedef union _NVSP_MESSAGE_INIT_UBER
...@@ -132,8 +132,8 @@ typedef union _NVSP_MESSAGE_INIT_UBER ...@@ -132,8 +132,8 @@ typedef union _NVSP_MESSAGE_INIT_UBER
// //
typedef struct _NVSP_1_MESSAGE_SEND_NDIS_VERSION typedef struct _NVSP_1_MESSAGE_SEND_NDIS_VERSION
{ {
UINT32 NdisMajorVersion; u32 NdisMajorVersion;
UINT32 NdisMinorVersion; u32 NdisMinorVersion;
} NVSP_1_MESSAGE_SEND_NDIS_VERSION, *PNVSP_1_MESSAGE_SEND_NDIS_VERSION; } NVSP_1_MESSAGE_SEND_NDIS_VERSION, *PNVSP_1_MESSAGE_SEND_NDIS_VERSION;
// //
...@@ -149,10 +149,10 @@ typedef struct _NVSP_1_MESSAGE_SEND_RECEIVE_BUFFER ...@@ -149,10 +149,10 @@ typedef struct _NVSP_1_MESSAGE_SEND_RECEIVE_BUFFER
typedef struct _NVSP_1_RECEIVE_BUFFER_SECTION typedef struct _NVSP_1_RECEIVE_BUFFER_SECTION
{ {
UINT32 Offset; u32 Offset;
UINT32 SubAllocationSize; u32 SubAllocationSize;
UINT32 NumSubAllocations; u32 NumSubAllocations;
UINT32 EndOffset; u32 EndOffset;
} NVSP_1_RECEIVE_BUFFER_SECTION, *PNVSP_1_RECEIVE_BUFFER_SECTION; } NVSP_1_RECEIVE_BUFFER_SECTION, *PNVSP_1_RECEIVE_BUFFER_SECTION;
// //
...@@ -162,8 +162,8 @@ typedef struct _NVSP_1_RECEIVE_BUFFER_SECTION ...@@ -162,8 +162,8 @@ typedef struct _NVSP_1_RECEIVE_BUFFER_SECTION
// //
typedef struct _NVSP_1_MESSAGE_SEND_RECEIVE_BUFFER_COMPLETE typedef struct _NVSP_1_MESSAGE_SEND_RECEIVE_BUFFER_COMPLETE
{ {
UINT32 Status; u32 Status;
UINT32 NumSections; u32 NumSections;
// //
// The receive buffer is split into two parts, a large // The receive buffer is split into two parts, a large
...@@ -213,7 +213,7 @@ typedef struct _NVSP_1_MESSAGE_SEND_SEND_BUFFER ...@@ -213,7 +213,7 @@ typedef struct _NVSP_1_MESSAGE_SEND_SEND_BUFFER
// //
typedef struct _NVSP_1_MESSAGE_SEND_SEND_BUFFER_COMPLETE typedef struct _NVSP_1_MESSAGE_SEND_SEND_BUFFER_COMPLETE
{ {
UINT32 Status; u32 Status;
// //
// The VSC gets to choose the size of the send buffer and // The VSC gets to choose the size of the send buffer and
...@@ -221,7 +221,7 @@ typedef struct _NVSP_1_MESSAGE_SEND_SEND_BUFFER_COMPLETE ...@@ -221,7 +221,7 @@ typedef struct _NVSP_1_MESSAGE_SEND_SEND_BUFFER_COMPLETE
// This was done to enable dynamic reconfigurations when // This was done to enable dynamic reconfigurations when
// the cost of GPA-direct buffers decreases. // the cost of GPA-direct buffers decreases.
// //
UINT32 SectionSize; u32 SectionSize;
} NVSP_1_MESSAGE_SEND_SEND_BUFFER_COMPLETE, *PNVSP_1_MESSAGE_SEND_SEND_BUFFER_COMPLETE; } NVSP_1_MESSAGE_SEND_SEND_BUFFER_COMPLETE, *PNVSP_1_MESSAGE_SEND_SEND_BUFFER_COMPLETE;
// //
...@@ -246,7 +246,7 @@ typedef struct _NVSP_1_MESSAGE_SEND_RNDIS_PACKET ...@@ -246,7 +246,7 @@ typedef struct _NVSP_1_MESSAGE_SEND_RNDIS_PACKET
// the Network VSP only has one. Therefore, the channel // the Network VSP only has one. Therefore, the channel
// travels with the RNDIS packet. // travels with the RNDIS packet.
// //
UINT32 ChannelType; u32 ChannelType;
// //
// This field is used to send part or all of the data // This field is used to send part or all of the data
...@@ -256,8 +256,8 @@ typedef struct _NVSP_1_MESSAGE_SEND_RNDIS_PACKET ...@@ -256,8 +256,8 @@ typedef struct _NVSP_1_MESSAGE_SEND_RNDIS_PACKET
// and all of the data was sent through other VMBus // and all of the data was sent through other VMBus
// mechanisms. // mechanisms.
// //
UINT32 SendBufferSectionIndex; u32 SendBufferSectionIndex;
UINT32 SendBufferSectionSize; u32 SendBufferSectionSize;
} NVSP_1_MESSAGE_SEND_RNDIS_PACKET, *PNVSP_1_MESSAGE_SEND_RNDIS_PACKET; } NVSP_1_MESSAGE_SEND_RNDIS_PACKET, *PNVSP_1_MESSAGE_SEND_RNDIS_PACKET;
// //
...@@ -268,7 +268,7 @@ typedef struct _NVSP_1_MESSAGE_SEND_RNDIS_PACKET ...@@ -268,7 +268,7 @@ typedef struct _NVSP_1_MESSAGE_SEND_RNDIS_PACKET
// //
typedef struct _NVSP_1_MESSAGE_SEND_RNDIS_PACKET_COMPLETE typedef struct _NVSP_1_MESSAGE_SEND_RNDIS_PACKET_COMPLETE
{ {
UINT32 Status; u32 Status;
} NVSP_1_MESSAGE_SEND_RNDIS_PACKET_COMPLETE, *PNVSP_1_MESSAGE_SEND_RNDIS_PACKET_COMPLETE; } NVSP_1_MESSAGE_SEND_RNDIS_PACKET_COMPLETE, *PNVSP_1_MESSAGE_SEND_RNDIS_PACKET_COMPLETE;
typedef union _NVSP_MESSAGE_1_UBER typedef union _NVSP_MESSAGE_1_UBER
......
...@@ -97,7 +97,6 @@ typedef struct _DLIST_ENTRY { ...@@ -97,7 +97,6 @@ typedef struct _DLIST_ENTRY {
// //
// unsigned types // unsigned types
// //
typedef unsigned int UINT32;
#ifdef __x86_64__ #ifdef __x86_64__
typedef unsigned long UINT64; typedef unsigned long UINT64;
#else #else
...@@ -112,7 +111,6 @@ typedef unsigned char UCHAR; ...@@ -112,7 +111,6 @@ typedef unsigned char UCHAR;
// //
// signed types // signed types
// //
typedef int INT32;
#ifdef __x86_64__ #ifdef __x86_64__
typedef long INT64; typedef long INT64;
#else #else
...@@ -131,7 +129,7 @@ typedef unsigned long SIZE_T; ...@@ -131,7 +129,7 @@ typedef unsigned long SIZE_T;
typedef unsigned char BOOL; typedef unsigned char BOOL;
typedef unsigned char BOOLEAN; typedef unsigned char BOOLEAN;
typedef void* HANDLE; typedef void* HANDLE;
typedef UINT32 DWORD; typedef u32 DWORD;
typedef char* PCHAR; typedef char* PCHAR;
typedef unsigned char BYTE; typedef unsigned char BYTE;
...@@ -148,7 +146,7 @@ typedef void (*PFN_TIMER_CALLBACK)(void* context); ...@@ -148,7 +146,7 @@ typedef void (*PFN_TIMER_CALLBACK)(void* context);
#ifdef __x86_64__ #ifdef __x86_64__
#define RDMSR(reg, v) { \ #define RDMSR(reg, v) { \
UINT32 h, l; \ u32 h, l; \
__asm__ __volatile__("rdmsr" \ __asm__ __volatile__("rdmsr" \
: "=a" (l), "=d" (h) \ : "=a" (l), "=d" (h) \
: "c" (reg)); \ : "c" (reg)); \
...@@ -156,9 +154,9 @@ typedef void (*PFN_TIMER_CALLBACK)(void* context); ...@@ -156,9 +154,9 @@ typedef void (*PFN_TIMER_CALLBACK)(void* context);
} }
#define WRMSR(reg, v) { \ #define WRMSR(reg, v) { \
UINT32 h, l; \ u32 h, l; \
l = (UINT32)(((UINT64)(v)) & 0xFFFFFFFF); \ l = (u32)(((UINT64)(v)) & 0xFFFFFFFF); \
h = (UINT32)((((UINT64)(v)) >> 32) & 0xFFFFFFFF); \ h = (u32)((((UINT64)(v)) >> 32) & 0xFFFFFFFF); \
__asm__ __volatile__("wrmsr" \ __asm__ __volatile__("wrmsr" \
: /* no outputs */ \ : /* no outputs */ \
: "c" (reg), "a" (l), "d" (h)); \ : "c" (reg), "a" (l), "d" (h)); \
...@@ -219,7 +217,7 @@ extern void MemoryFence(void); ...@@ -219,7 +217,7 @@ extern void MemoryFence(void);
extern HANDLE TimerCreate(PFN_TIMER_CALLBACK pfnTimerCB, void* context); extern HANDLE TimerCreate(PFN_TIMER_CALLBACK pfnTimerCB, void* context);
extern void TimerClose(HANDLE hTimer); extern void TimerClose(HANDLE hTimer);
extern int TimerStop(HANDLE hTimer); extern int TimerStop(HANDLE hTimer);
extern void TimerStart(HANDLE hTimer, UINT32 expirationInUs); extern void TimerStart(HANDLE hTimer, u32 expirationInUs);
extern SIZE_T GetTickCount(void); extern SIZE_T GetTickCount(void);
extern HANDLE WaitEventCreate(void); extern HANDLE WaitEventCreate(void);
...@@ -228,7 +226,7 @@ extern void WaitEventSet(HANDLE hWait); ...@@ -228,7 +226,7 @@ extern void WaitEventSet(HANDLE hWait);
extern int WaitEventWait(HANDLE hWait); extern int WaitEventWait(HANDLE hWait);
// If >0, hWait got signaled. If ==0, timeout. If < 0, error // If >0, hWait got signaled. If ==0, timeout. If < 0, error
extern int WaitEventWaitEx(HANDLE hWait, UINT32 TimeoutInMs); extern int WaitEventWaitEx(HANDLE hWait, u32 TimeoutInMs);
extern HANDLE SpinlockCreate(void); extern HANDLE SpinlockCreate(void);
extern void SpinlockClose(HANDLE hSpin); extern void SpinlockClose(HANDLE hSpin);
......
...@@ -28,21 +28,21 @@ ...@@ -28,21 +28,21 @@
// //
// Basic types // Basic types
// //
typedef UINT32 RNDIS_REQUEST_ID; typedef u32 RNDIS_REQUEST_ID;
typedef UINT32 RNDIS_HANDLE; typedef u32 RNDIS_HANDLE;
typedef UINT32 RNDIS_STATUS; typedef u32 RNDIS_STATUS;
typedef UINT32 RNDIS_REQUEST_TYPE; typedef u32 RNDIS_REQUEST_TYPE;
typedef UINT32 RNDIS_OID; typedef u32 RNDIS_OID;
typedef UINT32 RNDIS_CLASS_ID; typedef u32 RNDIS_CLASS_ID;
typedef UINT32 RNDIS_MEDIUM; typedef u32 RNDIS_MEDIUM;
typedef UINT32 *PRNDIS_REQUEST_ID; typedef u32 *PRNDIS_REQUEST_ID;
typedef UINT32 *PRNDIS_HANDLE; typedef u32 *PRNDIS_HANDLE;
typedef UINT32 *PRNDIS_STATUS; typedef u32 *PRNDIS_STATUS;
typedef UINT32 *PRNDIS_REQUEST_TYPE; typedef u32 *PRNDIS_REQUEST_TYPE;
typedef UINT32 *PRNDIS_OID; typedef u32 *PRNDIS_OID;
typedef UINT32 *PRNDIS_CLASS_ID; typedef u32 *PRNDIS_CLASS_ID;
typedef UINT32 *PRNDIS_MEDIUM; typedef u32 *PRNDIS_MEDIUM;
typedef UINT32 RNDIS_AF; typedef u32 RNDIS_AF;
// //
// Status codes // Status codes
...@@ -369,9 +369,9 @@ typedef UINT32 RNDIS_AF; ...@@ -369,9 +369,9 @@ typedef UINT32 RNDIS_AF;
typedef struct _RNDIS_INITIALIZE_REQUEST typedef struct _RNDIS_INITIALIZE_REQUEST
{ {
RNDIS_REQUEST_ID RequestId; RNDIS_REQUEST_ID RequestId;
UINT32 MajorVersion; u32 MajorVersion;
UINT32 MinorVersion; u32 MinorVersion;
UINT32 MaxTransferSize; u32 MaxTransferSize;
} RNDIS_INITIALIZE_REQUEST, *PRNDIS_INITIALIZE_REQUEST; } RNDIS_INITIALIZE_REQUEST, *PRNDIS_INITIALIZE_REQUEST;
...@@ -382,15 +382,15 @@ typedef struct _RNDIS_INITIALIZE_COMPLETE ...@@ -382,15 +382,15 @@ typedef struct _RNDIS_INITIALIZE_COMPLETE
{ {
RNDIS_REQUEST_ID RequestId; RNDIS_REQUEST_ID RequestId;
RNDIS_STATUS Status; RNDIS_STATUS Status;
UINT32 MajorVersion; u32 MajorVersion;
UINT32 MinorVersion; u32 MinorVersion;
UINT32 DeviceFlags; u32 DeviceFlags;
RNDIS_MEDIUM Medium; RNDIS_MEDIUM Medium;
UINT32 MaxPacketsPerMessage; u32 MaxPacketsPerMessage;
UINT32 MaxTransferSize; u32 MaxTransferSize;
UINT32 PacketAlignmentFactor; u32 PacketAlignmentFactor;
UINT32 AFListOffset; u32 AFListOffset;
UINT32 AFListSize; u32 AFListSize;
} RNDIS_INITIALIZE_COMPLETE, *PRNDIS_INITIALIZE_COMPLETE; } RNDIS_INITIALIZE_COMPLETE, *PRNDIS_INITIALIZE_COMPLETE;
...@@ -401,8 +401,8 @@ typedef struct _RNDIS_INITIALIZE_COMPLETE ...@@ -401,8 +401,8 @@ typedef struct _RNDIS_INITIALIZE_COMPLETE
typedef struct _RNDIS_CO_ADDRESS_FAMILY typedef struct _RNDIS_CO_ADDRESS_FAMILY
{ {
RNDIS_AF AddressFamily; RNDIS_AF AddressFamily;
UINT32 MajorVersion; u32 MajorVersion;
UINT32 MinorVersion; u32 MinorVersion;
} RNDIS_CO_ADDRESS_FAMILY, *PRNDIS_CO_ADDRESS_FAMILY; } RNDIS_CO_ADDRESS_FAMILY, *PRNDIS_CO_ADDRESS_FAMILY;
...@@ -422,8 +422,8 @@ typedef struct _RNDIS_QUERY_REQUEST ...@@ -422,8 +422,8 @@ typedef struct _RNDIS_QUERY_REQUEST
{ {
RNDIS_REQUEST_ID RequestId; RNDIS_REQUEST_ID RequestId;
RNDIS_OID Oid; RNDIS_OID Oid;
UINT32 InformationBufferLength; u32 InformationBufferLength;
UINT32 InformationBufferOffset; u32 InformationBufferOffset;
RNDIS_HANDLE DeviceVcHandle; RNDIS_HANDLE DeviceVcHandle;
} RNDIS_QUERY_REQUEST, *PRNDIS_QUERY_REQUEST; } RNDIS_QUERY_REQUEST, *PRNDIS_QUERY_REQUEST;
...@@ -435,8 +435,8 @@ typedef struct _RNDIS_QUERY_COMPLETE ...@@ -435,8 +435,8 @@ typedef struct _RNDIS_QUERY_COMPLETE
{ {
RNDIS_REQUEST_ID RequestId; RNDIS_REQUEST_ID RequestId;
RNDIS_STATUS Status; RNDIS_STATUS Status;
UINT32 InformationBufferLength; u32 InformationBufferLength;
UINT32 InformationBufferOffset; u32 InformationBufferOffset;
} RNDIS_QUERY_COMPLETE, *PRNDIS_QUERY_COMPLETE; } RNDIS_QUERY_COMPLETE, *PRNDIS_QUERY_COMPLETE;
...@@ -447,8 +447,8 @@ typedef struct _RNDIS_SET_REQUEST ...@@ -447,8 +447,8 @@ typedef struct _RNDIS_SET_REQUEST
{ {
RNDIS_REQUEST_ID RequestId; RNDIS_REQUEST_ID RequestId;
RNDIS_OID Oid; RNDIS_OID Oid;
UINT32 InformationBufferLength; u32 InformationBufferLength;
UINT32 InformationBufferOffset; u32 InformationBufferOffset;
RNDIS_HANDLE DeviceVcHandle; RNDIS_HANDLE DeviceVcHandle;
} RNDIS_SET_REQUEST, *PRNDIS_SET_REQUEST; } RNDIS_SET_REQUEST, *PRNDIS_SET_REQUEST;
...@@ -468,7 +468,7 @@ typedef struct _RNDIS_SET_COMPLETE ...@@ -468,7 +468,7 @@ typedef struct _RNDIS_SET_COMPLETE
// //
typedef struct _RNDIS_RESET_REQUEST typedef struct _RNDIS_RESET_REQUEST
{ {
UINT32 Reserved; u32 Reserved;
} RNDIS_RESET_REQUEST, *PRNDIS_RESET_REQUEST; } RNDIS_RESET_REQUEST, *PRNDIS_RESET_REQUEST;
// //
...@@ -477,7 +477,7 @@ typedef struct _RNDIS_RESET_REQUEST ...@@ -477,7 +477,7 @@ typedef struct _RNDIS_RESET_REQUEST
typedef struct _RNDIS_RESET_COMPLETE typedef struct _RNDIS_RESET_COMPLETE
{ {
RNDIS_STATUS Status; RNDIS_STATUS Status;
UINT32 AddressingReset; u32 AddressingReset;
} RNDIS_RESET_COMPLETE, *PRNDIS_RESET_COMPLETE; } RNDIS_RESET_COMPLETE, *PRNDIS_RESET_COMPLETE;
...@@ -487,8 +487,8 @@ typedef struct _RNDIS_RESET_COMPLETE ...@@ -487,8 +487,8 @@ typedef struct _RNDIS_RESET_COMPLETE
typedef struct _RNDIS_INDICATE_STATUS typedef struct _RNDIS_INDICATE_STATUS
{ {
RNDIS_STATUS Status; RNDIS_STATUS Status;
UINT32 StatusBufferLength; u32 StatusBufferLength;
UINT32 StatusBufferOffset; u32 StatusBufferOffset;
} RNDIS_INDICATE_STATUS, *PRNDIS_INDICATE_STATUS; } RNDIS_INDICATE_STATUS, *PRNDIS_INDICATE_STATUS;
...@@ -499,7 +499,7 @@ typedef struct _RNDIS_INDICATE_STATUS ...@@ -499,7 +499,7 @@ typedef struct _RNDIS_INDICATE_STATUS
typedef struct _RNDIS_DIAGNOSTIC_INFO typedef struct _RNDIS_DIAGNOSTIC_INFO
{ {
RNDIS_STATUS DiagStatus; RNDIS_STATUS DiagStatus;
UINT32 ErrorOffset; u32 ErrorOffset;
} RNDIS_DIAGNOSTIC_INFO, *PRNDIS_DIAGNOSTIC_INFO; } RNDIS_DIAGNOSTIC_INFO, *PRNDIS_DIAGNOSTIC_INFO;
...@@ -531,15 +531,15 @@ typedef struct _RNDIS_KEEPALIVE_COMPLETE ...@@ -531,15 +531,15 @@ typedef struct _RNDIS_KEEPALIVE_COMPLETE
// //
typedef struct _RNDIS_PACKET typedef struct _RNDIS_PACKET
{ {
UINT32 DataOffset; u32 DataOffset;
UINT32 DataLength; u32 DataLength;
UINT32 OOBDataOffset; u32 OOBDataOffset;
UINT32 OOBDataLength; u32 OOBDataLength;
UINT32 NumOOBDataElements; u32 NumOOBDataElements;
UINT32 PerPacketInfoOffset; u32 PerPacketInfoOffset;
UINT32 PerPacketInfoLength; u32 PerPacketInfoLength;
RNDIS_HANDLE VcHandle; RNDIS_HANDLE VcHandle;
UINT32 Reserved; u32 Reserved;
} RNDIS_PACKET, *PRNDIS_PACKET; } RNDIS_PACKET, *PRNDIS_PACKET;
// //
...@@ -547,9 +547,9 @@ typedef struct _RNDIS_PACKET ...@@ -547,9 +547,9 @@ typedef struct _RNDIS_PACKET
// //
typedef struct _RNDIS_OOBD typedef struct _RNDIS_OOBD
{ {
UINT32 Size; u32 Size;
RNDIS_CLASS_ID Type; RNDIS_CLASS_ID Type;
UINT32 ClassInformationOffset; u32 ClassInformationOffset;
} RNDIS_OOBD, *PRNDIS_OOBD; } RNDIS_OOBD, *PRNDIS_OOBD;
// //
...@@ -557,9 +557,9 @@ typedef struct _RNDIS_OOBD ...@@ -557,9 +557,9 @@ typedef struct _RNDIS_OOBD
// //
typedef struct _RNDIS_PER_PACKET_INFO typedef struct _RNDIS_PER_PACKET_INFO
{ {
UINT32 Size; u32 Size;
UINT32 Type; u32 Type;
UINT32 PerPacketInformationOffset; u32 PerPacketInformationOffset;
} RNDIS_PER_PACKET_INFO, *PRNDIS_PER_PACKET_INFO; } RNDIS_PER_PACKET_INFO, *PRNDIS_PER_PACKET_INFO;
...@@ -569,11 +569,11 @@ typedef struct _RNDIS_PER_PACKET_INFO ...@@ -569,11 +569,11 @@ typedef struct _RNDIS_PER_PACKET_INFO
// //
typedef struct _RNDIS_CONFIG_PARAMETER_INFO typedef struct _RNDIS_CONFIG_PARAMETER_INFO
{ {
UINT32 ParameterNameOffset; u32 ParameterNameOffset;
UINT32 ParameterNameLength; u32 ParameterNameLength;
UINT32 ParameterType; u32 ParameterType;
UINT32 ParameterValueOffset; u32 ParameterValueOffset;
UINT32 ParameterValueLength; u32 ParameterValueLength;
} RNDIS_CONFIG_PARAMETER_INFO, *PRNDIS_CONFIG_PARAMETER_INFO; } RNDIS_CONFIG_PARAMETER_INFO, *PRNDIS_CONFIG_PARAMETER_INFO;
// //
...@@ -636,8 +636,8 @@ typedef struct _RCONDIS_MP_QUERY_REQUEST ...@@ -636,8 +636,8 @@ typedef struct _RCONDIS_MP_QUERY_REQUEST
RNDIS_REQUEST_TYPE RequestType; RNDIS_REQUEST_TYPE RequestType;
RNDIS_OID Oid; RNDIS_OID Oid;
RNDIS_HANDLE DeviceVcHandle; RNDIS_HANDLE DeviceVcHandle;
UINT32 InformationBufferLength; u32 InformationBufferLength;
UINT32 InformationBufferOffset; u32 InformationBufferOffset;
} RCONDIS_MP_QUERY_REQUEST, *PRCONDIS_MP_QUERY_REQUEST; } RCONDIS_MP_QUERY_REQUEST, *PRCONDIS_MP_QUERY_REQUEST;
...@@ -650,8 +650,8 @@ typedef struct _RCONDIS_MP_SET_REQUEST ...@@ -650,8 +650,8 @@ typedef struct _RCONDIS_MP_SET_REQUEST
RNDIS_REQUEST_TYPE RequestType; RNDIS_REQUEST_TYPE RequestType;
RNDIS_OID Oid; RNDIS_OID Oid;
RNDIS_HANDLE DeviceVcHandle; RNDIS_HANDLE DeviceVcHandle;
UINT32 InformationBufferLength; u32 InformationBufferLength;
UINT32 InformationBufferOffset; u32 InformationBufferOffset;
} RCONDIS_MP_SET_REQUEST, *PRCONDIS_MP_SET_REQUEST; } RCONDIS_MP_SET_REQUEST, *PRCONDIS_MP_SET_REQUEST;
...@@ -662,8 +662,8 @@ typedef struct _RCONDIS_INDICATE_STATUS ...@@ -662,8 +662,8 @@ typedef struct _RCONDIS_INDICATE_STATUS
{ {
RNDIS_HANDLE NdisVcHandle; RNDIS_HANDLE NdisVcHandle;
RNDIS_STATUS Status; RNDIS_STATUS Status;
UINT32 StatusBufferLength; u32 StatusBufferLength;
UINT32 StatusBufferOffset; u32 StatusBufferOffset;
} RCONDIS_INDICATE_STATUS, *PRCONDIS_INDICATE_STATUS; } RCONDIS_INDICATE_STATUS, *PRCONDIS_INDICATE_STATUS;
...@@ -673,30 +673,30 @@ typedef struct _RCONDIS_INDICATE_STATUS ...@@ -673,30 +673,30 @@ typedef struct _RCONDIS_INDICATE_STATUS
typedef struct _RCONDIS_SPECIFIC_PARAMETERS typedef struct _RCONDIS_SPECIFIC_PARAMETERS
{ {
UINT32 ParameterType; u32 ParameterType;
UINT32 ParameterLength; u32 ParameterLength;
UINT32 ParameterOffset; u32 ParameterOffset;
} RCONDIS_SPECIFIC_PARAMETERS, *PRCONDIS_SPECIFIC_PARAMETERS; } RCONDIS_SPECIFIC_PARAMETERS, *PRCONDIS_SPECIFIC_PARAMETERS;
typedef struct _RCONDIS_MEDIA_PARAMETERS typedef struct _RCONDIS_MEDIA_PARAMETERS
{ {
UINT32 Flags; u32 Flags;
UINT32 Reserved1; u32 Reserved1;
UINT32 Reserved2; u32 Reserved2;
RCONDIS_SPECIFIC_PARAMETERS MediaSpecific; RCONDIS_SPECIFIC_PARAMETERS MediaSpecific;
} RCONDIS_MEDIA_PARAMETERS, *PRCONDIS_MEDIA_PARAMETERS; } RCONDIS_MEDIA_PARAMETERS, *PRCONDIS_MEDIA_PARAMETERS;
typedef struct _RNDIS_FLOWSPEC typedef struct _RNDIS_FLOWSPEC
{ {
UINT32 TokenRate; u32 TokenRate;
UINT32 TokenBucketSize; u32 TokenBucketSize;
UINT32 PeakBandwidth; u32 PeakBandwidth;
UINT32 Latency; u32 Latency;
UINT32 DelayVariation; u32 DelayVariation;
UINT32 ServiceType; u32 ServiceType;
UINT32 MaxSduSize; u32 MaxSduSize;
UINT32 MinimumPolicedSize; u32 MinimumPolicedSize;
} RNDIS_FLOWSPEC, *PRNDIS_FLOWSPEC; } RNDIS_FLOWSPEC, *PRNDIS_FLOWSPEC;
typedef struct _RCONDIS_CALL_MANAGER_PARAMETERS typedef struct _RCONDIS_CALL_MANAGER_PARAMETERS
...@@ -712,12 +712,12 @@ typedef struct _RCONDIS_CALL_MANAGER_PARAMETERS ...@@ -712,12 +712,12 @@ typedef struct _RCONDIS_CALL_MANAGER_PARAMETERS
typedef struct _RCONDIS_MP_ACTIVATE_VC_REQUEST typedef struct _RCONDIS_MP_ACTIVATE_VC_REQUEST
{ {
RNDIS_REQUEST_ID RequestId; RNDIS_REQUEST_ID RequestId;
UINT32 Flags; u32 Flags;
RNDIS_HANDLE DeviceVcHandle; RNDIS_HANDLE DeviceVcHandle;
UINT32 MediaParamsOffset; u32 MediaParamsOffset;
UINT32 MediaParamsLength; u32 MediaParamsLength;
UINT32 CallMgrParamsOffset; u32 CallMgrParamsOffset;
UINT32 CallMgrParamsLength; u32 CallMgrParamsLength;
} RCONDIS_MP_ACTIVATE_VC_REQUEST, *PRCONDIS_MP_ACTIVATE_VC_REQUEST; } RCONDIS_MP_ACTIVATE_VC_REQUEST, *PRCONDIS_MP_ACTIVATE_VC_REQUEST;
// //
...@@ -736,7 +736,7 @@ typedef struct _RCONDIS_MP_ACTIVATE_VC_COMPLETE ...@@ -736,7 +736,7 @@ typedef struct _RCONDIS_MP_ACTIVATE_VC_COMPLETE
typedef struct _RCONDIS_MP_DEACTIVATE_VC_REQUEST typedef struct _RCONDIS_MP_DEACTIVATE_VC_REQUEST
{ {
RNDIS_REQUEST_ID RequestId; RNDIS_REQUEST_ID RequestId;
UINT32 Flags; u32 Flags;
RNDIS_HANDLE DeviceVcHandle; RNDIS_HANDLE DeviceVcHandle;
} RCONDIS_MP_DEACTIVATE_VC_REQUEST, *PRCONDIS_MP_DEACTIVATE_VC_REQUEST; } RCONDIS_MP_DEACTIVATE_VC_REQUEST, *PRCONDIS_MP_DEACTIVATE_VC_REQUEST;
...@@ -786,13 +786,13 @@ typedef union _RNDIS_MESSAGE_CONTAINER ...@@ -786,13 +786,13 @@ typedef union _RNDIS_MESSAGE_CONTAINER
// //
typedef __struct_bcount(MessageLength) struct _RNDIS_MESSAGE typedef __struct_bcount(MessageLength) struct _RNDIS_MESSAGE
{ {
UINT32 NdisMessageType; u32 NdisMessageType;
// //
// Total length of this message, from the beginning // Total length of this message, from the beginning
// of the RNDIS_MESSAGE struct, in bytes. // of the RNDIS_MESSAGE struct, in bytes.
// //
UINT32 MessageLength; u32 MessageLength;
// Actual message // Actual message
RNDIS_MESSAGE_CONTAINER Message; RNDIS_MESSAGE_CONTAINER Message;
......
...@@ -289,7 +289,7 @@ HANDLE TimerCreate(PFN_TIMER_CALLBACK pfnTimerCB, void* context) ...@@ -289,7 +289,7 @@ HANDLE TimerCreate(PFN_TIMER_CALLBACK pfnTimerCB, void* context)
return t; return t;
} }
void TimerStart(HANDLE hTimer, UINT32 expirationInUs) void TimerStart(HANDLE hTimer, u32 expirationInUs)
{ {
TIMER* t = (TIMER* )hTimer; TIMER* t = (TIMER* )hTimer;
...@@ -363,7 +363,7 @@ int WaitEventWait(HANDLE hWait) ...@@ -363,7 +363,7 @@ int WaitEventWait(HANDLE hWait)
return ret; return ret;
} }
int WaitEventWaitEx(HANDLE hWait, UINT32 TimeoutInMs) int WaitEventWaitEx(HANDLE hWait, u32 TimeoutInMs)
{ {
int ret=0; int ret=0;
WAITEVENT* waitEvent = (WAITEVENT* )hWait; WAITEVENT* waitEvent = (WAITEVENT* )hWait;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册