summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal <amlalelmahrouss@icloud.com>2024-12-07 10:02:20 +0100
committerAmlal <amlalelmahrouss@icloud.com>2024-12-07 10:02:20 +0100
commit1e5d5f717e26989933181dd3e51d7c1a94fa2d05 (patch)
tree67c24f9771468ebaa2dc256d3082b2958e9d910f
parente08cf4a6fa0fca858f6ee302b2693e9fc39df110 (diff)
META: 10:00 AM BUMP.
Signed-off-by: Amlal <amlalelmahrouss@icloud.com>
-rw-r--r--CODEOWNERS6
-rw-r--r--ReadMe.md4
-rw-r--r--compile_flags.txt3
-rw-r--r--dev/Modules/ReadMe.md9
-rw-r--r--dev/SCIKit/SysCalls.h2
-rw-r--r--dev/ZBAKit/ReadMe.md2
-rw-r--r--dev/ZKAKit/FSKit/NeFS.h12
-rw-r--r--dev/ZKAKit/FirmwareKit/EFI/EFI.h18
-rw-r--r--dev/ZKAKit/HALKit/AMD64/HalCoreScheduler.cc (renamed from dev/ZKAKit/HALKit/AMD64/HalCoreMPScheduler.cc)0
-rw-r--r--dev/ZKAKit/HALKit/AMD64/ReadMe.md8
-rw-r--r--dev/ZKAKit/HALKit/AMD64/Storage/AHCI-DMA.cc68
-rw-r--r--dev/ZKAKit/KernelKit/HardwareThreadScheduler.h10
-rw-r--r--dev/ZKAKit/KernelKit/Heap.h2
-rw-r--r--dev/ZKAKit/KernelKit/LPC.h7
-rw-r--r--dev/ZKAKit/KernelKit/LoaderInterface.h6
-rw-r--r--dev/ZKAKit/src/FS/NeFS.cc10
-rw-r--r--dev/ZKAKit/src/Heap.cc10
-rw-r--r--dev/ZKAKit/src/ThreadLocalStorage.cc4
18 files changed, 103 insertions, 78 deletions
diff --git a/CODEOWNERS b/CODEOWNERS
index 901f6daa..e582db7d 100644
--- a/CODEOWNERS
+++ b/CODEOWNERS
@@ -1,4 +1,4 @@
# ZBA, SCI and ZKA are owned by Amlal.
-/dev/ZKAKit/ @amlel-el-mahrouss
-/dev/ZBAKit/ @amlel-el-mahrouss
-/dev/SCIKit/ @amlel-el-mahrouss
+/dev/ZKAKit/ @Amlal-ElMahrouss
+/dev/ZBAKit/ @Amlal-ElMahrouss
+/dev/SCIKit/ @Amlal-ElMahrouss
diff --git a/ReadMe.md b/ReadMe.md
index 98a78345..20d0b774 100644
--- a/ReadMe.md
+++ b/ReadMe.md
@@ -1,6 +1,6 @@
<!-- README of ZKA -->
-![Logo](resources/zka.svg)
+![ZKA](resources/zka.svg)
# Zeta Kernel Architecture.
@@ -21,7 +21,7 @@ A Win32 compatibility layer is available as well as ML Kits support.
Clone repository:
```
-git clone git@github.com:amlel-el-mahrouss/zka-dev.git
+git clone git@github.com:ElMahroussLogic/zka-dev.git
cd zka-dev
```
diff --git a/compile_flags.txt b/compile_flags.txt
index 0b8c8568..e094fa3e 100644
--- a/compile_flags.txt
+++ b/compile_flags.txt
@@ -8,4 +8,5 @@
-D__MINOSKRNL__
-D__FSKIT_INCLUDES_NEFS__
-D__ZKA_ED__
--xc++ \ No newline at end of file
+-xc++
+-D__AHCI__ \ No newline at end of file
diff --git a/dev/Modules/ReadMe.md b/dev/Modules/ReadMe.md
index a7179eec..fe5625b3 100644
--- a/dev/Modules/ReadMe.md
+++ b/dev/Modules/ReadMe.md
@@ -1,7 +1,12 @@
-# Kernel Modules.
+# Kernel Modules
-## About:
+## Brief
They are pluggable modules for builtin hardware support.
+## To-Do
+
+- [X] AHCI kernel module.
+- [X] MBCI kernel module.
+
###### Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved. All rights reserved.
diff --git a/dev/SCIKit/SysCalls.h b/dev/SCIKit/SysCalls.h
index 563c8d69..643045ac 100644
--- a/dev/SCIKit/SysCalls.h
+++ b/dev/SCIKit/SysCalls.h
@@ -11,7 +11,7 @@ Purpose: SCIKit Macros header.
#include <SCIKit/Macros.h>
-/// @brief Here we define filesystem calls.
+/// @brief In this file we define filesystem calls.
SYSCALL_DECL(FCloseFile, const SCIObject handle);
SYSCALL_DECL(FOpenFile, const Char* name, const Char* rest);
diff --git a/dev/ZBAKit/ReadMe.md b/dev/ZBAKit/ReadMe.md
index d7dc06ec..d2acc502 100644
--- a/dev/ZBAKit/ReadMe.md
+++ b/dev/ZBAKit/ReadMe.md
@@ -8,7 +8,7 @@ You need:
Start by cloning the repo:
```
-git clone git@github.com:amlel-el-mahrouss/zka-dev.git
+git clone git@github.com:ElMahroussLogic/zka-dev.git
```
And then execute:
diff --git a/dev/ZKAKit/FSKit/NeFS.h b/dev/ZKAKit/FSKit/NeFS.h
index bb7d4877..fe5d9bdc 100644
--- a/dev/ZKAKit/FSKit/NeFS.h
+++ b/dev/ZKAKit/FSKit/NeFS.h
@@ -239,15 +239,15 @@ namespace Kernel
/// @param theFork the fork itself.
/// @return the fork
_Output NFS_FORK_STRUCT* CreateFork(_Input NFS_CATALOG_STRUCT* catalog,
- _Input NFS_FORK_STRUCT& theFork);
+ _Input NFS_FORK_STRUCT& theFork);
/// @brief Find fork inside New filesystem.
/// @param catalog the catalog.
/// @param name the fork name.
/// @return the fork.
_Output NFS_FORK_STRUCT* FindFork(_Input NFS_CATALOG_STRUCT* catalog,
- _Input const Char* name,
- Boolean dataOrRsrc);
+ _Input const Char* name,
+ Boolean dataOrRsrc);
_Output Void RemoveFork(_Input NFS_FORK_STRUCT* fork);
@@ -257,7 +257,7 @@ namespace Kernel
_Output NFS_CATALOG_STRUCT* GetCatalog(_Input const Char* name);
- _Output NFS_CATALOG_STRUCT* CreateCatalog(_Input const Char* name,
+ _Output NFS_CATALOG_STRUCT* CreateCatalog(_Input const Char* name,
_Input const Int32& flags,
_Input const Int32& kind);
@@ -267,12 +267,12 @@ namespace Kernel
_Input Bool isRsrcFork,
_Input VoidPtr data,
_Input SizeT sizeOfData,
- _Input const Char* forkName);
+ _Input const Char* forkName);
VoidPtr ReadCatalog(_Input _Output NFS_CATALOG_STRUCT* catalog,
_Input Bool isRsrcFork,
_Input SizeT dataSz,
- _Input const Char* forkName);
+ _Input const Char* forkName);
bool Seek(_Input _Output NFS_CATALOG_STRUCT* catalog, SizeT off);
diff --git a/dev/ZKAKit/FirmwareKit/EFI/EFI.h b/dev/ZKAKit/FirmwareKit/EFI/EFI.h
index 3ccdf775..0565b3eb 100644
--- a/dev/ZKAKit/FirmwareKit/EFI/EFI.h
+++ b/dev/ZKAKit/FirmwareKit/EFI/EFI.h
@@ -823,11 +823,11 @@ typedef struct _EfiProcessorInformation
typedef EfiStatusType EFI_API (*EfiMpServicesGetNumberOfProcessors)(
IN struct _EfiMpServicesProtocol* Self,
- OUT UInt32* NumberOfProcessors,
- OUT UInt32* NumberOfEnabledProcessors);
+ OUT UInt32* NumberOfProcessors,
+ OUT UInt32* NumberOfEnabledProcessors);
typedef EfiStatusType EFI_API (*EfiMpServicesGetProcessorInfo)(
- IN struct _EfiMpServicesProtocol* Self,
+ IN struct _EfiMpServicesProtocol* Self,
IN UInt32* ProcessorNumber,
OUT struct _EfiProcessorInformation* NumberOfEnabledProcessors);
@@ -840,8 +840,8 @@ typedef EfiStatusType EFI_API (*EfiMpServicesStartupAllAPS)(
IN Boolean SingleThread,
IN VoidPtr WaitEvent OPTIONAL, // EFI_EVENT first, but unused here.
IN UInt32 TimeoutInMicroSeconds,
- IN Void* ProcedureArgument OPTIONAL,
- OUT UInt32** FailedCpuList OPTIONAL);
+ IN Void* ProcedureArgument OPTIONAL,
+ OUT UInt32** FailedCpuList OPTIONAL);
typedef EfiStatusType EFI_API (*EfiMpServicesSwitchBSP)(
IN struct _EfiMpServicesProtocol* Self,
@@ -854,18 +854,18 @@ typedef EfiStatusType EFI_API (*EfiMpServicesStartupThisAP)(
IN UInt32 ProcessorNumber,
IN VoidPtr WaitEvent OPTIONAL,
IN UInt32 TimeoutInMicroseconds,
- IN Void* ProcedureArgument OPTIONAL,
- OUT Boolean* Finished OPTIONAL);
+ IN Void* ProcedureArgument OPTIONAL,
+ OUT Boolean* Finished OPTIONAL);
typedef EfiStatusType EFI_API (*EfiMpServicesDisableThisAP)(
IN struct _EfiMpServicesProtocol* Self,
IN UInt32 ProcessorNumber,
IN Boolean EnableAP,
- IN UInt32* HealthFlag OPTIONAL);
+ IN UInt32* HealthFlag OPTIONAL);
typedef EfiStatusType EFI_API (*EfiMpServicesWhoAmI)(
IN struct _EfiMpServicesProtocol* Self,
- OUT UInt32* ProcessorNumber);
+ OUT UInt32* ProcessorNumber);
typedef struct _EfiMpServicesProtocol
{
diff --git a/dev/ZKAKit/HALKit/AMD64/HalCoreMPScheduler.cc b/dev/ZKAKit/HALKit/AMD64/HalCoreScheduler.cc
index 9c1e91b4..9c1e91b4 100644
--- a/dev/ZKAKit/HALKit/AMD64/HalCoreMPScheduler.cc
+++ b/dev/ZKAKit/HALKit/AMD64/HalCoreScheduler.cc
diff --git a/dev/ZKAKit/HALKit/AMD64/ReadMe.md b/dev/ZKAKit/HALKit/AMD64/ReadMe.md
index 7364b8e6..300a7a75 100644
--- a/dev/ZKAKit/HALKit/AMD64/ReadMe.md
+++ b/dev/ZKAKit/HALKit/AMD64/ReadMe.md
@@ -1,4 +1,8 @@
# AMD64 Hardware Abstraction Layer
-- Supported CPU: AMD64 CPU.
-- Supported Firmware: EDK 2 w/ ZKA's own extensions for EPM.
+## Brief
+
+- Supported CPU: AMD64 BASED CPUs.
+- Supported Firmware: EDK 2.
+
+###### Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved. All rights reserved. \ No newline at end of file
diff --git a/dev/ZKAKit/HALKit/AMD64/Storage/AHCI-DMA.cc b/dev/ZKAKit/HALKit/AMD64/Storage/AHCI-DMA.cc
index fd543d4c..106a06b1 100644
--- a/dev/ZKAKit/HALKit/AMD64/Storage/AHCI-DMA.cc
+++ b/dev/ZKAKit/HALKit/AMD64/Storage/AHCI-DMA.cc
@@ -15,6 +15,9 @@
*
*/
+#include <KernelKit/UserProcessScheduler.h>
+#include <KernelKit/LPC.h>
+
#include <Modules/ATA/ATA.h>
#include <Modules/AHCI/AHCI.h>
#include <KernelKit/PCI/Iterator.h>
@@ -23,17 +26,17 @@
#ifdef __AHCI__
-#define AHCI_START_ADDRESS mib_cast(4) // 4M
-
#define HBA_ERR_TFE (1 << 30)
#define HBA_PxCMD_ST 0x0001
#define HBA_PxCMD_FRE 0x0010
#define HBA_PxCMD_FR 0x4000
#define HBA_PxCMD_CR 0x8000
-#define AHCI_LBA_MODE (1 << 6)
+#define kAhciStartAddress mib_cast(4)
+
+#define kAhciLBAMode (1 << 6)
-#define kMaxAhciPoll (100000U)
+#define kAhciMaxPoll (100000U)
#define kCmdOrCtrlCmd 1
#define kCmdOrCtrlCtrl 0
@@ -49,7 +52,7 @@ enum
};
STATIC Kernel::PCI::Device kAhciDevice;
-STATIC HbaPort* kAhciPort = nullptr;
+STATIC HbaPort* kAhciPort = nullptr;
STATIC Kernel::Lba kCurrentDiskSectorCount = 0UL;
Kernel::Void drv_calculate_disk_geometry()
@@ -127,29 +130,29 @@ Kernel::Boolean drv_std_init(Kernel::UInt16& PortsImplemented)
// do in-between
- kAhciPort->Clb = AHCI_START_ADDRESS + (ahci_index << 10);
+ kAhciPort->Clb = kAhciStartAddress + (ahci_index << 10);
kAhciPort->Clbu = 0;
- rt_set_memory((void*)(kAhciPort->Clb), 0, 1024);
+ rt_set_memory((Kernel::VoidPtr)((Kernel::UIntPtr)kAhciPort->Clb + kAhciPort->Clbu), 0, 1024);
// FIS offset: 32K+256*ahci_index
// FIS entry size = 256 bytes per port
- kAhciPort->Fb = AHCI_START_ADDRESS + (32 << 10) + (ahci_index << 8);
+ kAhciPort->Fb = kAhciStartAddress + (32 << 10) + (ahci_index << 8);
kAhciPort->Fbu = 0;
- rt_set_memory((void*)(kAhciPort->Fb), 0, 256);
+ rt_set_memory((Kernel::VoidPtr)((Kernel::UIntPtr)kAhciPort->Fb + kAhciPort->Fbu), 0, 256);
// Command table offset: 40K + 8K*ahci_index
// Command table size = 256*32 = 8K per port
- HbaCmdHeader* cmdheader = (HbaCmdHeader*)(kAhciPort->Clb);
+ HbaCmdHeader* cmd_header = (HbaCmdHeader*)((Kernel::UIntPtr)kAhciPort->Clb + kAhciPort->Clbu);
- for (int i = 0; i < 32; i++)
+ for (SizeT i = 0; i < 32; i++)
{
- cmdheader[i].Prdtl = 8; // 8 prdt entries per command table
- // 256 bytes per command table, 64+16+48+16*8
+ cmd_header[i].Prdtl = 8; // 8 prdt entries per command table
+ // 256 bytes per command table, 64+16+48+16*8
// Command table offset: 40K + 8K*ahci_index + cmdheader_index*256
- cmdheader[i].Ctba = AHCI_START_ADDRESS + (40 << 10) + (ahci_index << 13) + (i << 8);
- cmdheader[i].Ctbau = 0;
+ cmd_header[i].Ctba = kAhciStartAddress + (40 << 10) + (ahci_index << 13) + (i << 8);
+ cmd_header[i].Ctbau = 0;
- rt_set_memory((void*)cmdheader[i].Ctba, 0, 256);
+ rt_set_memory((VoidPtr)((Kernel::UIntPtr)cmd_header[i].Ctba + cmd_header[i].Ctbau), 0, 256);
}
// when it's starting
@@ -194,8 +197,9 @@ Kernel::Void drv_std_write(Kernel::UInt64 lba, Kernel::Char* buffer, Kernel::Siz
Kernel::Void drv_std_read(Kernel::UInt64 lba, Kernel::Char* buffer, Kernel::SizeT sector_cnt, Kernel::SizeT size_buffer)
{
- kAhciPort->Is = -1;
- int port = 0;
+ kAhciPort->Is = -1;
+
+ Kernel::SizeT port = 0;
Kernel::UInt32 slots = (kAhciPort->Sact | kAhciPort->Ci);
for (; port < slots; ++port)
@@ -206,19 +210,19 @@ Kernel::Void drv_std_read(Kernel::UInt64 lba, Kernel::Char* buffer, Kernel::Size
slots >>= 1;
}
- HbaCmdHeader* cmd_hdr = (HbaCmdHeader*)(kAhciPort->Clb);
+ HbaCmdHeader* cmd_hdr = (HbaCmdHeader*)((Kernel::UIntPtr)kAhciPort->Clb + kAhciPort->Clbu);
cmd_hdr += port;
cmd_hdr->Cfl = sizeof(FisRegH2D) / sizeof(Kernel::UInt32);
cmd_hdr->Write = NO;
cmd_hdr->Prdtl = (Kernel::UInt16)((sector_cnt - 1) >> 4) + 1;
- HbaCmdTbl* cmd_tbl = (HbaCmdTbl*)(cmd_hdr->Ctba);
+ HbaCmdTbl* cmd_tbl = (HbaCmdTbl*)((Kernel::UIntPtr)cmd_hdr->Ctba + cmd_hdr->Ctbau);
Kernel::rt_set_memory(cmd_tbl, 0, (cmd_hdr->Prdtl - 1) * sizeof(HbaPrdtEntry));
- int i = 0;
+ Kernel::SizeT i = 0;
- for (int i = 0; i < cmd_hdr->Prdtl - 1; i++)
+ for (Kernel::SizeT i = 0; i < cmd_hdr->Prdtl - 1; i++)
{
cmd_tbl->PrdtEntries[i].Dba = (Kernel::UInt32)(Kernel::UInt64)buffer;
cmd_tbl->PrdtEntries[i].Dbau = (Kernel::UInt32)((Kernel::UInt64)(buffer) >> 32);
@@ -240,7 +244,7 @@ Kernel::Void drv_std_read(Kernel::UInt64 lba, Kernel::Char* buffer, Kernel::Size
cmd_fis->Lba0 = (Kernel::UInt8)(Kernel::UInt32)lba & 0xFF;
cmd_fis->Lba1 = (Kernel::UInt8)((Kernel::UInt32)lba >> 8);
cmd_fis->Lba2 = (Kernel::UInt8)((Kernel::UInt32)lba >> 16);
- cmd_fis->Device = AHCI_LBA_MODE; // LBA mode
+ cmd_fis->Device = kAhciLBAMode; // LBA mode
cmd_fis->Lba3 = (Kernel::UInt8)((Kernel::UInt32)lba >> 24);
cmd_fis->Lba4 = (Kernel::UInt8)(lba >> 32);
@@ -252,13 +256,13 @@ Kernel::Void drv_std_read(Kernel::UInt64 lba, Kernel::Char* buffer, Kernel::Size
Kernel::UInt64 spin = 0UL;
// The below loop waits until the port is no longer busy before issuing a new command
- while ((kAhciPort->Tfd & (kAhciSRBsy | kAhciSRDrq)) && spin < kMaxAhciPoll)
+ while ((kAhciPort->Tfd & (kAhciSRBsy | kAhciSRDrq)) && spin < kAhciMaxPoll)
{
spin++;
}
if (spin == 1000000)
{
- kcout << "Port is hung\r";
+ kcout << "AHCI: Port is hung.\r";
return;
}
@@ -273,7 +277,11 @@ Kernel::Void drv_std_read(Kernel::UInt64 lba, Kernel::Char* buffer, Kernel::Size
break;
if (kAhciPort->Is & HBA_ERR_TFE) // Task file error
{
- kcout << ("Read disk error\r");
+ using namespace Kernel;
+ kcout << ("AHCI: Read disk error.\r");
+
+ err_global_get() = kErrorUnrecoverableDisk;
+
return;
}
}
@@ -281,8 +289,14 @@ Kernel::Void drv_std_read(Kernel::UInt64 lba, Kernel::Char* buffer, Kernel::Size
// Check again for the last time.
if (kAhciPort->Is & HBA_ERR_TFE) // task file error status
{
- kcout << ("Read disk error\r");
+ using namespace Kernel;
+
+ kcout << ("AHCI: Read disk error.\r");
*buffer = 0;
+
+ err_global_get() = kErrorUnrecoverableDisk;
+
+ return;
}
}
diff --git a/dev/ZKAKit/KernelKit/HardwareThreadScheduler.h b/dev/ZKAKit/KernelKit/HardwareThreadScheduler.h
index 44ea1042..ed2e931f 100644
--- a/dev/ZKAKit/KernelKit/HardwareThreadScheduler.h
+++ b/dev/ZKAKit/KernelKit/HardwareThreadScheduler.h
@@ -26,10 +26,10 @@ namespace Kernel
enum ThreadKind
{
kAPSystemReserved, // System reserved thread, well user can't use it
- kAPStandard, // user thread, cannot be used by Kernel
- kAPFallback, // fallback thread, cannot be used by user if not clear or
- // used by Kernel.
- kAPBoot, // The core we booted from, the mama.
+ kAPStandard, // user thread, cannot be used by Kernel
+ kAPFallback, // fallback thread, cannot be used by user if not clear or
+ // used by Kernel.
+ kAPBoot, // The core we booted from, the mama.
kInvalidAP,
kAPCount,
};
@@ -134,7 +134,7 @@ namespace Kernel
private:
Array<HardwareThread, kMaxAPInsideSched> fThreadList;
- ThreadID fCurrentThread{0};
+ ThreadID fCurrentThread{0};
};
/// @brief wakes up thread.
diff --git a/dev/ZKAKit/KernelKit/Heap.h b/dev/ZKAKit/KernelKit/Heap.h
index 999cb22d..300d30d5 100644
--- a/dev/ZKAKit/KernelKit/Heap.h
+++ b/dev/ZKAKit/KernelKit/Heap.h
@@ -66,7 +66,7 @@ namespace Kernel
{
if (*cls)
{
- ErrGlobal() = Kernel::kErrorInvalidData;
+ err_global_get() = Kernel::kErrorInvalidData;
return;
}
diff --git a/dev/ZKAKit/KernelKit/LPC.h b/dev/ZKAKit/KernelKit/LPC.h
index 0f7d84b3..e26a5f39 100644
--- a/dev/ZKAKit/KernelKit/LPC.h
+++ b/dev/ZKAKit/KernelKit/LPC.h
@@ -15,9 +15,9 @@
#define err_local_fail() (Kernel::UserProcessScheduler::The().GetCurrentProcess().Leak().GetLocalCode() != Kernel::kErrorSuccess)
#define err_local_get() (Kernel::UserProcessScheduler::The().GetCurrentProcess().Leak().GetLocalCode())
-#define ErrGlobalIsOk() (Kernel::kErrorLocalNumber == Kernel::kErrorSuccess)
-#define ErrGlobalFailed() (Kernel::kErrorLocalNumber != Kernel::kErrorSuccess)
-#define ErrGlobal() (Kernel::kErrorLocalNumber)
+#define err_global_ok() (Kernel::kErrorLocalNumber == Kernel::kErrorSuccess)
+#define err_global_fail() (Kernel::kErrorLocalNumber != Kernel::kErrorSuccess)
+#define err_global_get() (Kernel::kErrorLocalNumber)
namespace Kernel
{
@@ -56,6 +56,7 @@ namespace Kernel
inline constexpr HError kErrorSign = 60;
inline constexpr HError kErrorInvalidCreds = 61;
inline constexpr HError kErrorCDTrayBroken = 62;
+ inline constexpr HError kErrorUnrecoverableDisk = 63;
inline constexpr HError kErrorUnimplemented = 0;
/// @brief Raises a bug check stop code.
diff --git a/dev/ZKAKit/KernelKit/LoaderInterface.h b/dev/ZKAKit/KernelKit/LoaderInterface.h
index f5a34495..9323aec7 100644
--- a/dev/ZKAKit/KernelKit/LoaderInterface.h
+++ b/dev/ZKAKit/KernelKit/LoaderInterface.h
@@ -25,9 +25,9 @@ namespace Kernel
public:
virtual _Output ErrorOr<VoidPtr> GetBlob() = 0;
- virtual _Output const Char* AsString() = 0;
- virtual _Output const Char* MIME() = 0;
- virtual _Output const Char* Path() = 0;
+ virtual _Output const Char* AsString() = 0;
+ virtual _Output const Char* MIME() = 0;
+ virtual _Output const Char* Path() = 0;
virtual _Output ErrorOr<VoidPtr> FindStart() = 0;
virtual _Output VoidPtr FindSymbol(_Input const Char* name, _Input Int32 kind) = 0;
};
diff --git a/dev/ZKAKit/src/FS/NeFS.cc b/dev/ZKAKit/src/FS/NeFS.cc
index 08125add..11c43c11 100644
--- a/dev/ZKAKit/src/FS/NeFS.cc
+++ b/dev/ZKAKit/src/FS/NeFS.cc
@@ -61,7 +61,7 @@ STATIC MountpointInterface kDiskMountpoint;
/// @return the fork
/***********************************************************************************/
_Output NFS_FORK_STRUCT* NeFSParser::CreateFork(_Input NFS_CATALOG_STRUCT* catalog,
- _Input NFS_FORK_STRUCT& the_fork)
+ _Input NFS_FORK_STRUCT& the_fork)
{
if (catalog && the_fork.ForkName[0] != 0 &&
the_fork.DataSize <= kNeFSForkDataSz)
@@ -170,8 +170,8 @@ _Output NFS_FORK_STRUCT* NeFSParser::CreateFork(_Input NFS_CATALOG_STRUCT* catal
/// @return the fork.
/***********************************************************************************/
_Output NFS_FORK_STRUCT* NeFSParser::FindFork(_Input NFS_CATALOG_STRUCT* catalog,
- _Input const Char* name,
- Boolean isDataFork)
+ _Input const Char* name,
+ Boolean isDataFork)
{
auto drv = kDiskMountpoint.A();
NFS_FORK_STRUCT* the_fork = nullptr;
@@ -236,7 +236,7 @@ _Output NFS_CATALOG_STRUCT* NeFSParser::CreateCatalog(_Input const Char* name)
/// @param kind the catalog kind.
/// @return catalog pointer.
/***********************************************************************************/
-_Output NFS_CATALOG_STRUCT* NeFSParser::CreateCatalog(_Input const Char* name,
+_Output NFS_CATALOG_STRUCT* NeFSParser::CreateCatalog(_Input const Char* name,
_Input const Int32& flags,
_Input const Int32& kind)
{
@@ -936,7 +936,7 @@ Boolean NeFSParser::RemoveCatalog(_Input const Char* catalogName)
VoidPtr NeFSParser::ReadCatalog(_Input _Output NFS_CATALOG_STRUCT* catalog,
_Input Bool is_rsrc_fork,
_Input SizeT dataSz,
- _Input const Char* forkName)
+ _Input const Char* forkName)
{
if (!catalog)
{
diff --git a/dev/ZKAKit/src/Heap.cc b/dev/ZKAKit/src/Heap.cc
index 9c46f312..4a780521 100644
--- a/dev/ZKAKit/src/Heap.cc
+++ b/dev/ZKAKit/src/Heap.cc
@@ -20,7 +20,7 @@
------------------------------------------- */
//! @file Heap.cc
-//! @brief The Kernel's heap manager serves as the main memory manager.
+//! @brief This serves as the main memory manager.
#define kKernelHeapMagic (0xD4D7D5)
#define kKernelHeapAlignSz (__BIGGEST_ALIGNMENT__)
@@ -95,7 +95,7 @@ namespace Kernel
/// @brief Declare a new size for ptr_heap.
/// @param ptr_heap the pointer.
/// @return Newly allocated heap header.
- VoidPtr mm_realloc_heap(VoidPtr ptr_heap, SizeT new_sz)
+ _Output VoidPtr mm_realloc_heap(VoidPtr ptr_heap, SizeT new_sz)
{
if (Detail::mm_check_heap_address(ptr_heap) == No)
return nullptr;
@@ -168,7 +168,7 @@ namespace Kernel
heap_info_ptr->fPage = true;
- kcout << "Created Page address: " << hex_number(reinterpret_cast<UIntPtr>(heap_info_ptr)) << endl;
+ kcout << "Created page address: " << hex_number(reinterpret_cast<UIntPtr>(heap_info_ptr)) << endl;
return kErrorSuccess;
}
@@ -284,7 +284,7 @@ namespace Kernel
/// @brief Protect the heap with a CRC value.
/// @param heap_ptr HIB pointer.
/// @return if it valid: point has crc now., otherwise fail.
- Boolean mm_protect_heap(VoidPtr heap_ptr)
+ _Output Boolean mm_protect_heap(VoidPtr heap_ptr)
{
if (heap_ptr)
{
@@ -292,7 +292,7 @@ namespace Kernel
reinterpret_cast<Detail::HEAP_INFORMATION_BLOCK_PTR>(
(UIntPtr)heap_ptr - sizeof(Detail::HEAP_INFORMATION_BLOCK));
- if (heap_ptr && heap_info_ptr->fPresent && kKernelHeapMagic == heap_info_ptr->fMagic)
+ if (heap_info_ptr && heap_info_ptr->fPresent && kKernelHeapMagic == heap_info_ptr->fMagic)
{
heap_info_ptr->fCRC32 =
ke_calculate_crc32((Char*)heap_info_ptr->fHeapPtr, heap_info_ptr->fHeapSize);
diff --git a/dev/ZKAKit/src/ThreadLocalStorage.cc b/dev/ZKAKit/src/ThreadLocalStorage.cc
index 5fdf56aa..86bb88ae 100644
--- a/dev/ZKAKit/src/ThreadLocalStorage.cc
+++ b/dev/ZKAKit/src/ThreadLocalStorage.cc
@@ -32,8 +32,8 @@ Boolean tls_check_tib(THREAD_INFORMATION_BLOCK* tib_ptr)
!tib_ptr->Record)
return false;
- ICodec encoder;
- const Char* tib_as_bytes = encoder.AsBytes(tib_ptr);
+ ICodec encoder;
+ const Char* tib_as_bytes = encoder.AsBytes(tib_ptr);
kcout << "Checking for a valid cookie inside the TIB...\r";