diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-03-10 05:13:55 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-03-10 05:13:55 +0100 |
| commit | 7855b98f7cbe83d77f1625f7b5017060b97e5b75 (patch) | |
| tree | 4b77f69c677f76f86d15f1118e9590943b6d818e /dev/Kernel/KernelKit/PCI/IO.h | |
| parent | d9101d6a9658ac4ffcd5a4d747e0b95a5cc5cd30 (diff) | |
IMPL: I/O subsystem improvements and Dyld subsystem improvements.
- Add make_ports for IO.h
- Include PCI.h in Express.h
- Use this in DMA.inl
- Refactor NE_DLL_OBJECT to NE_DYLIB_OBJECT in IDylibObject.h
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel/KernelKit/PCI/IO.h')
| -rw-r--r-- | dev/Kernel/KernelKit/PCI/IO.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/dev/Kernel/KernelKit/PCI/IO.h b/dev/Kernel/KernelKit/PCI/IO.h index b6d491ce..1d60df8e 100644 --- a/dev/Kernel/KernelKit/PCI/IO.h +++ b/dev/Kernel/KernelKit/PCI/IO.h @@ -25,6 +25,7 @@ namespace NeOS : fPorts(ports) { } + ~IOArray() { } @@ -49,11 +50,26 @@ namespace NeOS Array<UShort, Sz> fPorts; }; - using IOArray16 = IOArray<16>; + 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 NeOS #ifdef __x86_64__ -#include <KernelKit/PCI/IO-Impl-AMD64.inl> +#include <KernelKit/PCI/IOArray+AMD64.inl> #else #error Please provide platform specific code for the I/O #endif // ifdef __x86_64__ |
