summaryrefslogtreecommitdiffhomepage
path: root/dev/Kernel/HALKit
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-03-20 04:39:34 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-03-20 04:39:34 +0100
commit70711bdd91e331d3a7fa08d59adc38dd6eb0c55d (patch)
tree59bd7d606061fe399741b24645c3048c7fee3a16 /dev/Kernel/HALKit
parent92ff857ada877f48cc07373737f50ed83c0507c4 (diff)
DMA.cc: Use UInt32 instead of UIntPtr for the offset.
Diffstat (limited to 'dev/Kernel/HALKit')
-rw-r--r--dev/Kernel/HALKit/AMD64/PCI/DMA.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/dev/Kernel/HALKit/AMD64/PCI/DMA.cc b/dev/Kernel/HALKit/AMD64/PCI/DMA.cc
index 7e36f581..c756a572 100644
--- a/dev/Kernel/HALKit/AMD64/PCI/DMA.cc
+++ b/dev/Kernel/HALKit/AMD64/PCI/DMA.cc
@@ -30,8 +30,10 @@ namespace NeOS
return reinterpret_cast<UIntPtr>(this->fAddress) >= offset;
}
- bool DMAWrapper::Write(const UIntPtr& bit, const UIntPtr& offset)
+ bool DMAWrapper::Write(const UIntPtr& bit, const UInt32& offset)
{
+ kout << "[DMAWrapper::Read] Checking this->fAddress..\n";
+
if (!this->fAddress)
return false;
@@ -44,13 +46,15 @@ namespace NeOS
return true;
}
- UIntPtr DMAWrapper::Read(const UIntPtr& offset)
+ UIntPtr DMAWrapper::Read(const UInt32& offset)
{
- kout << "[DMAWrapper::Read] checking this->fAddress..\n";
+ kout << "[DMAWrapper::Read] Checking this->fAddress..\n";
+
if (!this->fAddress)
return 0;
kout << "[DMAWrapper::Read] Reading this->fAddress..\n";
+
return *(volatile UIntPtr*)(reinterpret_cast<UIntPtr>(this->fAddress) + offset);
;
}