summaryrefslogtreecommitdiffhomepage
path: root/dev/kernel/KernelKit
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-04-08 10:19:56 +0200
committerGitHub <noreply@github.com>2025-04-08 10:19:56 +0200
commit29828ef52df7a51e22057b4557b8d9a3d5550839 (patch)
tree8f809bcf67e1c77beae47bce71877bd546db5146 /dev/kernel/KernelKit
parentb18c5e09961d8bc0b2368176d9fb23789afebb87 (diff)
parent1f6dd86d548ec8194c79bd9e2a8b27991061cd9e (diff)
Merge pull request #12 from amlel-el-mahrouss/dev
pr/ahci: generic driver improvements.
Diffstat (limited to 'dev/kernel/KernelKit')
-rw-r--r--dev/kernel/KernelKit/PCI/Device.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/dev/kernel/KernelKit/PCI/Device.h b/dev/kernel/KernelKit/PCI/Device.h
index 2c92ba4f..9b750e43 100644
--- a/dev/kernel/KernelKit/PCI/Device.h
+++ b/dev/kernel/KernelKit/PCI/Device.h
@@ -24,10 +24,9 @@ namespace Kernel::PCI
Device() = default;
public:
- explicit Device(UShort bus, UShort device, UShort function, UInt32 bar);
+ Device(UShort bus, UShort device, UShort function, UInt32 bar);
Device& operator=(const Device&) = default;
-
Device(const Device&) = default;
~Device();
@@ -43,14 +42,14 @@ namespace Kernel::PCI
template <typename T>
UInt Read(UInt bar)
{
- static_assert(sizeof(T) <= 4, "64-bit PCI addressing is unsupported");
+ static_assert(sizeof(T) <= sizeof(UInt32), "64-bit PCI addressing is unsupported");
return Read(bar, sizeof(T));
}
template <typename T>
void Write(UInt bar, UIntPtr data)
{
- static_assert(sizeof(T) <= 4, "64-bit PCI addressing is unsupported");
+ static_assert(sizeof(T) <= sizeof(UInt32), "64-bit PCI addressing is unsupported");
Write(bar, data, sizeof(T));
}