Commit 59471438 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: hv: remove UINT64 and INT64 and UCHAR typedefs

The UINT64 and INT64 and UCHAR 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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 4d643114
...@@ -56,9 +56,9 @@ BlkVscInitialize( ...@@ -56,9 +56,9 @@ BlkVscInitialize(
storDriver->RequestExtSize = sizeof(STORVSC_REQUEST_EXTENSION); storDriver->RequestExtSize = sizeof(STORVSC_REQUEST_EXTENSION);
// Divide the ring buffer data size (which is 1 page less than the ring buffer size since that page is reserved for the ring buffer indices) // Divide the ring buffer data size (which is 1 page less than the ring buffer size since that page is reserved for the ring buffer indices)
// by the max request size (which is VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER + VSTOR_PACKET + UINT64) // by the max request size (which is VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER + VSTOR_PACKET + u64)
storDriver->MaxOutstandingRequestsPerChannel = storDriver->MaxOutstandingRequestsPerChannel =
((storDriver->RingBufferSize - PAGE_SIZE) / ALIGN_UP(MAX_MULTIPAGE_BUFFER_PACKET + sizeof(VSTOR_PACKET) + sizeof(UINT64),sizeof(UINT64))); ((storDriver->RingBufferSize - PAGE_SIZE) / ALIGN_UP(MAX_MULTIPAGE_BUFFER_PACKET + sizeof(VSTOR_PACKET) + sizeof(u64),sizeof(u64)));
DPRINT_INFO(BLKVSC, "max io outstd %u", storDriver->MaxOutstandingRequestsPerChannel); DPRINT_INFO(BLKVSC, "max io outstd %u", storDriver->MaxOutstandingRequestsPerChannel);
......
...@@ -335,7 +335,7 @@ static void DumpGpadlBody( ...@@ -335,7 +335,7 @@ static void DumpGpadlBody(
int i=0; int i=0;
int pfnCount=0; int pfnCount=0;
pfnCount = (Len - sizeof(VMBUS_CHANNEL_GPADL_BODY))/ sizeof(UINT64); pfnCount = (Len - sizeof(VMBUS_CHANNEL_GPADL_BODY))/ sizeof(u64);
DPRINT_DBG(VMBUS, "gpadl body - len %d pfn count %d", Len, pfnCount); DPRINT_DBG(VMBUS, "gpadl body - len %d pfn count %d", Len, pfnCount);
for (i=0; i< pfnCount; i++) for (i=0; i< pfnCount; i++)
...@@ -416,12 +416,12 @@ VmbusChannelCreateGpadlHeader( ...@@ -416,12 +416,12 @@ VmbusChannelCreateGpadlHeader(
// do we need a gpadl body msg // do we need a gpadl body msg
pfnSize = MAX_SIZE_CHANNEL_MESSAGE - sizeof(VMBUS_CHANNEL_GPADL_HEADER) - sizeof(GPA_RANGE); pfnSize = MAX_SIZE_CHANNEL_MESSAGE - sizeof(VMBUS_CHANNEL_GPADL_HEADER) - sizeof(GPA_RANGE);
pfnCount = pfnSize / sizeof(UINT64); pfnCount = pfnSize / sizeof(u64);
if (pageCount > pfnCount) // we need a gpadl body if (pageCount > pfnCount) // we need a gpadl body
{ {
// fill in the header // fill in the header
msgSize = sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_GPADL_HEADER) + sizeof(GPA_RANGE) + pfnCount*sizeof(UINT64); msgSize = sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_GPADL_HEADER) + sizeof(GPA_RANGE) + pfnCount*sizeof(u64);
msgHeader = MemAllocZeroed(msgSize); msgHeader = MemAllocZeroed(msgSize);
INITIALIZE_LIST_HEAD(&msgHeader->SubMsgList); INITIALIZE_LIST_HEAD(&msgHeader->SubMsgList);
...@@ -429,7 +429,7 @@ VmbusChannelCreateGpadlHeader( ...@@ -429,7 +429,7 @@ VmbusChannelCreateGpadlHeader(
gpaHeader = (VMBUS_CHANNEL_GPADL_HEADER*)msgHeader->Msg; gpaHeader = (VMBUS_CHANNEL_GPADL_HEADER*)msgHeader->Msg;
gpaHeader->RangeCount = 1; gpaHeader->RangeCount = 1;
gpaHeader->RangeBufLen = sizeof(GPA_RANGE) + pageCount*sizeof(UINT64); gpaHeader->RangeBufLen = sizeof(GPA_RANGE) + pageCount*sizeof(u64);
gpaHeader->Range[0].ByteOffset = 0; gpaHeader->Range[0].ByteOffset = 0;
gpaHeader->Range[0].ByteCount = Size; gpaHeader->Range[0].ByteCount = Size;
for (i=0; i<pfnCount; i++) for (i=0; i<pfnCount; i++)
...@@ -444,7 +444,7 @@ VmbusChannelCreateGpadlHeader( ...@@ -444,7 +444,7 @@ VmbusChannelCreateGpadlHeader(
// how many pfns can we fit // how many pfns can we fit
pfnSize = MAX_SIZE_CHANNEL_MESSAGE - sizeof(VMBUS_CHANNEL_GPADL_BODY); pfnSize = MAX_SIZE_CHANNEL_MESSAGE - sizeof(VMBUS_CHANNEL_GPADL_BODY);
pfnCount = pfnSize / sizeof(UINT64); pfnCount = pfnSize / sizeof(u64);
// fill in the body // fill in the body
while (pfnLeft) while (pfnLeft)
...@@ -458,7 +458,7 @@ VmbusChannelCreateGpadlHeader( ...@@ -458,7 +458,7 @@ VmbusChannelCreateGpadlHeader(
pfnCurr = pfnLeft; pfnCurr = pfnLeft;
} }
msgSize = sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_GPADL_BODY) + pfnCurr*sizeof(UINT64); msgSize = sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_GPADL_BODY) + pfnCurr*sizeof(u64);
msgBody = MemAllocZeroed(msgSize); msgBody = MemAllocZeroed(msgSize);
ASSERT(msgBody); ASSERT(msgBody);
msgBody->MessageSize = msgSize; msgBody->MessageSize = msgSize;
...@@ -481,13 +481,13 @@ VmbusChannelCreateGpadlHeader( ...@@ -481,13 +481,13 @@ VmbusChannelCreateGpadlHeader(
else else
{ {
// everything fits in a header // everything fits in a header
msgSize = sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_GPADL_HEADER) + sizeof(GPA_RANGE) + pageCount*sizeof(UINT64); msgSize = sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_GPADL_HEADER) + sizeof(GPA_RANGE) + pageCount*sizeof(u64);
msgHeader = MemAllocZeroed(msgSize); msgHeader = MemAllocZeroed(msgSize);
msgHeader->MessageSize=msgSize; msgHeader->MessageSize=msgSize;
gpaHeader = (VMBUS_CHANNEL_GPADL_HEADER*)msgHeader->Msg; gpaHeader = (VMBUS_CHANNEL_GPADL_HEADER*)msgHeader->Msg;
gpaHeader->RangeCount = 1; gpaHeader->RangeCount = 1;
gpaHeader->RangeBufLen = sizeof(GPA_RANGE) + pageCount*sizeof(UINT64); gpaHeader->RangeBufLen = sizeof(GPA_RANGE) + pageCount*sizeof(u64);
gpaHeader->Range[0].ByteOffset = 0; gpaHeader->Range[0].ByteOffset = 0;
gpaHeader->Range[0].ByteCount = Size; gpaHeader->Range[0].ByteCount = Size;
for (i=0; i<pageCount; i++) for (i=0; i<pageCount; i++)
...@@ -754,7 +754,7 @@ VmbusChannelSendPacket( ...@@ -754,7 +754,7 @@ VmbusChannelSendPacket(
VMBUS_CHANNEL *Channel, VMBUS_CHANNEL *Channel,
const void * Buffer, const void * Buffer,
u32 BufferLen, u32 BufferLen,
UINT64 RequestId, u64 RequestId,
VMBUS_PACKET_TYPE Type, VMBUS_PACKET_TYPE Type,
u32 Flags u32 Flags
) )
...@@ -762,16 +762,16 @@ VmbusChannelSendPacket( ...@@ -762,16 +762,16 @@ VmbusChannelSendPacket(
int ret=0; int ret=0;
VMPACKET_DESCRIPTOR desc; VMPACKET_DESCRIPTOR desc;
u32 packetLen = sizeof(VMPACKET_DESCRIPTOR) + BufferLen; u32 packetLen = sizeof(VMPACKET_DESCRIPTOR) + BufferLen;
u32 packetLenAligned = ALIGN_UP(packetLen, sizeof(UINT64)); u32 packetLenAligned = ALIGN_UP(packetLen, sizeof(u64));
SG_BUFFER_LIST bufferList[3]; SG_BUFFER_LIST bufferList[3];
UINT64 alignedData=0; u64 alignedData=0;
DPRINT_ENTER(VMBUS); DPRINT_ENTER(VMBUS);
DPRINT_DBG(VMBUS, "channel %p buffer %p len %d", Channel, Buffer, BufferLen); DPRINT_DBG(VMBUS, "channel %p buffer %p len %d", Channel, Buffer, BufferLen);
DumpVmbusChannel(Channel); DumpVmbusChannel(Channel);
ASSERT((packetLenAligned - packetLen) < sizeof(UINT64)); ASSERT((packetLenAligned - packetLen) < sizeof(u64));
// Setup the descriptor // Setup the descriptor
desc.Type = Type;//VmbusPacketTypeDataInBand; desc.Type = Type;//VmbusPacketTypeDataInBand;
...@@ -822,7 +822,7 @@ VmbusChannelSendPacketPageBuffer( ...@@ -822,7 +822,7 @@ VmbusChannelSendPacketPageBuffer(
u32 PageCount, u32 PageCount,
void * Buffer, void * Buffer,
u32 BufferLen, u32 BufferLen,
UINT64 RequestId u64 RequestId
) )
{ {
int ret=0; int ret=0;
...@@ -832,7 +832,7 @@ VmbusChannelSendPacketPageBuffer( ...@@ -832,7 +832,7 @@ VmbusChannelSendPacketPageBuffer(
u32 packetLen; u32 packetLen;
u32 packetLenAligned; u32 packetLenAligned;
SG_BUFFER_LIST bufferList[3]; SG_BUFFER_LIST bufferList[3];
UINT64 alignedData=0; u64 alignedData=0;
DPRINT_ENTER(VMBUS); DPRINT_ENTER(VMBUS);
...@@ -843,9 +843,9 @@ VmbusChannelSendPacketPageBuffer( ...@@ -843,9 +843,9 @@ VmbusChannelSendPacketPageBuffer(
// Adjust the size down since VMBUS_CHANNEL_PACKET_PAGE_BUFFER is the largest size we support // Adjust the size down since VMBUS_CHANNEL_PACKET_PAGE_BUFFER is the largest size we support
descSize = sizeof(VMBUS_CHANNEL_PACKET_PAGE_BUFFER) - ((MAX_PAGE_BUFFER_COUNT - PageCount)*sizeof(PAGE_BUFFER)); descSize = sizeof(VMBUS_CHANNEL_PACKET_PAGE_BUFFER) - ((MAX_PAGE_BUFFER_COUNT - PageCount)*sizeof(PAGE_BUFFER));
packetLen = descSize + BufferLen; packetLen = descSize + BufferLen;
packetLenAligned = ALIGN_UP(packetLen, sizeof(UINT64)); packetLenAligned = ALIGN_UP(packetLen, sizeof(u64));
ASSERT((packetLenAligned - packetLen) < sizeof(UINT64)); ASSERT((packetLenAligned - packetLen) < sizeof(u64));
// Setup the descriptor // Setup the descriptor
desc.Type = VmbusPacketTypeDataUsingGpaDirect; desc.Type = VmbusPacketTypeDataUsingGpaDirect;
...@@ -904,7 +904,7 @@ VmbusChannelSendPacketMultiPageBuffer( ...@@ -904,7 +904,7 @@ VmbusChannelSendPacketMultiPageBuffer(
MULTIPAGE_BUFFER *MultiPageBuffer, MULTIPAGE_BUFFER *MultiPageBuffer,
void * Buffer, void * Buffer,
u32 BufferLen, u32 BufferLen,
UINT64 RequestId u64 RequestId
) )
{ {
int ret=0; int ret=0;
...@@ -913,7 +913,7 @@ VmbusChannelSendPacketMultiPageBuffer( ...@@ -913,7 +913,7 @@ VmbusChannelSendPacketMultiPageBuffer(
u32 packetLen; u32 packetLen;
u32 packetLenAligned; u32 packetLenAligned;
SG_BUFFER_LIST bufferList[3]; SG_BUFFER_LIST bufferList[3];
UINT64 alignedData=0; u64 alignedData=0;
u32 PfnCount = NUM_PAGES_SPANNED(MultiPageBuffer->Offset, MultiPageBuffer->Length); u32 PfnCount = NUM_PAGES_SPANNED(MultiPageBuffer->Offset, MultiPageBuffer->Length);
DPRINT_ENTER(VMBUS); DPRINT_ENTER(VMBUS);
...@@ -926,11 +926,11 @@ VmbusChannelSendPacketMultiPageBuffer( ...@@ -926,11 +926,11 @@ VmbusChannelSendPacketMultiPageBuffer(
ASSERT(PfnCount <= MAX_MULTIPAGE_BUFFER_COUNT); ASSERT(PfnCount <= MAX_MULTIPAGE_BUFFER_COUNT);
// Adjust the size down since VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER is the largest size we support // Adjust the size down since VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER is the largest size we support
descSize = sizeof(VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER) - ((MAX_MULTIPAGE_BUFFER_COUNT - PfnCount)*sizeof(UINT64)); descSize = sizeof(VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER) - ((MAX_MULTIPAGE_BUFFER_COUNT - PfnCount)*sizeof(u64));
packetLen = descSize + BufferLen; packetLen = descSize + BufferLen;
packetLenAligned = ALIGN_UP(packetLen, sizeof(UINT64)); packetLenAligned = ALIGN_UP(packetLen, sizeof(u64));
ASSERT((packetLenAligned - packetLen) < sizeof(UINT64)); ASSERT((packetLenAligned - packetLen) < sizeof(u64));
// Setup the descriptor // Setup the descriptor
desc.Type = VmbusPacketTypeDataUsingGpaDirect; desc.Type = VmbusPacketTypeDataUsingGpaDirect;
...@@ -943,7 +943,7 @@ VmbusChannelSendPacketMultiPageBuffer( ...@@ -943,7 +943,7 @@ VmbusChannelSendPacketMultiPageBuffer(
desc.Range.Length = MultiPageBuffer->Length; desc.Range.Length = MultiPageBuffer->Length;
desc.Range.Offset = MultiPageBuffer->Offset; desc.Range.Offset = MultiPageBuffer->Offset;
memcpy(desc.Range.PfnArray, MultiPageBuffer->PfnArray, PfnCount*sizeof(UINT64)); memcpy(desc.Range.PfnArray, MultiPageBuffer->PfnArray, PfnCount*sizeof(u64));
bufferList[0].Data = &desc; bufferList[0].Data = &desc;
bufferList[0].Length = descSize; bufferList[0].Length = descSize;
...@@ -987,7 +987,7 @@ VmbusChannelRecvPacket( ...@@ -987,7 +987,7 @@ VmbusChannelRecvPacket(
void * Buffer, void * Buffer,
u32 BufferLen, u32 BufferLen,
u32* BufferActualLen, u32* BufferActualLen,
UINT64* RequestId u64* RequestId
) )
{ {
VMPACKET_DESCRIPTOR desc; VMPACKET_DESCRIPTOR desc;
...@@ -1064,7 +1064,7 @@ VmbusChannelRecvPacketRaw( ...@@ -1064,7 +1064,7 @@ VmbusChannelRecvPacketRaw(
void * Buffer, void * Buffer,
u32 BufferLen, u32 BufferLen,
u32* BufferActualLen, u32* BufferActualLen,
UINT64* RequestId u64* RequestId
) )
{ {
VMPACKET_DESCRIPTOR desc; VMPACKET_DESCRIPTOR desc;
......
...@@ -37,7 +37,7 @@ typedef struct _VMBUS_CHANNEL_PACKET_PAGE_BUFFER { ...@@ -37,7 +37,7 @@ typedef struct _VMBUS_CHANNEL_PACKET_PAGE_BUFFER {
u16 DataOffset8; u16 DataOffset8;
u16 Length8; u16 Length8;
u16 Flags; u16 Flags;
UINT64 TransactionId; u64 TransactionId;
u32 Reserved; u32 Reserved;
u32 RangeCount; u32 RangeCount;
PAGE_BUFFER Range[MAX_PAGE_BUFFER_COUNT]; PAGE_BUFFER Range[MAX_PAGE_BUFFER_COUNT];
...@@ -50,7 +50,7 @@ typedef struct _VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER { ...@@ -50,7 +50,7 @@ typedef struct _VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER {
u16 DataOffset8; u16 DataOffset8;
u16 Length8; u16 Length8;
u16 Flags; u16 Flags;
UINT64 TransactionId; u64 TransactionId;
u32 Reserved; u32 Reserved;
u32 RangeCount; // Always 1 in this case u32 RangeCount; // Always 1 in this case
MULTIPAGE_BUFFER Range; MULTIPAGE_BUFFER Range;
...@@ -83,7 +83,7 @@ VmbusChannelSendPacket( ...@@ -83,7 +83,7 @@ VmbusChannelSendPacket(
VMBUS_CHANNEL *Channel, VMBUS_CHANNEL *Channel,
const void * Buffer, const void * Buffer,
u32 BufferLen, u32 BufferLen,
UINT64 RequestId, u64 RequestId,
VMBUS_PACKET_TYPE Type, VMBUS_PACKET_TYPE Type,
u32 Flags u32 Flags
); );
...@@ -95,7 +95,7 @@ VmbusChannelSendPacketPageBuffer( ...@@ -95,7 +95,7 @@ VmbusChannelSendPacketPageBuffer(
u32 PageCount, u32 PageCount,
void * Buffer, void * Buffer,
u32 BufferLen, u32 BufferLen,
UINT64 RequestId u64 RequestId
); );
static int static int
...@@ -104,7 +104,7 @@ VmbusChannelSendPacketMultiPageBuffer( ...@@ -104,7 +104,7 @@ VmbusChannelSendPacketMultiPageBuffer(
MULTIPAGE_BUFFER *MultiPageBuffer, MULTIPAGE_BUFFER *MultiPageBuffer,
void * Buffer, void * Buffer,
u32 BufferLen, u32 BufferLen,
UINT64 RequestId u64 RequestId
); );
static int static int
...@@ -127,7 +127,7 @@ VmbusChannelRecvPacket( ...@@ -127,7 +127,7 @@ VmbusChannelRecvPacket(
void * Buffer, void * Buffer,
u32 BufferLen, u32 BufferLen,
u32* BufferActualLen, u32* BufferActualLen,
UINT64* RequestId u64* RequestId
); );
static int static int
...@@ -136,7 +136,7 @@ VmbusChannelRecvPacketRaw( ...@@ -136,7 +136,7 @@ VmbusChannelRecvPacketRaw(
void * Buffer, void * Buffer,
u32 BufferLen, u32 BufferLen,
u32* BufferActualLen, u32* BufferActualLen,
UINT64* RequestId u64* RequestId
); );
static void static void
......
...@@ -58,7 +58,7 @@ IVmbusChannelSendPacket( ...@@ -58,7 +58,7 @@ IVmbusChannelSendPacket(
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
const void * Buffer, const void * Buffer,
u32 BufferLen, u32 BufferLen,
UINT64 RequestId, u64 RequestId,
u32 Type, u32 Type,
u32 Flags u32 Flags
) )
...@@ -78,7 +78,7 @@ IVmbusChannelSendPacketPageBuffer( ...@@ -78,7 +78,7 @@ IVmbusChannelSendPacketPageBuffer(
u32 PageCount, u32 PageCount,
void * Buffer, void * Buffer,
u32 BufferLen, u32 BufferLen,
UINT64 RequestId u64 RequestId
) )
{ {
return VmbusChannelSendPacketPageBuffer((VMBUS_CHANNEL*)Device->context, return VmbusChannelSendPacketPageBuffer((VMBUS_CHANNEL*)Device->context,
...@@ -95,7 +95,7 @@ IVmbusChannelSendPacketMultiPageBuffer( ...@@ -95,7 +95,7 @@ IVmbusChannelSendPacketMultiPageBuffer(
MULTIPAGE_BUFFER *MultiPageBuffer, MULTIPAGE_BUFFER *MultiPageBuffer,
void * Buffer, void * Buffer,
u32 BufferLen, u32 BufferLen,
UINT64 RequestId u64 RequestId
) )
{ {
return VmbusChannelSendPacketMultiPageBuffer((VMBUS_CHANNEL*)Device->context, return VmbusChannelSendPacketMultiPageBuffer((VMBUS_CHANNEL*)Device->context,
...@@ -111,7 +111,7 @@ IVmbusChannelRecvPacket ( ...@@ -111,7 +111,7 @@ IVmbusChannelRecvPacket (
void * Buffer, void * Buffer,
u32 BufferLen, u32 BufferLen,
u32* BufferActualLen, u32* BufferActualLen,
UINT64* RequestId u64* RequestId
) )
{ {
return VmbusChannelRecvPacket((VMBUS_CHANNEL*)Device->context, return VmbusChannelRecvPacket((VMBUS_CHANNEL*)Device->context,
...@@ -127,7 +127,7 @@ IVmbusChannelRecvPacketRaw( ...@@ -127,7 +127,7 @@ IVmbusChannelRecvPacketRaw(
void * Buffer, void * Buffer,
u32 BufferLen, u32 BufferLen,
u32* BufferActualLen, u32* BufferActualLen,
UINT64* RequestId u64* RequestId
) )
{ {
return VmbusChannelRecvPacketRaw((VMBUS_CHANNEL*)Device->context, return VmbusChannelRecvPacketRaw((VMBUS_CHANNEL*)Device->context,
......
...@@ -158,17 +158,17 @@ HvQueryHypervisorInfo ( ...@@ -158,17 +158,17 @@ HvQueryHypervisorInfo (
Invoke the specified hypercall Invoke the specified hypercall
--*/ --*/
static UINT64 static u64
HvDoHypercall ( HvDoHypercall (
UINT64 Control, u64 Control,
void* Input, void* Input,
void* Output void* Output
) )
{ {
#ifdef CONFIG_X86_64 #ifdef CONFIG_X86_64
UINT64 hvStatus=0; u64 hvStatus=0;
UINT64 inputAddress = (Input)? GetPhysicalAddress(Input) : 0; u64 inputAddress = (Input)? GetPhysicalAddress(Input) : 0;
UINT64 outputAddress = (Output)? GetPhysicalAddress(Output) : 0; u64 outputAddress = (Output)? GetPhysicalAddress(Output) : 0;
volatile void* hypercallPage = gHvContext.HypercallPage; volatile void* hypercallPage = gHvContext.HypercallPage;
DPRINT_DBG(VMBUS, "Hypercall <control %llx input phys %llx virt %p output phys %llx virt %p hypercall %p>", DPRINT_DBG(VMBUS, "Hypercall <control %llx input phys %llx virt %p output phys %llx virt %p hypercall %p>",
...@@ -192,10 +192,10 @@ HvDoHypercall ( ...@@ -192,10 +192,10 @@ HvDoHypercall (
u32 controlLo = Control & 0xFFFFFFFF; u32 controlLo = Control & 0xFFFFFFFF;
u32 hvStatusHi = 1; u32 hvStatusHi = 1;
u32 hvStatusLo = 1; u32 hvStatusLo = 1;
UINT64 inputAddress = (Input) ? GetPhysicalAddress(Input) : 0; u64 inputAddress = (Input) ? GetPhysicalAddress(Input) : 0;
u32 inputAddressHi = inputAddress >> 32; u32 inputAddressHi = inputAddress >> 32;
u32 inputAddressLo = inputAddress & 0xFFFFFFFF; u32 inputAddressLo = inputAddress & 0xFFFFFFFF;
UINT64 outputAddress = (Output) ?GetPhysicalAddress(Output) : 0; u64 outputAddress = (Output) ?GetPhysicalAddress(Output) : 0;
u32 outputAddressHi = outputAddress >> 32; u32 outputAddressHi = outputAddress >> 32;
u32 outputAddressLo = outputAddress & 0xFFFFFFFF; u32 outputAddressLo = outputAddress & 0xFFFFFFFF;
volatile void* hypercallPage = gHvContext.HypercallPage; volatile void* hypercallPage = gHvContext.HypercallPage;
...@@ -208,9 +208,9 @@ HvDoHypercall ( ...@@ -208,9 +208,9 @@ HvDoHypercall (
__asm__ __volatile__ ("call *%8" : "=d"(hvStatusHi), "=a"(hvStatusLo) : "d" (controlHi), "a" (controlLo), "b" (inputAddressHi), "c" (inputAddressLo), "D"(outputAddressHi), "S"(outputAddressLo), "m" (hypercallPage)); __asm__ __volatile__ ("call *%8" : "=d"(hvStatusHi), "=a"(hvStatusLo) : "d" (controlHi), "a" (controlLo), "b" (inputAddressHi), "c" (inputAddressLo), "D"(outputAddressHi), "S"(outputAddressLo), "m" (hypercallPage));
DPRINT_DBG(VMBUS, "Hypercall <return %llx>", hvStatusLo | ((UINT64)hvStatusHi << 32)); DPRINT_DBG(VMBUS, "Hypercall <return %llx>", hvStatusLo | ((u64)hvStatusHi << 32));
return (hvStatusLo | ((UINT64)hvStatusHi << 32)); return (hvStatusLo | ((u64)hvStatusHi << 32));
#endif // x86_64 #endif // x86_64
} }
...@@ -401,7 +401,7 @@ HvPostMessage( ...@@ -401,7 +401,7 @@ HvPostMessage(
) )
{ {
struct alignedInput { struct alignedInput {
UINT64 alignment8; u64 alignment8;
HV_INPUT_POST_MESSAGE msg; HV_INPUT_POST_MESSAGE msg;
}; };
...@@ -474,12 +474,12 @@ HvSynicInit ( ...@@ -474,12 +474,12 @@ HvSynicInit (
u32 irqVector u32 irqVector
) )
{ {
UINT64 version; u64 version;
HV_SYNIC_SIMP simp; HV_SYNIC_SIMP simp;
HV_SYNIC_SIEFP siefp; HV_SYNIC_SIEFP siefp;
HV_SYNIC_SINT sharedSint; HV_SYNIC_SINT sharedSint;
HV_SYNIC_SCONTROL sctrl; HV_SYNIC_SCONTROL sctrl;
UINT64 guestID; u64 guestID;
int ret=0; int ret=0;
DPRINT_ENTER(VMBUS); DPRINT_ENTER(VMBUS);
......
...@@ -60,11 +60,11 @@ enum ...@@ -60,11 +60,11 @@ enum
#define HV_XENLINUX_GUEST_ID_LO 0x00000000 #define HV_XENLINUX_GUEST_ID_LO 0x00000000
#define HV_XENLINUX_GUEST_ID_HI 0x0B00B135 #define HV_XENLINUX_GUEST_ID_HI 0x0B00B135
#define HV_XENLINUX_GUEST_ID (((UINT64)HV_XENLINUX_GUEST_ID_HI << 32) | HV_XENLINUX_GUEST_ID_LO) #define HV_XENLINUX_GUEST_ID (((u64)HV_XENLINUX_GUEST_ID_HI << 32) | HV_XENLINUX_GUEST_ID_LO)
#define HV_LINUX_GUEST_ID_LO 0x00000000 #define HV_LINUX_GUEST_ID_LO 0x00000000
#define HV_LINUX_GUEST_ID_HI 0xB16B00B5 #define HV_LINUX_GUEST_ID_HI 0xB16B00B5
#define HV_LINUX_GUEST_ID (((UINT64)HV_LINUX_GUEST_ID_HI << 32) | HV_LINUX_GUEST_ID_LO) #define HV_LINUX_GUEST_ID (((u64)HV_LINUX_GUEST_ID_HI << 32) | HV_LINUX_GUEST_ID_LO)
#define HV_CPU_POWER_MANAGEMENT (1 << 0) #define HV_CPU_POWER_MANAGEMENT (1 << 0)
#define HV_RECOMMENDATIONS_MAX 4 #define HV_RECOMMENDATIONS_MAX 4
...@@ -73,7 +73,7 @@ enum ...@@ -73,7 +73,7 @@ enum
#define HV_CAPS_MAX 8 #define HV_CAPS_MAX 8
#define HV_HYPERCALL_PARAM_ALIGN sizeof(UINT64) #define HV_HYPERCALL_PARAM_ALIGN sizeof(u64)
// //
// Service definitions // Service definitions
...@@ -105,12 +105,12 @@ static const GUID VMBUS_SERVICE_ID = {.Data = {0xb8, 0x80, 0x81, 0x62, 0x8d, 0x3 ...@@ -105,12 +105,12 @@ static const GUID VMBUS_SERVICE_ID = {.Data = {0xb8, 0x80, 0x81, 0x62, 0x8d, 0x3
typedef struct { typedef struct {
UINT64 Align8; u64 Align8;
HV_INPUT_SIGNAL_EVENT Event; HV_INPUT_SIGNAL_EVENT Event;
} HV_INPUT_SIGNAL_EVENT_BUFFER; } HV_INPUT_SIGNAL_EVENT_BUFFER;
typedef struct { typedef struct {
UINT64 GuestId; // XenLinux or native Linux. If XenLinux, the hypercall and synic pages has already been initialized u64 GuestId; // XenLinux or native Linux. If XenLinux, the hypercall and synic pages has already been initialized
void* HypercallPage; void* HypercallPage;
BOOL SynICInitialized; BOOL SynICInitialized;
...@@ -138,7 +138,7 @@ static inline unsigned long long ReadMsr(int msr) ...@@ -138,7 +138,7 @@ static inline unsigned long long ReadMsr(int msr)
return val; return val;
} }
static inline void WriteMsr(int msr, UINT64 val) static inline void WriteMsr(int msr, u64 val)
{ {
WRMSR(msr, val); WRMSR(msr, val);
......
...@@ -114,7 +114,7 @@ NetVscOnReceiveCompletion( ...@@ -114,7 +114,7 @@ NetVscOnReceiveCompletion(
static void static void
NetVscSendReceiveCompletion( NetVscSendReceiveCompletion(
DEVICE_OBJECT *Device, DEVICE_OBJECT *Device,
UINT64 TransactionId u64 TransactionId
); );
static inline NETVSC_DEVICE* AllocNetDevice(DEVICE_OBJECT *Device) static inline NETVSC_DEVICE* AllocNetDevice(DEVICE_OBJECT *Device)
...@@ -1286,7 +1286,7 @@ NetVscOnReceive( ...@@ -1286,7 +1286,7 @@ NetVscOnReceive(
static void static void
NetVscSendReceiveCompletion( NetVscSendReceiveCompletion(
DEVICE_OBJECT *Device, DEVICE_OBJECT *Device,
UINT64 TransactionId u64 TransactionId
) )
{ {
NVSP_MESSAGE recvcompMessage; NVSP_MESSAGE recvcompMessage;
...@@ -1343,7 +1343,7 @@ NetVscOnReceiveCompletion( ...@@ -1343,7 +1343,7 @@ NetVscOnReceiveCompletion(
NETVSC_PACKET *packet = (NETVSC_PACKET*)Context; NETVSC_PACKET *packet = (NETVSC_PACKET*)Context;
DEVICE_OBJECT *device = (DEVICE_OBJECT*)packet->Device; DEVICE_OBJECT *device = (DEVICE_OBJECT*)packet->Device;
NETVSC_DEVICE* netDevice; NETVSC_DEVICE* netDevice;
UINT64 transactionId=0; u64 transactionId=0;
BOOL fSendReceiveComp = FALSE; BOOL fSendReceiveComp = FALSE;
DPRINT_ENTER(NETVSC); DPRINT_ENTER(NETVSC);
...@@ -1403,10 +1403,10 @@ NetVscOnChannelCallback( ...@@ -1403,10 +1403,10 @@ NetVscOnChannelCallback(
NETVSC_DEVICE *netDevice; NETVSC_DEVICE *netDevice;
u32 bytesRecvd; u32 bytesRecvd;
UINT64 requestId; u64 requestId;
UCHAR packet[netPacketSize]; unsigned char packet[netPacketSize];
VMPACKET_DESCRIPTOR *desc; VMPACKET_DESCRIPTOR *desc;
UCHAR *buffer=packet; unsigned char *buffer=packet;
int bufferlen=netPacketSize; int bufferlen=netPacketSize;
......
...@@ -82,7 +82,7 @@ typedef struct _NETVSC_DEVICE { ...@@ -82,7 +82,7 @@ typedef struct _NETVSC_DEVICE {
NVSP_MESSAGE ChannelInitPacket; NVSP_MESSAGE ChannelInitPacket;
NVSP_MESSAGE RevokePacket; NVSP_MESSAGE RevokePacket;
//UCHAR HwMacAddr[HW_MACADDR_LEN]; //unsigned char HwMacAddr[HW_MACADDR_LEN];
// Holds rndis device info // Holds rndis device info
void *Extension; void *Extension;
......
...@@ -184,13 +184,13 @@ GetRingBufferSize(RING_BUFFER_INFO* RingInfo) ...@@ -184,13 +184,13 @@ GetRingBufferSize(RING_BUFFER_INFO* RingInfo)
GetRingBufferIndices() GetRingBufferIndices()
Description: Description:
Get the read and write indices as UINT64 of the specified ring buffer Get the read and write indices as u64 of the specified ring buffer
--*/ --*/
static inline UINT64 static inline u64
GetRingBufferIndices(RING_BUFFER_INFO* RingInfo) GetRingBufferIndices(RING_BUFFER_INFO* RingInfo)
{ {
return ((UINT64)RingInfo->RingBuffer->WriteIndex << 32) || RingInfo->RingBuffer->ReadIndex; return ((u64)RingInfo->RingBuffer->WriteIndex << 32) || RingInfo->RingBuffer->ReadIndex;
} }
...@@ -359,7 +359,7 @@ RingBufferWrite( ...@@ -359,7 +359,7 @@ RingBufferWrite(
u32 totalBytesToWrite=0; u32 totalBytesToWrite=0;
volatile u32 nextWriteLocation; volatile u32 nextWriteLocation;
UINT64 prevIndices=0; u64 prevIndices=0;
DPRINT_ENTER(VMBUS); DPRINT_ENTER(VMBUS);
...@@ -368,7 +368,7 @@ RingBufferWrite( ...@@ -368,7 +368,7 @@ RingBufferWrite(
totalBytesToWrite += SgBuffers[i].Length; totalBytesToWrite += SgBuffers[i].Length;
} }
totalBytesToWrite += sizeof(UINT64); totalBytesToWrite += sizeof(u64);
SpinlockAcquire(OutRingInfo->RingLock); SpinlockAcquire(OutRingInfo->RingLock);
...@@ -408,7 +408,7 @@ RingBufferWrite( ...@@ -408,7 +408,7 @@ RingBufferWrite(
nextWriteLocation = CopyToRingBuffer(OutRingInfo, nextWriteLocation = CopyToRingBuffer(OutRingInfo,
nextWriteLocation, nextWriteLocation,
&prevIndices, &prevIndices,
sizeof(UINT64)); sizeof(u64));
// Make sure we flush all writes before updating the writeIndex // Make sure we flush all writes before updating the writeIndex
MemoryFence(); MemoryFence();
...@@ -494,7 +494,7 @@ RingBufferRead( ...@@ -494,7 +494,7 @@ RingBufferRead(
u32 bytesAvailToWrite; u32 bytesAvailToWrite;
u32 bytesAvailToRead; u32 bytesAvailToRead;
u32 nextReadLocation=0; u32 nextReadLocation=0;
UINT64 prevIndices=0; u64 prevIndices=0;
ASSERT(BufferLen > 0); ASSERT(BufferLen > 0);
...@@ -525,7 +525,7 @@ RingBufferRead( ...@@ -525,7 +525,7 @@ RingBufferRead(
nextReadLocation = CopyFromRingBuffer(InRingInfo, nextReadLocation = CopyFromRingBuffer(InRingInfo,
&prevIndices, &prevIndices,
sizeof(UINT64), sizeof(u64),
nextReadLocation); nextReadLocation);
// Make sure all reads are done before we update the read index since // Make sure all reads are done before we update the read index since
......
...@@ -56,7 +56,7 @@ typedef struct _RNDIS_DEVICE { ...@@ -56,7 +56,7 @@ typedef struct _RNDIS_DEVICE {
HANDLE RequestLock; HANDLE RequestLock;
LIST_ENTRY RequestList; LIST_ENTRY RequestList;
UCHAR HwMacAddr[HW_MACADDR_LEN]; unsigned char HwMacAddr[HW_MACADDR_LEN];
} RNDIS_DEVICE; } RNDIS_DEVICE;
......
...@@ -63,8 +63,8 @@ typedef struct _STORVSC_DEVICE{ ...@@ -63,8 +63,8 @@ typedef struct _STORVSC_DEVICE{
// Each unique Port/Path/Target represents 1 channel ie scsi controller. In reality, the pathid, targetid is always 0 // Each unique Port/Path/Target represents 1 channel ie scsi controller. In reality, the pathid, targetid is always 0
// and the port is set by us // and the port is set by us
ULONG PortNumber; ULONG PortNumber;
UCHAR PathId; unsigned char PathId;
UCHAR TargetId; unsigned char TargetId;
//LIST_ENTRY OutstandingRequestList; //LIST_ENTRY OutstandingRequestList;
//HANDLE OutstandingRequestLock; //HANDLE OutstandingRequestLock;
...@@ -279,9 +279,9 @@ StorVscInitialize( ...@@ -279,9 +279,9 @@ StorVscInitialize(
storDriver->RequestExtSize = sizeof(STORVSC_REQUEST_EXTENSION); storDriver->RequestExtSize = sizeof(STORVSC_REQUEST_EXTENSION);
// Divide the ring buffer data size (which is 1 page less than the ring buffer size since that page is reserved for the ring buffer indices) // Divide the ring buffer data size (which is 1 page less than the ring buffer size since that page is reserved for the ring buffer indices)
// by the max request size (which is VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER + VSTOR_PACKET + UINT64) // by the max request size (which is VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER + VSTOR_PACKET + u64)
storDriver->MaxOutstandingRequestsPerChannel = storDriver->MaxOutstandingRequestsPerChannel =
((storDriver->RingBufferSize - PAGE_SIZE) / ALIGN_UP(MAX_MULTIPAGE_BUFFER_PACKET + sizeof(VSTOR_PACKET) + sizeof(UINT64),sizeof(UINT64))); ((storDriver->RingBufferSize - PAGE_SIZE) / ALIGN_UP(MAX_MULTIPAGE_BUFFER_PACKET + sizeof(VSTOR_PACKET) + sizeof(u64),sizeof(u64)));
DPRINT_INFO(STORVSC, "max io %u, currently %u\n", storDriver->MaxOutstandingRequestsPerChannel, STORVSC_MAX_IO_REQUESTS); DPRINT_INFO(STORVSC, "max io %u, currently %u\n", storDriver->MaxOutstandingRequestsPerChannel, STORVSC_MAX_IO_REQUESTS);
...@@ -909,8 +909,8 @@ StorVscOnChannelCallback( ...@@ -909,8 +909,8 @@ StorVscOnChannelCallback(
DEVICE_OBJECT *device = (DEVICE_OBJECT*)Context; DEVICE_OBJECT *device = (DEVICE_OBJECT*)Context;
STORVSC_DEVICE *storDevice; STORVSC_DEVICE *storDevice;
u32 bytesRecvd; u32 bytesRecvd;
UINT64 requestId; u64 requestId;
UCHAR packet[ALIGN_UP(sizeof(VSTOR_PACKET),8)]; unsigned char packet[ALIGN_UP(sizeof(VSTOR_PACKET),8)];
STORVSC_REQUEST_EXTENSION *request; STORVSC_REQUEST_EXTENSION *request;
DPRINT_ENTER(STORVSC); DPRINT_ENTER(STORVSC);
......
...@@ -148,7 +148,7 @@ typedef struct _VMBUS_CHANNEL_OPEN_CHANNEL ...@@ -148,7 +148,7 @@ typedef struct _VMBUS_CHANNEL_OPEN_CHANNEL
// //
// User-specific data to be passed along to the server endpoint. // User-specific data to be passed along to the server endpoint.
// //
UCHAR UserData[MAX_USER_DEFINED_BYTES]; unsigned char UserData[MAX_USER_DEFINED_BYTES];
} VMBUS_CHANNEL_OPEN_CHANNEL, *PVMBUS_CHANNEL_OPEN_CHANNEL; } VMBUS_CHANNEL_OPEN_CHANNEL, *PVMBUS_CHANNEL_OPEN_CHANNEL;
...@@ -203,7 +203,7 @@ typedef struct _VMBUS_CHANNEL_GPADL_BODY ...@@ -203,7 +203,7 @@ typedef struct _VMBUS_CHANNEL_GPADL_BODY
VMBUS_CHANNEL_MESSAGE_HEADER Header; VMBUS_CHANNEL_MESSAGE_HEADER Header;
u32 MessageNumber; u32 MessageNumber;
u32 Gpadl; u32 Gpadl;
UINT64 Pfn[0]; u64 Pfn[0];
} VMBUS_CHANNEL_GPADL_BODY, *PVMBUS_CHANNEL_GPADL_BODY; } VMBUS_CHANNEL_GPADL_BODY, *PVMBUS_CHANNEL_GPADL_BODY;
...@@ -233,7 +233,7 @@ typedef struct _VMBUS_CHANNEL_VIEW_RANGE_ADD ...@@ -233,7 +233,7 @@ 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; u64 ViewRangeLength;
u32 ChildRelId; u32 ChildRelId;
} VMBUS_CHANNEL_VIEW_RANGE_ADD, *PVMBUS_CHANNEL_VIEW_RANGE_ADD; } VMBUS_CHANNEL_VIEW_RANGE_ADD, *PVMBUS_CHANNEL_VIEW_RANGE_ADD;
...@@ -256,9 +256,9 @@ typedef struct _VMBUS_CHANNEL_INITIATE_CONTACT ...@@ -256,9 +256,9 @@ typedef struct _VMBUS_CHANNEL_INITIATE_CONTACT
VMBUS_CHANNEL_MESSAGE_HEADER Header; VMBUS_CHANNEL_MESSAGE_HEADER Header;
u32 VMBusVersionRequested; u32 VMBusVersionRequested;
u32 Padding2; u32 Padding2;
UINT64 InterruptPage; u64 InterruptPage;
UINT64 MonitorPage1; u64 MonitorPage1;
UINT64 MonitorPage2; u64 MonitorPage2;
} VMBUS_CHANNEL_INITIATE_CONTACT, *PVMBUS_CHANNEL_INITIATE_CONTACT; } VMBUS_CHANNEL_INITIATE_CONTACT, *PVMBUS_CHANNEL_INITIATE_CONTACT;
typedef struct _VMBUS_CHANNEL_VERSION_RESPONSE typedef struct _VMBUS_CHANNEL_VERSION_RESPONSE
......
...@@ -28,5 +28,5 @@ ...@@ -28,5 +28,5 @@
// //
// Time in the hypervisor is measured in 100 nanosecond units // Time in the hypervisor is measured in 100 nanosecond units
// //
typedef UINT64 HV_NANO100_TIME, *PHV_NANO100_TIME; typedef u64 HV_NANO100_TIME, *PHV_NANO100_TIME;
typedef UINT64 HV_NANO100_DURATION, *PHV_NANO100_DURATION; typedef u64 HV_NANO100_DURATION, *PHV_NANO100_DURATION;
...@@ -44,7 +44,7 @@ typedef struct _HV_INPUT_POST_MESSAGE ...@@ -44,7 +44,7 @@ typedef struct _HV_INPUT_POST_MESSAGE
u32 Reserved; u32 Reserved;
HV_MESSAGE_TYPE MessageType; HV_MESSAGE_TYPE MessageType;
u32 PayloadSize; u32 PayloadSize;
UINT64 Payload[HV_MESSAGE_PAYLOAD_QWORD_COUNT]; u64 Payload[HV_MESSAGE_PAYLOAD_QWORD_COUNT];
} HV_INPUT_POST_MESSAGE, *PHV_INPUT_POST_MESSAGE; } HV_INPUT_POST_MESSAGE, *PHV_INPUT_POST_MESSAGE;
......
...@@ -57,15 +57,15 @@ typedef enum _HV_GUEST_OS_MICROSOFT_IDS ...@@ -57,15 +57,15 @@ typedef enum _HV_GUEST_OS_MICROSOFT_IDS
typedef union _HV_X64_MSR_GUEST_OS_ID_CONTENTS typedef union _HV_X64_MSR_GUEST_OS_ID_CONTENTS
{ {
UINT64 AsUINT64; u64 AsUINT64;
struct struct
{ {
UINT64 BuildNumber : 16; u64 BuildNumber : 16;
UINT64 ServiceVersion : 8; // Service Pack, etc. u64 ServiceVersion : 8; // Service Pack, etc.
UINT64 MinorVersion : 8; u64 MinorVersion : 8;
UINT64 MajorVersion : 8; u64 MajorVersion : 8;
UINT64 OsId : 8; // HV_GUEST_OS_MICROSOFT_IDS (If Vendor=MS) u64 OsId : 8; // HV_GUEST_OS_MICROSOFT_IDS (If Vendor=MS)
UINT64 VendorId : 16; // HV_GUEST_OS_VENDOR u64 VendorId : 16; // HV_GUEST_OS_VENDOR
}; };
} HV_X64_MSR_GUEST_OS_ID_CONTENTS, *PHV_X64_MSR_GUEST_OS_ID_CONTENTS; } HV_X64_MSR_GUEST_OS_ID_CONTENTS, *PHV_X64_MSR_GUEST_OS_ID_CONTENTS;
...@@ -76,11 +76,11 @@ typedef union _HV_X64_MSR_GUEST_OS_ID_CONTENTS ...@@ -76,11 +76,11 @@ typedef union _HV_X64_MSR_GUEST_OS_ID_CONTENTS
typedef union _HV_X64_MSR_HYPERCALL_CONTENTS typedef union _HV_X64_MSR_HYPERCALL_CONTENTS
{ {
UINT64 AsUINT64; u64 AsUINT64;
struct struct
{ {
UINT64 Enable : 1; u64 Enable : 1;
UINT64 Reserved : 11; u64 Reserved : 11;
UINT64 GuestPhysicalAddress : 52; u64 GuestPhysicalAddress : 52;
}; };
} HV_X64_MSR_HYPERCALL_CONTENTS, *PHV_X64_MSR_HYPERCALL_CONTENTS; } HV_X64_MSR_HYPERCALL_CONTENTS, *PHV_X64_MSR_HYPERCALL_CONTENTS;
...@@ -145,7 +145,7 @@ typedef u32 HV_SYNIC_SINT_INDEX, *PHV_SYNIC_SINT_INDEX; ...@@ -145,7 +145,7 @@ typedef u32 HV_SYNIC_SINT_INDEX, *PHV_SYNIC_SINT_INDEX;
// Define partition identifier type. // Define partition identifier type.
// //
typedef UINT64 HV_PARTITION_ID, *PHV_PARTITION_ID; typedef u64 HV_PARTITION_ID, *PHV_PARTITION_ID;
// //
// Define invalid partition identifier. // Define invalid partition identifier.
...@@ -210,7 +210,7 @@ typedef struct _HV_PORT_INFO ...@@ -210,7 +210,7 @@ typedef struct _HV_PORT_INFO
{ {
HV_SYNIC_SINT_INDEX TargetSint; HV_SYNIC_SINT_INDEX TargetSint;
HV_VP_INDEX TargetVp; HV_VP_INDEX TargetVp;
UINT64 RsvdZ; u64 RsvdZ;
} MessagePortInfo; } MessagePortInfo;
struct struct
...@@ -225,7 +225,7 @@ typedef struct _HV_PORT_INFO ...@@ -225,7 +225,7 @@ typedef struct _HV_PORT_INFO
struct struct
{ {
HV_GPA MonitorAddress; HV_GPA MonitorAddress;
UINT64 RsvdZ; u64 RsvdZ;
} MonitorPortInfo; } MonitorPortInfo;
}; };
} HV_PORT_INFO, *PHV_PORT_INFO; } HV_PORT_INFO, *PHV_PORT_INFO;
...@@ -241,12 +241,12 @@ typedef struct _HV_CONNECTION_INFO ...@@ -241,12 +241,12 @@ typedef struct _HV_CONNECTION_INFO
{ {
struct struct
{ {
UINT64 RsvdZ; u64 RsvdZ;
} MessageConnectionInfo; } MessageConnectionInfo;
struct struct
{ {
UINT64 RsvdZ; u64 RsvdZ;
} EventConnectionInfo; } EventConnectionInfo;
struct struct
...@@ -311,7 +311,7 @@ typedef struct _HV_MESSAGE ...@@ -311,7 +311,7 @@ typedef struct _HV_MESSAGE
HV_MESSAGE_HEADER Header; HV_MESSAGE_HEADER Header;
union union
{ {
UINT64 Payload[HV_MESSAGE_PAYLOAD_QWORD_COUNT]; u64 Payload[HV_MESSAGE_PAYLOAD_QWORD_COUNT];
} u ; } u ;
} HV_MESSAGE, *PHV_MESSAGE; } HV_MESSAGE, *PHV_MESSAGE;
...@@ -357,11 +357,11 @@ typedef struct _HV_SYNIC_EVENT_FLAGS_PAGE ...@@ -357,11 +357,11 @@ typedef struct _HV_SYNIC_EVENT_FLAGS_PAGE
// //
typedef union _HV_SYNIC_SCONTROL typedef union _HV_SYNIC_SCONTROL
{ {
UINT64 AsUINT64; u64 AsUINT64;
struct struct
{ {
UINT64 Enable:1; u64 Enable:1;
UINT64 Reserved:63; u64 Reserved:63;
}; };
} HV_SYNIC_SCONTROL, *PHV_SYNIC_SCONTROL; } HV_SYNIC_SCONTROL, *PHV_SYNIC_SCONTROL;
...@@ -371,14 +371,14 @@ typedef union _HV_SYNIC_SCONTROL ...@@ -371,14 +371,14 @@ typedef union _HV_SYNIC_SCONTROL
typedef union _HV_SYNIC_SINT typedef union _HV_SYNIC_SINT
{ {
UINT64 AsUINT64; u64 AsUINT64;
struct struct
{ {
UINT64 Vector :8; u64 Vector :8;
UINT64 Reserved1 :8; u64 Reserved1 :8;
UINT64 Masked :1; u64 Masked :1;
UINT64 AutoEoi :1; u64 AutoEoi :1;
UINT64 Reserved2 :46; u64 Reserved2 :46;
}; };
} HV_SYNIC_SINT, *PHV_SYNIC_SINT; } HV_SYNIC_SINT, *PHV_SYNIC_SINT;
...@@ -388,12 +388,12 @@ typedef union _HV_SYNIC_SINT ...@@ -388,12 +388,12 @@ typedef union _HV_SYNIC_SINT
typedef union _HV_SYNIC_SIMP typedef union _HV_SYNIC_SIMP
{ {
UINT64 AsUINT64; u64 AsUINT64;
struct struct
{ {
UINT64 SimpEnabled : 1; u64 SimpEnabled : 1;
UINT64 Preserved : 11; u64 Preserved : 11;
UINT64 BaseSimpGpa : 52; u64 BaseSimpGpa : 52;
}; };
} HV_SYNIC_SIMP, *PHV_SYNIC_SIMP; } HV_SYNIC_SIMP, *PHV_SYNIC_SIMP;
...@@ -403,12 +403,12 @@ typedef union _HV_SYNIC_SIMP ...@@ -403,12 +403,12 @@ typedef union _HV_SYNIC_SIMP
typedef union _HV_SYNIC_SIEFP typedef union _HV_SYNIC_SIEFP
{ {
UINT64 AsUINT64; u64 AsUINT64;
struct struct
{ {
UINT64 SiefpEnabled : 1; u64 SiefpEnabled : 1;
UINT64 Preserved : 11; u64 Preserved : 11;
UINT64 BaseSiefpGpa : 52; u64 BaseSiefpGpa : 52;
}; };
} HV_SYNIC_SIEFP, *PHV_SYNIC_SIEFP; } HV_SYNIC_SIEFP, *PHV_SYNIC_SIEFP;
...@@ -418,7 +418,7 @@ typedef union _HV_SYNIC_SIEFP ...@@ -418,7 +418,7 @@ typedef union _HV_SYNIC_SIEFP
typedef union _HV_MONITOR_TRIGGER_GROUP typedef union _HV_MONITOR_TRIGGER_GROUP
{ {
UINT64 AsUINT64; u64 AsUINT64;
struct struct
{ {
...@@ -474,12 +474,12 @@ typedef struct _HV_MONITOR_PAGE ...@@ -474,12 +474,12 @@ typedef struct _HV_MONITOR_PAGE
u32 RsvdZ1; u32 RsvdZ1;
HV_MONITOR_TRIGGER_GROUP TriggerGroup[4]; HV_MONITOR_TRIGGER_GROUP TriggerGroup[4];
UINT64 RsvdZ2[3]; u64 RsvdZ2[3];
s32 NextCheckTime[4][32]; s32 NextCheckTime[4][32];
u16 Latency[4][32]; u16 Latency[4][32];
UINT64 RsvdZ3[32]; u64 RsvdZ3[32];
HV_MONITOR_PARAMETER Parameter[4][32]; HV_MONITOR_PARAMETER Parameter[4][32];
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#pragma once #pragma once
typedef UINT64 HV_GPA, *PHV_GPA; typedef u64 HV_GPA, *PHV_GPA;
#define HV_X64_PAGE_SIZE (4096) #define HV_X64_PAGE_SIZE (4096)
#define HV_PAGE_SIZE HV_X64_PAGE_SIZE #define HV_PAGE_SIZE HV_X64_PAGE_SIZE
......
...@@ -260,8 +260,8 @@ typedef DLIST_ENTRY *PLIST_ENTRY; ...@@ -260,8 +260,8 @@ typedef DLIST_ENTRY *PLIST_ENTRY;
#ifndef CONTAINING_RECORD #ifndef CONTAINING_RECORD
#define CONTAINING_RECORD(address, type, field) ((type *)( \ #define CONTAINING_RECORD(address, type, field) ((type *)( \
(PCHAR)(address) - \ (char *)(address) - \
(PCHAR)(&((type *)0)->field))) (char *)(&((type *)0)->field)))
#endif /* CONTAINING_RECORD */ #endif /* CONTAINING_RECORD */
#endif /* _LIST_H_ */ #endif /* _LIST_H_ */
......
...@@ -79,12 +79,12 @@ typedef struct _NETVSC_PACKET { ...@@ -79,12 +79,12 @@ typedef struct _NETVSC_PACKET {
union { union {
struct{ struct{
UINT64 ReceiveCompletionTid; u64 ReceiveCompletionTid;
void * ReceiveCompletionContext; void * ReceiveCompletionContext;
PFN_ON_SENDRECVCOMPLETION OnReceiveCompletion; PFN_ON_SENDRECVCOMPLETION OnReceiveCompletion;
} Recv; } Recv;
struct{ struct{
UINT64 SendCompletionTid; u64 SendCompletionTid;
void * SendCompletionContext; void * SendCompletionContext;
PFN_ON_SENDRECVCOMPLETION OnSendCompletion; PFN_ON_SENDRECVCOMPLETION OnSendCompletion;
} Send; } Send;
...@@ -130,7 +130,7 @@ typedef struct _NETVSC_DRIVER_OBJECT { ...@@ -130,7 +130,7 @@ typedef struct _NETVSC_DRIVER_OBJECT {
typedef struct _NETVSC_DEVICE_INFO { typedef struct _NETVSC_DEVICE_INFO {
UCHAR MacAddr[6]; unsigned char MacAddr[6];
BOOL LinkState; // 0 - link up, 1 - link down BOOL LinkState; // 0 - link up, 1 - link down
} NETVSC_DEVICE_INFO; } NETVSC_DEVICE_INFO;
......
...@@ -80,7 +80,7 @@ typedef struct _STORVSC_REQUEST { ...@@ -80,7 +80,7 @@ typedef struct _STORVSC_REQUEST {
u32 Status; u32 Status;
u32 BytesXfer; u32 BytesXfer;
UCHAR* SenseBuffer; unsigned char* SenseBuffer;
u32 SenseBufferSize; u32 SenseBufferSize;
void * Context; void * Context;
...@@ -118,8 +118,8 @@ typedef struct _STORVSC_DRIVER_OBJECT { ...@@ -118,8 +118,8 @@ typedef struct _STORVSC_DRIVER_OBJECT {
typedef struct _STORVSC_DEVICE_INFO { typedef struct _STORVSC_DEVICE_INFO {
ULONG PortNumber; ULONG PortNumber;
UCHAR PathId; unsigned char PathId;
UCHAR TargetId; unsigned char TargetId;
} STORVSC_DEVICE_INFO; } STORVSC_DEVICE_INFO;
// //
......
...@@ -51,7 +51,7 @@ typedef struct _DEVICE_OBJECT *PDEVICE_OBJECT; ...@@ -51,7 +51,7 @@ typedef struct _DEVICE_OBJECT *PDEVICE_OBJECT;
typedef struct _PAGE_BUFFER { typedef struct _PAGE_BUFFER {
u32 Length; u32 Length;
u32 Offset; u32 Offset;
UINT64 Pfn; u64 Pfn;
} PAGE_BUFFER; } PAGE_BUFFER;
// Multiple-page buffer // Multiple-page buffer
...@@ -59,7 +59,7 @@ typedef struct _MULTIPAGE_BUFFER { ...@@ -59,7 +59,7 @@ typedef struct _MULTIPAGE_BUFFER {
// Length and Offset determines the # of pfns in the array // Length and Offset determines the # of pfns in the array
u32 Length; u32 Length;
u32 Offset; u32 Offset;
UINT64 PfnArray[MAX_MULTIPAGE_BUFFER_COUNT]; u64 PfnArray[MAX_MULTIPAGE_BUFFER_COUNT];
}MULTIPAGE_BUFFER; }MULTIPAGE_BUFFER;
//0x18 includes the proprietary packet header //0x18 includes the proprietary packet header
...@@ -108,7 +108,7 @@ typedef int (*VMBUS_CHANNEL_SEND_PACKET)( ...@@ -108,7 +108,7 @@ typedef int (*VMBUS_CHANNEL_SEND_PACKET)(
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
const void * Buffer, const void * Buffer,
u32 BufferLen, u32 BufferLen,
UINT64 RequestId, u64 RequestId,
u32 Type, u32 Type,
u32 Flags u32 Flags
); );
...@@ -119,7 +119,7 @@ typedef int (*VMBUS_CHANNEL_SEND_PACKET_PAGEBUFFER)( ...@@ -119,7 +119,7 @@ typedef int (*VMBUS_CHANNEL_SEND_PACKET_PAGEBUFFER)(
u32 PageCount, u32 PageCount,
void * Buffer, void * Buffer,
u32 BufferLen, u32 BufferLen,
UINT64 RequestId u64 RequestId
); );
typedef int (*VMBUS_CHANNEL_SEND_PACKET_MULTIPAGEBUFFER)( typedef int (*VMBUS_CHANNEL_SEND_PACKET_MULTIPAGEBUFFER)(
...@@ -127,7 +127,7 @@ typedef int (*VMBUS_CHANNEL_SEND_PACKET_MULTIPAGEBUFFER)( ...@@ -127,7 +127,7 @@ typedef int (*VMBUS_CHANNEL_SEND_PACKET_MULTIPAGEBUFFER)(
MULTIPAGE_BUFFER *MultiPageBuffer, MULTIPAGE_BUFFER *MultiPageBuffer,
void * Buffer, void * Buffer,
u32 BufferLen, u32 BufferLen,
UINT64 RequestId u64 RequestId
); );
typedef int (*VMBUS_CHANNEL_RECV_PACKET)( typedef int (*VMBUS_CHANNEL_RECV_PACKET)(
...@@ -135,7 +135,7 @@ typedef int (*VMBUS_CHANNEL_RECV_PACKET)( ...@@ -135,7 +135,7 @@ typedef int (*VMBUS_CHANNEL_RECV_PACKET)(
void * Buffer, void * Buffer,
u32 BufferLen, u32 BufferLen,
u32* BufferActualLen, u32* BufferActualLen,
UINT64* RequestId u64* RequestId
); );
typedef int (*VMBUS_CHANNEL_RECV_PACKET_PAW)( typedef int (*VMBUS_CHANNEL_RECV_PACKET_PAW)(
...@@ -143,7 +143,7 @@ typedef int (*VMBUS_CHANNEL_RECV_PACKET_PAW)( ...@@ -143,7 +143,7 @@ typedef int (*VMBUS_CHANNEL_RECV_PACKET_PAW)(
void * Buffer, void * Buffer,
u32 BufferLen, u32 BufferLen,
u32* BufferActualLen, u32* BufferActualLen,
UINT64* RequestId u64* RequestId
); );
typedef int (*VMBUS_CHANNEL_ESTABLISH_GPADL)( typedef int (*VMBUS_CHANNEL_ESTABLISH_GPADL)(
......
...@@ -66,7 +66,7 @@ typedef struct ...@@ -66,7 +66,7 @@ typedef struct
GUID InterfaceType; GUID InterfaceType;
GUID InterfaceInstance; GUID InterfaceInstance;
UINT64 InterruptLatencyIn100nsUnits; u64 InterruptLatencyIn100nsUnits;
u32 InterfaceRevision; u32 InterfaceRevision;
u32 ServerContextAreaSize; // in bytes u32 ServerContextAreaSize; // in bytes
u16 ChannelFlags; u16 ChannelFlags;
...@@ -79,7 +79,7 @@ typedef struct ...@@ -79,7 +79,7 @@ typedef struct
// //
struct struct
{ {
UCHAR UserDefined[MAX_USER_DEFINED_BYTES]; unsigned char UserDefined[MAX_USER_DEFINED_BYTES];
} Standard; } Standard;
// //
...@@ -90,7 +90,7 @@ typedef struct ...@@ -90,7 +90,7 @@ typedef struct
struct struct
{ {
u32 PipeMode; u32 PipeMode;
UCHAR UserDefined[MAX_PIPE_USER_DEFINED_BYTES]; unsigned char UserDefined[MAX_PIPE_USER_DEFINED_BYTES];
} Pipe; } Pipe;
} u; } u;
u32 Padding; u32 Padding;
......
...@@ -83,7 +83,7 @@ typedef struct ...@@ -83,7 +83,7 @@ typedef struct
u16 DataOffset8; u16 DataOffset8;
u16 Length8; u16 Length8;
u16 Flags; u16 Flags;
UINT64 TransactionId; u64 TransactionId;
} VMPACKET_DESCRIPTOR, *PVMPACKET_DESCRIPTOR; } VMPACKET_DESCRIPTOR, *PVMPACKET_DESCRIPTOR;
typedef u32 PREVIOUS_PACKET_OFFSET, *PPREVIOUS_PACKET_OFFSET; typedef u32 PREVIOUS_PACKET_OFFSET, *PPREVIOUS_PACKET_OFFSET;
...@@ -168,7 +168,7 @@ typedef struct _GPA_RANGE { ...@@ -168,7 +168,7 @@ typedef struct _GPA_RANGE {
u32 ByteCount; u32 ByteCount;
u32 ByteOffset; u32 ByteOffset;
UINT64 PfnArray[0]; u64 PfnArray[0];
} GPA_RANGE, *PGPA_RANGE; } GPA_RANGE, *PGPA_RANGE;
...@@ -266,10 +266,10 @@ typedef struct _VMADDITIONAL_DATA { ...@@ -266,10 +266,10 @@ typedef struct _VMADDITIONAL_DATA {
#endif #endif
UINT64 TotalBytes; u64 TotalBytes;
u32 ByteOffset; u32 ByteOffset;
u32 ByteCount; u32 ByteCount;
UCHAR Data[1]; unsigned char Data[1];
} VMADDITIONAL_DATA, *PVMADDITIONAL_DATA; } VMADDITIONAL_DATA, *PVMADDITIONAL_DATA;
...@@ -287,7 +287,7 @@ typedef union { ...@@ -287,7 +287,7 @@ typedef union {
} VMPACKET_LARGEST_POSSIBLE_HEADER, *PVMPACKET_LARGEST_POSSIBLE_HEADER; } VMPACKET_LARGEST_POSSIBLE_HEADER, *PVMPACKET_LARGEST_POSSIBLE_HEADER;
#define VMPACKET_DATA_START_ADDRESS(__packet) \ #define VMPACKET_DATA_START_ADDRESS(__packet) \
(void *)(((PUCHAR)__packet) + ((PVMPACKET_DESCRIPTOR)__packet)->DataOffset8 * 8) (void *)(((unsigned char *)__packet) + ((PVMPACKET_DESCRIPTOR)__packet)->DataOffset8 * 8)
#define VMPACKET_DATA_LENGTH(__packet) \ #define VMPACKET_DATA_LENGTH(__packet) \
((((PVMPACKET_DESCRIPTOR)__packet)->Length8 - ((PVMPACKET_DESCRIPTOR)__packet)->DataOffset8) * 8) ((((PVMPACKET_DESCRIPTOR)__packet)->Length8 - ((PVMPACKET_DESCRIPTOR)__packet)->DataOffset8) * 8)
......
...@@ -97,28 +97,15 @@ typedef struct _DLIST_ENTRY { ...@@ -97,28 +97,15 @@ typedef struct _DLIST_ENTRY {
// //
// unsigned types // unsigned types
// //
#ifdef __x86_64__
typedef unsigned long UINT64;
#else
typedef unsigned long long UINT64;
#endif
typedef unsigned long long ULONGLONG; typedef unsigned long long ULONGLONG;
typedef unsigned int ULONG; typedef unsigned int ULONG;
typedef unsigned short USHORT; typedef unsigned short USHORT;
typedef unsigned char UCHAR;
// //
// signed types // signed types
// //
#ifdef __x86_64__
typedef long INT64;
#else
typedef long long INT64;
#endif
typedef int LONG; typedef int LONG;
typedef char CHAR;
typedef long long LONGLONG; typedef long long LONGLONG;
// //
...@@ -130,7 +117,6 @@ typedef unsigned char BOOL; ...@@ -130,7 +117,6 @@ typedef unsigned char BOOL;
typedef unsigned char BOOLEAN; typedef unsigned char BOOLEAN;
typedef void* HANDLE; typedef void* HANDLE;
typedef u32 DWORD; typedef u32 DWORD;
typedef char* PCHAR;
typedef unsigned char BYTE; typedef unsigned char BYTE;
typedef unsigned long ULONG_PTR; typedef unsigned long ULONG_PTR;
...@@ -150,13 +136,13 @@ typedef void (*PFN_TIMER_CALLBACK)(void* context); ...@@ -150,13 +136,13 @@ typedef void (*PFN_TIMER_CALLBACK)(void* context);
__asm__ __volatile__("rdmsr" \ __asm__ __volatile__("rdmsr" \
: "=a" (l), "=d" (h) \ : "=a" (l), "=d" (h) \
: "c" (reg)); \ : "c" (reg)); \
v = (((UINT64)h) << 32) | l; \ v = (((u64)h) << 32) | l; \
} }
#define WRMSR(reg, v) { \ #define WRMSR(reg, v) { \
u32 h, l; \ u32 h, l; \
l = (u32)(((UINT64)(v)) & 0xFFFFFFFF); \ l = (u32)(((u64)(v)) & 0xFFFFFFFF); \
h = (u32)((((UINT64)(v)) >> 32) & 0xFFFFFFFF); \ h = (u32)((((u64)(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)); \
...@@ -172,7 +158,7 @@ typedef void (*PFN_TIMER_CALLBACK)(void* context); ...@@ -172,7 +158,7 @@ typedef void (*PFN_TIMER_CALLBACK)(void* context);
#define WRMSR(reg, v) \ #define WRMSR(reg, v) \
__asm__ __volatile__("wrmsr" \ __asm__ __volatile__("wrmsr" \
: /* no outputs */ \ : /* no outputs */ \
: "c" (reg), "A" ((UINT64)v)) : "c" (reg), "A" ((u64)v))
#endif #endif
......
...@@ -811,19 +811,19 @@ typedef __struct_bcount(MessageLength) struct _RNDIS_MESSAGE ...@@ -811,19 +811,19 @@ typedef __struct_bcount(MessageLength) struct _RNDIS_MESSAGE
// get pointer to info buffer with message pointer // get pointer to info buffer with message pointer
#define MESSAGE_TO_INFO_BUFFER(Message) \ #define MESSAGE_TO_INFO_BUFFER(Message) \
(((PUCHAR)(Message)) + Message->InformationBufferOffset) (((unsigned char *)(Message)) + Message->InformationBufferOffset)
// get pointer to status buffer with message pointer // get pointer to status buffer with message pointer
#define MESSAGE_TO_STATUS_BUFFER(Message) \ #define MESSAGE_TO_STATUS_BUFFER(Message) \
(((PUCHAR)(Message)) + Message->StatusBufferOffset) (((unsigned char *)(Message)) + Message->StatusBufferOffset)
// get pointer to OOBD buffer with message pointer // get pointer to OOBD buffer with message pointer
#define MESSAGE_TO_OOBD_BUFFER(Message) \ #define MESSAGE_TO_OOBD_BUFFER(Message) \
(((PUCHAR)(Message)) + Message->OOBDataOffset) (((unsigned char *)(Message)) + Message->OOBDataOffset)
// get pointer to data buffer with message pointer // get pointer to data buffer with message pointer
#define MESSAGE_TO_DATA_BUFFER(Message) \ #define MESSAGE_TO_DATA_BUFFER(Message) \
(((PUCHAR)(Message)) + Message->PerPacketInfoOffset) (((unsigned char *)(Message)) + Message->PerPacketInfoOffset)
// get pointer to contained message from NDIS_MESSAGE pointer // get pointer to contained message from NDIS_MESSAGE pointer
#define RNDIS_MESSAGE_PTR_TO_MESSAGE_PTR(RndisMessage) \ #define RNDIS_MESSAGE_PTR_TO_MESSAGE_PTR(RndisMessage) \
......
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
#define MAX_TRANSFER_LENGTH 0x40000 #define MAX_TRANSFER_LENGTH 0x40000
#define DEFAULT_PACKET_SIZE (sizeof(VMDATA_GPA_DIRECT) + \ #define DEFAULT_PACKET_SIZE (sizeof(VMDATA_GPA_DIRECT) + \
sizeof(VSTOR_PACKET) + \ sizeof(VSTOR_PACKET) + \
(sizeof(UINT64) * (MAX_TRANSFER_LENGTH / PAGE_SIZE))) (sizeof(u64) * (MAX_TRANSFER_LENGTH / PAGE_SIZE)))
...@@ -142,28 +142,28 @@ C_ASSERT(SENSE_BUFFER_SIZE == 0x12); ...@@ -142,28 +142,28 @@ C_ASSERT(SENSE_BUFFER_SIZE == 0x12);
typedef struct typedef struct
{ {
USHORT Length; USHORT Length;
UCHAR SrbStatus; unsigned char SrbStatus;
UCHAR ScsiStatus; unsigned char ScsiStatus;
UCHAR PortNumber; unsigned char PortNumber;
UCHAR PathId; unsigned char PathId;
UCHAR TargetId; unsigned char TargetId;
UCHAR Lun; unsigned char Lun;
UCHAR CdbLength; unsigned char CdbLength;
UCHAR SenseInfoLength; unsigned char SenseInfoLength;
UCHAR DataIn; unsigned char DataIn;
UCHAR Reserved; unsigned char Reserved;
ULONG DataTransferLength; ULONG DataTransferLength;
union union
{ {
UCHAR Cdb[CDB16GENERIC_LENGTH]; unsigned char Cdb[CDB16GENERIC_LENGTH];
UCHAR SenseData[SENSE_BUFFER_SIZE]; unsigned char SenseData[SENSE_BUFFER_SIZE];
UCHAR ReservedArray[MAX_DATA_BUFFER_LENGTH_WITH_PADDING]; unsigned char ReservedArray[MAX_DATA_BUFFER_LENGTH_WITH_PADDING];
}; };
} VMSCSI_REQUEST, *PVMSCSI_REQUEST; } VMSCSI_REQUEST, *PVMSCSI_REQUEST;
...@@ -179,8 +179,8 @@ C_ASSERT((sizeof(VMSCSI_REQUEST) % 4) == 0); ...@@ -179,8 +179,8 @@ C_ASSERT((sizeof(VMSCSI_REQUEST) % 4) == 0);
typedef struct typedef struct
{ {
USHORT ProtocolVersion; USHORT ProtocolVersion;
UCHAR PathId; unsigned char PathId;
UCHAR TargetId; unsigned char TargetId;
// //
// Note: port number is only really known on the client side // Note: port number is only really known on the client side
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment