summaryrefslogtreecommitdiffhomepage
path: root/dev
diff options
context:
space:
mode:
Diffstat (limited to 'dev')
-rw-r--r--dev/Kernel/HALKit/AMD64/PCI/DMA.cc10
-rw-r--r--dev/Kernel/KernelKit/PCI/DMA.h4
2 files changed, 9 insertions, 5 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);
;
}
diff --git a/dev/Kernel/KernelKit/PCI/DMA.h b/dev/Kernel/KernelKit/PCI/DMA.h
index 9afa525d..68f3fa37 100644
--- a/dev/Kernel/KernelKit/PCI/DMA.h
+++ b/dev/Kernel/KernelKit/PCI/DMA.h
@@ -56,8 +56,8 @@ namespace NeOS
bool operator!();
public:
- bool Write(const UIntPtr& bit, const UIntPtr& offset);
- UIntPtr Read(const UIntPtr& offset);
+ bool Write(const UIntPtr& bit, const UInt32& offset);
+ UIntPtr Read(const UInt32& offset);
Boolean Check(UIntPtr offset) const;
public: