summaryrefslogtreecommitdiffhomepage
path: root/Kernel/KernelKit/PCI
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-05-19 19:13:03 +0200
committerAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-05-19 19:13:03 +0200
commitaad2c069563a3e7318b575216db6deb313445f2c (patch)
tree2ba42b767473bebdca9d2538d120f0b4d82194e4 /Kernel/KernelKit/PCI
parentc0428f8e5feba9573e572a1a1b3c66cfa1f29108 (diff)
MHR-23: Fix run_format.sh, inl files needs to be formated as well.
Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Kernel/KernelKit/PCI')
-rw-r--r--Kernel/KernelKit/PCI/Database.hpp2
-rw-r--r--Kernel/KernelKit/PCI/Device.hpp2
-rw-r--r--Kernel/KernelKit/PCI/Dma.hpp2
-rw-r--r--Kernel/KernelKit/PCI/Dma.inl24
-rw-r--r--Kernel/KernelKit/PCI/Express.hpp2
-rw-r--r--Kernel/KernelKit/PCI/IO-Impl-AMD64.inl77
-rw-r--r--Kernel/KernelKit/PCI/IO.hpp2
-rw-r--r--Kernel/KernelKit/PCI/PCI.hpp2
8 files changed, 59 insertions, 54 deletions
diff --git a/Kernel/KernelKit/PCI/Database.hpp b/Kernel/KernelKit/PCI/Database.hpp
index 002e572a..c83f1b9d 100644
--- a/Kernel/KernelKit/PCI/Database.hpp
+++ b/Kernel/KernelKit/PCI/Database.hpp
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright SoftwareLabs
+ Copyright SoftwareLabs
------------------------------------------- */
#pragma once
diff --git a/Kernel/KernelKit/PCI/Device.hpp b/Kernel/KernelKit/PCI/Device.hpp
index 69a99494..4aa5519c 100644
--- a/Kernel/KernelKit/PCI/Device.hpp
+++ b/Kernel/KernelKit/PCI/Device.hpp
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright SoftwareLabs
+ Copyright SoftwareLabs
------------------------------------------- */
#pragma once
diff --git a/Kernel/KernelKit/PCI/Dma.hpp b/Kernel/KernelKit/PCI/Dma.hpp
index dc7b8601..fd67ae80 100644
--- a/Kernel/KernelKit/PCI/Dma.hpp
+++ b/Kernel/KernelKit/PCI/Dma.hpp
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright SoftwareLabs
+ Copyright SoftwareLabs
------------------------------------------- */
diff --git a/Kernel/KernelKit/PCI/Dma.inl b/Kernel/KernelKit/PCI/Dma.inl
index 53c52802..0b9adc2d 100644
--- a/Kernel/KernelKit/PCI/Dma.inl
+++ b/Kernel/KernelKit/PCI/Dma.inl
@@ -1,20 +1,20 @@
/* -------------------------------------------
- Copyright SoftwareLabs
+ Copyright SoftwareLabs
------------------------------------------- */
namespace NewOS
{
- template<class T>
- T* DMAWrapper::operator->()
- {
- return fAddress;
- }
+ template <class T>
+ T* DMAWrapper::operator->()
+ {
+ return fAddress;
+ }
- template<class T>
- T* DMAWrapper::Get(const UIntPtr offset)
- {
- return reinterpret_cast<T*>((UIntPtr) fAddress + offset);
- }
-}
+ template <class T>
+ T* DMAWrapper::Get(const UIntPtr offset)
+ {
+ return reinterpret_cast<T*>((UIntPtr)fAddress + offset);
+ }
+} // namespace NewOS
diff --git a/Kernel/KernelKit/PCI/Express.hpp b/Kernel/KernelKit/PCI/Express.hpp
index d6266ad2..eedfa5d6 100644
--- a/Kernel/KernelKit/PCI/Express.hpp
+++ b/Kernel/KernelKit/PCI/Express.hpp
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright SoftwareLabs
+ Copyright SoftwareLabs
------------------------------------------- */
diff --git a/Kernel/KernelKit/PCI/IO-Impl-AMD64.inl b/Kernel/KernelKit/PCI/IO-Impl-AMD64.inl
index 92a15b8b..8479a2d5 100644
--- a/Kernel/KernelKit/PCI/IO-Impl-AMD64.inl
+++ b/Kernel/KernelKit/PCI/IO-Impl-AMD64.inl
@@ -1,47 +1,52 @@
/* -------------------------------------------
- Copyright SoftwareLabs
+ Copyright SoftwareLabs
- File: IO-Impl-AMD64.hpp
- Purpose: I/O for AMD64.
+ File: IO-Impl-AMD64.hpp
+ Purpose: I/O for AMD64.
- Revision History:
+ Revision History:
- 30/01/24: Add file. (amlel)
- 02/02/24: Update I/O routines. (amlel)
+ 30/01/24: Add file. (amlel)
+ 02/02/24: Update I/O routines. (amlel)
------------------------------------------- */
-namespace NewOS {
-template <SizeT Sz>
-template <typename T>
-T IOArray<Sz>::In(SizeT index) {
- switch (sizeof(T)) {
- case 4:
- return HAL::In32(fPorts[index].Leak());
- case 2:
- return HAL::In16(fPorts[index].Leak());
- case 1:
- return HAL::In8(fPorts[index].Leak());
- default:
- return 0xFFFF;
- }
-}
+namespace NewOS
+{
+ template <SizeT Sz>
+ template <typename T>
+ T IOArray<Sz>::In(SizeT index)
+ {
+ switch (sizeof(T))
+ {
+ case 4:
+ return HAL::In32(fPorts[index].Leak());
+ case 2:
+ return HAL::In16(fPorts[index].Leak());
+ case 1:
+ return HAL::In8(fPorts[index].Leak());
+ default:
+ return 0xFFFF;
+ }
+ }
-template <SizeT Sz>
-template <typename T>
-void IOArray<Sz>::Out(SizeT index, T value) {
- switch (sizeof(T)) {
+ template <SizeT Sz>
+ template <typename T>
+ void IOArray<Sz>::Out(SizeT index, T value)
+ {
+ switch (sizeof(T))
+ {
#ifdef __x86_64__
- case 4:
- HAL::Out32(fPorts[index].Leak(), value);
- case 2:
- HAL::Out16(fPorts[index].Leak(), value);
- case 1:
- HAL::Out8(fPorts[index].Leak(), value);
+ case 4:
+ HAL::Out32(fPorts[index].Leak(), value);
+ case 2:
+ HAL::Out16(fPorts[index].Leak(), value);
+ case 1:
+ HAL::Out8(fPorts[index].Leak(), value);
#endif
- default:
- break;
- }
-}
-} // namespace NewOS
+ default:
+ break;
+ }
+ }
+} // namespace NewOS
diff --git a/Kernel/KernelKit/PCI/IO.hpp b/Kernel/KernelKit/PCI/IO.hpp
index 0b10f5d0..d4c1d785 100644
--- a/Kernel/KernelKit/PCI/IO.hpp
+++ b/Kernel/KernelKit/PCI/IO.hpp
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright SoftwareLabs
+ Copyright SoftwareLabs
------------------------------------------- */
diff --git a/Kernel/KernelKit/PCI/PCI.hpp b/Kernel/KernelKit/PCI/PCI.hpp
index 2e523d4a..2114a04e 100644
--- a/Kernel/KernelKit/PCI/PCI.hpp
+++ b/Kernel/KernelKit/PCI/PCI.hpp
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright SoftwareLabs
+ Copyright SoftwareLabs
------------------------------------------- */
#pragma once