summaryrefslogtreecommitdiffhomepage
path: root/dev/modules
diff options
context:
space:
mode:
authorAmlal El Mahrouss <zka-holder@mahrouss-logic.com>2024-10-14 05:58:38 +0000
committerAmlal El Mahrouss <zka-holder@mahrouss-logic.com>2024-10-14 05:58:38 +0000
commitd9d82713326069478e6dd212763d1fac15e65370 (patch)
tree37775f4299281598b0f5121df4c188392daebd04 /dev/modules
parent7477a0f942c374b652da4f80cdb36d4661aac3c8 (diff)
IMP: Basic ARM64 port.
Diffstat (limited to 'dev/modules')
-rw-r--r--dev/modules/ACPI/ACPIFactoryInterface.hxx2
-rw-r--r--dev/modules/APM/APM.hxx17
-rw-r--r--dev/modules/FB/FB.hxx36
3 files changed, 29 insertions, 26 deletions
diff --git a/dev/modules/ACPI/ACPIFactoryInterface.hxx b/dev/modules/ACPI/ACPIFactoryInterface.hxx
index 3d16d5a1..57db9551 100644
--- a/dev/modules/ACPI/ACPIFactoryInterface.hxx
+++ b/dev/modules/ACPI/ACPIFactoryInterface.hxx
@@ -22,7 +22,7 @@ namespace Kernel
class ACPIFactoryInterface final
{
public:
- explicit ACPIFactoryInterface(voidPtr rsdPtr);
+ explicit ACPIFactoryInterface(voidPtr rsp_ptr);
~ACPIFactoryInterface() = default;
ACPIFactoryInterface& operator=(const ACPIFactoryInterface&) = default;
diff --git a/dev/modules/APM/APM.hxx b/dev/modules/APM/APM.hxx
index abcfb468..ed9f6f45 100644
--- a/dev/modules/APM/APM.hxx
+++ b/dev/modules/APM/APM.hxx
@@ -14,21 +14,24 @@ namespace Kernel
enum
{
- kAPMPowerCommandStop = 0x01,
- kAPMPowerCommandStart = 0x02,
- kAPMPowerCommandSleep = 0x04,
- kAPMPowerCommandSWakeup = 0x06
+ kAPMPowerCommandInvalid = 0x00,
+ kAPMPowerCommandStop = 0x01,
+ kAPMPowerCommandStart = 0x02,
+ kAPMPowerCommandSleep = 0x04,
+ kAPMPowerCommandWakeup = 0x06,
+ kAPMPowerCommandShutdown = 0x07,
+ kAPMPowerCommandReboot = 0x08,
};
/// @brief Send a APM command into it's own DMA space.
/// @param base_dma the DMA base address.
/// @param cmd the command.
/// @return status code.
- EXTERN_C Int32 apm_send_dma_command(Ptr64 base_dma, APMPowerCmd cmd);
+ EXTERN_C Int32 apm_send_dma_command(Ptr64 register_addr, APMPowerCmd value);
/// @brief Send a APM command into it's own IO space.
/// @param base_dma the IO base port.
/// @param cmd the command.
/// @return status code.
- EXTERN_C Int32 apm_send_io_command(UInt16 base_port, APMPowerCmd cmd);
-} // namespace Kernel \ No newline at end of file
+ EXTERN_C Int32 apm_send_io_command(UInt16 cmd, APMPowerCmd value);
+} // namespace Kernel
diff --git a/dev/modules/FB/FB.hxx b/dev/modules/FB/FB.hxx
index a98eeafe..7f5b93bb 100644
--- a/dev/modules/FB/FB.hxx
+++ b/dev/modules/FB/FB.hxx
@@ -8,17 +8,17 @@
#include <NewKit/Defines.hxx>
-#define CGInit() Kernel::SizeT __CG_CURSOR = 0
+#define CGInit() Kernel::SizeT kCGCursor = 0
#define CGColor(R, G, B) RGB(R, G, B)
#define cCGClearClr CGColor(0x0, 0x0, 0x0)
-#define CGFini() __CG_CURSOR = 0
+#define CGFini() kCGCursor = 0
/// @brief Performs OR drawing on the framebuffer.
#define CGDrawBitMapInRegionA(_BitMp, _Height, _Width, _BaseX, _BaseY) \
- __CG_CURSOR = 0; \
+ kCGCursor = 0; \
\
for (Kernel::SizeT i = _BaseX; i < (_Height + _BaseX); ++i) \
{ \
@@ -27,15 +27,15 @@
*(((Kernel::UInt32*)(kHandoverHeader->f_GOP.f_The + \
4 * kHandoverHeader->f_GOP.f_PixelPerLine * \
i + \
- 4 * u))) |= (_BitMp)[__CG_CURSOR]; \
+ 4 * u))) |= (_BitMp)[kCGCursor]; \
\
- ++__CG_CURSOR; \
+ ++kCGCursor; \
} \
}
/// @brief Draws a resource.
#define CGDrawBitMapInRegion(_BitMp, _Height, _Width, _BaseX, _BaseY) \
- __CG_CURSOR = 0; \
+ kCGCursor = 0; \
\
for (Kernel::SizeT i = _BaseX; i < (_Height + _BaseX); ++i) \
{ \
@@ -44,14 +44,14 @@
*(((Kernel::UInt32*)(kHandoverHeader->f_GOP.f_The + \
4 * kHandoverHeader->f_GOP.f_PixelPerLine * \
i + \
- 4 * u))) = (_BitMp)[__CG_CURSOR]; \
+ 4 * u))) = (_BitMp)[kCGCursor]; \
\
- ++__CG_CURSOR; \
+ ++kCGCursor; \
} \
}
#define CGDrawBitMapInRegionToRgn(_Rgn, _BitMp, _Height, _Width, _BaseX, _BaseY) \
- __CG_CURSOR = 0; \
+ kCGCursor = 0; \
\
for (Kernel::SizeT i = _BaseX; i < (_Height + _BaseX); ++i) \
{ \
@@ -60,9 +60,9 @@
*(((Kernel::UInt32*)(_Rgn + \
4 * kHandoverHeader->f_GOP.f_PixelPerLine * \
i + \
- 4 * u))) = (_BitMp)[__CG_CURSOR]; \
+ 4 * u))) = (_BitMp)[kCGCursor]; \
\
- ++__CG_CURSOR; \
+ ++kCGCursor; \
} \
}
@@ -96,7 +96,7 @@
/// @brief Draws inside a zone.
#define CGDrawInRegionToRgn(_Rgn, _Clr, _Height, _Width, _BaseX, _BaseY) \
- __CG_CURSOR = 0; \
+ kCGCursor = 0; \
\
for (Kernel::SizeT x_base = _BaseX; x_base < (_Width + _BaseX); ++x_base) \
{ \
@@ -105,13 +105,13 @@
*(((volatile Kernel::UInt32*)(_Rgn + \
4 * kHandoverHeader->f_GOP.f_PixelPerLine * \
x_base + \
- 4 * y_base))) = _Clr[__CG_CURSOR]; \
- ++__CG_CURSOR; \
+ 4 * y_base))) = _Clr[kCGCursor]; \
+ ++kCGCursor; \
} \
}
#define CGDrawInRegionToVideoRgn(_VideoRgn, _Clr, _Height, _Width, _BaseX, _BaseY) \
- __CG_CURSOR = 0; \
+ kCGCursor = 0; \
\
for (Kernel::SizeT x_base = _BaseX; x_base < (_Width + _BaseX); ++x_base) \
{ \
@@ -121,12 +121,12 @@
4 * kHandoverHeader->f_GOP.f_PixelPerLine * \
x_base + \
4 * y_base))) = _Clr; \
- ++__CG_CURSOR; \
+ ++kCGCursor; \
} \
}
#define CGDrawInRegionToVideoRgnA(_VideoRgn, _Clr, _Height, _Width, _BaseX, _BaseY) \
- __CG_CURSOR = 0; \
+ kCGCursor = 0; \
\
for (Kernel::SizeT x_base = _BaseX; x_base < (_Width + _BaseX); ++x_base) \
{ \
@@ -136,7 +136,7 @@
4 * kHandoverHeader->f_GOP.f_PixelPerLine * \
x_base + \
4 * y_base))) |= _Clr; \
- ++__CG_CURSOR; \
+ ++kCGCursor; \
} \
}