summaryrefslogtreecommitdiffhomepage
path: root/dev
diff options
context:
space:
mode:
Diffstat (limited to 'dev')
-rw-r--r--dev/ddk/src/ddk_io.c4
-rw-r--r--dev/zba/BootKit/BootKit.h2
-rw-r--r--dev/zka/HALKit/AMD64/Storage/AHCI.cc20
-rw-r--r--dev/zka/KernelKit/UserProcessScheduler.h7
-rw-r--r--dev/zka/NewKit/Macros.h4
5 files changed, 20 insertions, 17 deletions
diff --git a/dev/ddk/src/ddk_io.c b/dev/ddk/src/ddk_io.c
index daee6711..84d08e2e 100644
--- a/dev/ddk/src/ddk_io.c
+++ b/dev/ddk/src/ddk_io.c
@@ -12,11 +12,11 @@ DK_EXTERN void KernelPrintChar(const char msg_ch)
{
char assembled[2] = {0};
- assembled[0] = msg_ch;
+ assembled[0] = msg_ch;
if (msg_ch != 0)
{
- assembled[1] = 0;
+ assembled[1] = 0;
}
KernelCall("SrWriteCharacter", 1, assembled, 1);
diff --git a/dev/zba/BootKit/BootKit.h b/dev/zba/BootKit/BootKit.h
index 6c93db07..0261f868 100644
--- a/dev/zba/BootKit/BootKit.h
+++ b/dev/zba/BootKit/BootKit.h
@@ -35,7 +35,7 @@
namespace EFI
{
- extern void ThrowError(const WideChar* errorCode,
+ EXTERN void ThrowError(const WideChar* errorCode,
const WideChar* reason) noexcept;
} // namespace EFI
diff --git a/dev/zka/HALKit/AMD64/Storage/AHCI.cc b/dev/zka/HALKit/AMD64/Storage/AHCI.cc
index a7635c46..1d237465 100644
--- a/dev/zka/HALKit/AMD64/Storage/AHCI.cc
+++ b/dev/zka/HALKit/AMD64/Storage/AHCI.cc
@@ -59,9 +59,9 @@ Kernel::Boolean drv_std_init(Kernel::UInt16& PortsImplemented)
Kernel::UInt16 ahci_index = 0;
const Kernel::UInt16 kMaxPortsImplemented = 32;
- const Kernel::UInt32 kSATASignature = 0x00000101;
- const Kernel::UInt8 kAhciPresent = 0x03;
- const Kernel::UInt8 kAhciIPMActive = 0x01;
+ const Kernel::UInt32 kSATASignature = 0x00000101;
+ const Kernel::UInt8 kAhciPresent = 0x03;
+ const Kernel::UInt8 kAhciIPMActive = 0x01;
Kernel::Boolean detected = false;
@@ -202,17 +202,17 @@ Kernel::Void drv_std_write(Kernel::UInt64 Lba, Kernel::Char* Buf, Kernel::SizeT
Kernel::Int64 free_slot = 0;
- // Prepare command header.
+ // Prepare command header.
HbaCmdHeader* cmd_header = (HbaCmdHeader*)kAhciPort->Clb;
cmd_header += free_slot;
- // Read operation/set entries count.
+ // Read operation/set entries count.
cmd_header->Write = Yes;
cmd_header->Prdtl = (Kernel::UInt16)((Size - 1) >> 4) + 1; // PRDT entries count
- // Prepare command table.
+ // Prepare command table.
HbaCmdTbl* cmd_tbl = (HbaCmdTbl*)cmd_header->Ctba;
Kernel::rt_set_memory(cmd_tbl, 0, sizeof(HbaCmdTbl));
@@ -230,12 +230,12 @@ Kernel::Void drv_std_write(Kernel::UInt64 Lba, Kernel::Char* Buf, Kernel::SizeT
Buf += 4 * 1024; // Move the Buf pointer forward
}
- // Last PRDT entry
+ // Last PRDT entry
cmd_tbl->prdtEntries[index_byte].Dba = (Kernel::UInt32)(Kernel::UIntPtr)Buf;
cmd_tbl->prdtEntries[index_byte].Dbc = Size - 1; // Byte count left
cmd_tbl->prdtEntries[index_byte].InterruptBit = 1;
- // 5. Prepare the command FIS (Frame Information Structure)
+ // 5. Prepare the command FIS (Frame Information Structure)
FisRegH2D* cmd_fis = (FisRegH2D*)(&cmd_tbl->Cfis);
Kernel::rt_set_memory(cmd_fis, 0, sizeof(FisRegH2D));
@@ -255,10 +255,10 @@ Kernel::Void drv_std_write(Kernel::UInt64 Lba, Kernel::Char* Buf, Kernel::SizeT
cmd_fis->CountLow = Size & 0xFF;
cmd_fis->CountHigh = (Size >> 8) & 0xFF;
- // 6. Issue the command by writing to the kAhciPort's command issue register (CI)
+ // 6. Issue the command by writing to the kAhciPort's command issue register (CI)
kAhciPort->Ci = 1 << free_slot;
- // 7. Wait for the command to complete (simple spinlock, no need for an object here)
+ // 7. Wait for the command to complete (simple spinlock, no need for an object here)
while (Yes)
{
if (!(kAhciPort->Ci & (1 << free_slot)))
diff --git a/dev/zka/KernelKit/UserProcessScheduler.h b/dev/zka/KernelKit/UserProcessScheduler.h
index b2300ddf..6fab416f 100644
--- a/dev/zka/KernelKit/UserProcessScheduler.h
+++ b/dev/zka/KernelKit/UserProcessScheduler.h
@@ -99,7 +99,7 @@ namespace Kernel
// end of operator overloading.
- enum class ProcessSubsystem: Int32
+ enum class ProcessSubsystem : Int32
{
kProcessSubsystemSecurity = 100,
kProcessSubsystemApplication,
@@ -109,8 +109,8 @@ namespace Kernel
kProcessSubsystemCount = 4,
};
- using ProcessTime = UInt64;
- using PID = Int64;
+ using ProcessTime = UInt64;
+ using PID = Int64;
// for permission manager, tells where we run the code.
enum class ProcessLevelRing : Int32
@@ -291,7 +291,6 @@ namespace Kernel
private:
UserProcessTeam mTeam;
-
};
/*
diff --git a/dev/zka/NewKit/Macros.h b/dev/zka/NewKit/Macros.h
index 5f08c12a..848ec010 100644
--- a/dev/zka/NewKit/Macros.h
+++ b/dev/zka/NewKit/Macros.h
@@ -56,6 +56,10 @@
#define __ZKA_VER__ (2024)
#endif // !__ZKA_VER__
+#ifndef EXTERN
+#define EXTERN extern
+#endif
+
#ifndef EXTERN_C
#define EXTERN_C extern "C"
#endif