summaryrefslogtreecommitdiffhomepage
path: root/dev/kernel/KernelKit/PCI/IO.h
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-11-24 03:02:43 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-11-24 03:02:43 +0100
commit83d870e58457a1d335a1d9b9966a6a1887cc297b (patch)
tree72888f88c7728c82f3f6df1f4f70591de15eab36 /dev/kernel/KernelKit/PCI/IO.h
parentab37adbacf0f33845804c788b39680cd754752a8 (diff)
feat! breaking changes on kernel sources.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel/KernelKit/PCI/IO.h')
-rw-r--r--dev/kernel/KernelKit/PCI/IO.h63
1 files changed, 0 insertions, 63 deletions
diff --git a/dev/kernel/KernelKit/PCI/IO.h b/dev/kernel/KernelKit/PCI/IO.h
deleted file mode 100644
index 2ab72269..00000000
--- a/dev/kernel/KernelKit/PCI/IO.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* ========================================
-
- Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
-
-======================================== */
-
-#pragma once
-
-#include <ArchKit/ArchKit.h>
-#include <NeKit/Array.h>
-#include <NeKit/Defines.h>
-#include <NeKit/Ref.h>
-
-namespace Kernel {
-template <SizeT Sz>
-class IOArray final {
- public:
- IOArray() = delete;
-
- IOArray(nullPtr) = delete;
-
- explicit IOArray(Array<UShort, Sz>& ports) : fPorts(ports) {}
-
- ~IOArray() {}
-
- IOArray& operator=(const IOArray&) = default;
-
- IOArray(const IOArray&) = default;
-
- operator bool() { return !fPorts.Empty(); }
-
- public:
- template <typename T>
- T In(SizeT index);
-
- template <typename T>
- void Out(SizeT index, T value);
-
- private:
- Array<UShort, Sz> fPorts;
-};
-
-inline constexpr UInt16 kMaxPorts = 16;
-
-using IOArray16 = IOArray<kMaxPorts>;
-
-template <SizeT Sz>
-inline Array<UShort, Sz> make_ports(UShort base) {
- Array<UShort, Sz> ports;
-
- for (UShort i = 0; i < Sz; ++i) {
- ports[i] = base + i;
- }
-
- return ports;
-}
-} // namespace Kernel
-
-#ifdef __NE_AMD64__
-#include <KernelKit/PCI/IOArray+AMD64.inl>
-#else
-#error Please provide platform specific code for the I/O
-#endif // ifdef __NE_AMD64__