[FREELDR] scsiport.c: Fix x64 compilation.

This commit is contained in:
Hermès Bélusca-Maïto 2023-06-19 20:30:45 +02:00
parent af47866f76
commit 0c16bcd4e8
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0

View file

@ -589,11 +589,17 @@ ScsiPortGetDeviceBase(
/* I/O space */
if (AddressSpace != 0)
return (PVOID)TranslatedAddress.u.LowPart;
return (PVOID)(ULONG_PTR)TranslatedAddress.u.LowPart;
// FIXME
#if 0
return MmMapIoSpace(TranslatedAddress,
NumberOfBytes,
FALSE);
#else
UNIMPLEMENTED;
return (PVOID)IoAddress.LowPart;
return (PVOID)(ULONG_PTR)IoAddress.LowPart;
#endif
}
PVOID
@ -842,7 +848,8 @@ SpiScanDevice(
Status = ArcOpen(PartitionName, OpenReadOnly, &FileId);
if (Status == ESUCCESS)
{
ret = HALDISPATCH->HalIoReadPartitionTable((PDEVICE_OBJECT)FileId, 512, FALSE, &PartitionBuffer);
ret = HALDISPATCH->HalIoReadPartitionTable((PDEVICE_OBJECT)(ULONG_PTR)FileId,
512, FALSE, &PartitionBuffer);
if (NT_SUCCESS(ret))
{
for (i = 0; i < PartitionBuffer->PartitionCount; i++)
@ -1702,7 +1709,7 @@ LoadBootDeviceDriver(VOID)
while (((PIMAGE_THUNK_DATA)ThunkData)->u1.AddressOfData != 0)
{
ThunkData->u1.Function = (ULONG)VaToPa((PVOID)ThunkData->u1.Function);
ThunkData->u1.Function = (ULONG_PTR)VaToPa((PVOID)ThunkData->u1.Function);
ThunkData++;
}
}