https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0c16bcd4e84479f6b7c71…
commit 0c16bcd4e84479f6b7c71cf6d13b04ffdb4acd29
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Mon Jun 19 20:30:45 2023 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Mon Jun 19 21:09:01 2023 +0200
[FREELDR] scsiport.c: Fix x64 compilation.
---
boot/freeldr/freeldr/disk/scsiport.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/boot/freeldr/freeldr/disk/scsiport.c b/boot/freeldr/freeldr/disk/scsiport.c
index c41d7936f80..97d85034a5c 100644
--- a/boot/freeldr/freeldr/disk/scsiport.c
+++ b/boot/freeldr/freeldr/disk/scsiport.c
@@ -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++;
}
}