summaryrefslogtreecommitdiffhomepage
path: root/src/kernel/KernelKit
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-12-01 02:39:24 -0500
committerGitHub <noreply@github.com>2025-12-01 02:39:24 -0500
commitcd0c176275687a552bc546395bd2a39c92a3dd1b (patch)
treed6ddc16fd59d851a093700bad8dd8baca1c914dc /src/kernel/KernelKit
parent82f7d186848681e2530c9fa8b196b55fad0f4823 (diff)
parent9c3de597257be9911a5eeb86c33962b15d87a701 (diff)
Merge pull request #98 from nekernel-org/develop
Develop: Updated paper, containers, and container types.
Diffstat (limited to 'src/kernel/KernelKit')
-rw-r--r--src/kernel/KernelKit/PCI/Device.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/kernel/KernelKit/PCI/Device.h b/src/kernel/KernelKit/PCI/Device.h
index c8caf67c..e9c5a683 100644
--- a/src/kernel/KernelKit/PCI/Device.h
+++ b/src/kernel/KernelKit/PCI/Device.h
@@ -3,9 +3,11 @@
Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
======================================== */
+
#pragma once
#include <NeKit/Config.h>
+#include <NeKit/KernelPanic.h>
namespace Kernel::PCI {
enum class PciConfigKind : UShort {
@@ -38,13 +40,13 @@ class Device final {
public:
template <typename T>
UInt Read(UInt bar) {
- static_assert(sizeof(T) <= sizeof(UInt32), "64-bit PCI addressing is unsupported");
+ STATIC_PASS(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) <= sizeof(UInt32), "64-bit PCI addressing is unsupported");
+ STATIC_PASS(sizeof(T) <= sizeof(UInt32), "64-bit PCI addressing is unsupported");
Write(bar, data, sizeof(T));
}