diff options
| author | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-08-04 12:16:22 +0200 |
|---|---|---|
| committer | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-08-04 12:16:22 +0200 |
| commit | cd400898f5a6ef04690231323c0be107ae330fb4 (patch) | |
| tree | b94f98443797dcc0e4e0cdea4410a667e26391bc /Kernel | |
| parent | d335a696d5aaf8f40d2f30555a2e1fe97a8f9e5c (diff) | |
[META] bump.
Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Kernel')
| -rw-r--r-- | Kernel/CRT/__mpcc_alloca.hxx | 15 | ||||
| -rw-r--r-- | Kernel/CRT/__mpcc_defines.hxx | 98 | ||||
| -rw-r--r-- | Kernel/CRT/__mpcc_exception.hxx | 46 | ||||
| -rw-r--r-- | Kernel/CRT/__mpcc_malloc.hxx | 30 | ||||
| -rw-r--r-- | Kernel/FSKit/NewFS.hxx | 8 | ||||
| -rw-r--r-- | Kernel/FirmwareKit/EPM.hxx | 16 | ||||
| -rw-r--r-- | Kernel/HALKit/AMD64/HalBoot.asm | 7 | ||||
| -rw-r--r-- | Kernel/KernelKit/ProcessScheduler.hxx | 2 | ||||
| -rw-r--r-- | Kernel/KernelRsrc.rsrc | 2 | ||||
| -rw-r--r-- | Kernel/Linker/16x0.json | 2 | ||||
| -rw-r--r-- | Kernel/Linker/32x0.json | 2 | ||||
| -rw-r--r-- | Kernel/Linker/64x0.json | 2 | ||||
| -rw-r--r-- | Kernel/Linker/arm64.json | 2 | ||||
| -rw-r--r-- | Kernel/Modules/GL/.keepme | 0 | ||||
| -rw-r--r-- | Kernel/NewKit/Defines.hxx | 2 | ||||
| -rw-r--r-- | Kernel/Sources/FS/NewFS.cxx | 137 | ||||
| -rw-r--r-- | Kernel/Sources/ProcessScheduler.cxx | 2 | ||||
| -rw-r--r-- | Kernel/amd64-efi.make | 8 | ||||
| -rw-r--r-- | Kernel/arm64-efi.make | 4 |
19 files changed, 128 insertions, 257 deletions
diff --git a/Kernel/CRT/__mpcc_alloca.hxx b/Kernel/CRT/__mpcc_alloca.hxx deleted file mode 100644 index 02b31230..00000000 --- a/Kernel/CRT/__mpcc_alloca.hxx +++ /dev/null @@ -1,15 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Technologies - -------------------------------------------- */ - -#pragma once - -typedef void* ptr_type; -typedef __SIZE_TYPE__ size_type; - -inline void* __mpcc_alloca_gcc(size_type sz) -{ - return __builtin_alloca(sz); -} diff --git a/Kernel/CRT/__mpcc_defines.hxx b/Kernel/CRT/__mpcc_defines.hxx deleted file mode 100644 index 9dfe51af..00000000 --- a/Kernel/CRT/__mpcc_defines.hxx +++ /dev/null @@ -1,98 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Technologies - -------------------------------------------- */ - -#ifndef __MPCC_DEFINES_HXX__ -#define __MPCC_DEFINES_HXX__ - -#ifndef __GNUC__ - -typedef __SIZE_TYPE__ size_t; - -#ifdef __LP64__ -typedef long int ssize_t; -#else -typedef int ssize_t; -#endif // __LP64__ - -typedef size_t ptrdiff_t; -typedef size_t uintptr_t; -typedef void* voidptr_t; -typedef void* any_t; -typedef char* caddr_t; - -#ifndef NULL -#define NULL ((voidptr_t)0) -#endif // !null - -#ifdef __GNUC__ -#include <CRT/__mpcc_alloca.hxx> -#define __mpcc_alloca(sz) __mpcc_alloca_gcc(sz) -#elif defined(__NDK__) - -#define __alloca(sz) __mpcc_alloca(sz) -#endif - -#define __deref(ptr) (*(ptr)) - -#ifdef __cplusplus -#define __init_decl() \ - extern "C" \ - { -#define __fini_decl() \ - } \ - ; -#else -#define __init_decl() -#define __fini_decl() -#endif - -#if __has_builtin(__builtin_alloca) -#define alloca(sz) __builtin_alloca(sz) -#ifdef __alloca -#undef __alloca -#endif -#define __alloca alloca -#else -#warning alloca not detected -#endif - -typedef long long off_t; -typedef unsigned long long uoff_t; - -typedef union float_cast { - struct - { - unsigned int mantissa : 23; - unsigned int exponent : 8; - unsigned int sign : 1; - }; - - float f; -} __attribute__((packed)) float_cast_t; - -typedef union double_cast { - struct - { - unsigned long long int mantissa : 52; - unsigned int exponent : 11; - unsigned int sign : 1; - }; - - double f; -} __attribute__((packed)) double_cast_t; - -#endif // ifndef __GNUC__ - -/// Include these helpers as well. - -#ifdef __STD_CXX__ - -#include <CRT/__mpcc_exception.hxx> -#include <CRT/__mpcc_malloc.hxx> - -#endif // ifdef __STD_CXX__ - -#endif /* __MPCC_DEFINES_HXX__ */ diff --git a/Kernel/CRT/__mpcc_exception.hxx b/Kernel/CRT/__mpcc_exception.hxx deleted file mode 100644 index 0cf9fb23..00000000 --- a/Kernel/CRT/__mpcc_exception.hxx +++ /dev/null @@ -1,46 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Technologies - -------------------------------------------- */ - -#pragma once - -#include <KernelKit/DebugOutput.hxx> - -/// @brief Standard C++ namespace -namespace std -{ -#ifdef __x86_64__ -#ifdef __KERNEL__ - inline void __throw_general(void) - { - __asm__("int $0xD"); - } -#else - inline void __throw_general(void) - { - __exit(33); - } -#endif -#else - inline void __throw_general(void) - { - __exit(33); - } -#endif // if __x86_64__ - - inline void __throw_domain_error(const char* error) - { - Kernel::kcout << "MPCC C++: Domain error: " << error << "\r"; - __throw_general(); - CANT_REACH(); // prevent from continuing. - } - - inline void __throw_bad_array_new_length(void) - { - Kernel::kcout << "MPCC C++: Bad array length.\r"; - __throw_general(); - CANT_REACH(); // prevent from continuing. - } -} // namespace std diff --git a/Kernel/CRT/__mpcc_malloc.hxx b/Kernel/CRT/__mpcc_malloc.hxx deleted file mode 100644 index 95a27f86..00000000 --- a/Kernel/CRT/__mpcc_malloc.hxx +++ /dev/null @@ -1,30 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Technologies - -------------------------------------------- */ - -#pragma once - -#include <NewKit/Defines.hxx> - -namespace stdx -{ - /// @brief allocate a new class. - /// @tparam KindClass the class type to allocate. - template <typename KindClass, typename... Args> - inline Kernel::VoidPtr allocate(Args&&... args) - { - return new KindClass(Kernel::forward(args)...); - } - - /// @brief free a class. - /// @tparam KindClass the class type to allocate. - template <typename KindClass> - inline Kernel::Void release(KindClass ptr) - { - if (!ptr) - return; - delete ptr; - } -} // namespace stdx diff --git a/Kernel/FSKit/NewFS.hxx b/Kernel/FSKit/NewFS.hxx index b0530e0e..566904ef 100644 --- a/Kernel/FSKit/NewFS.hxx +++ b/Kernel/FSKit/NewFS.hxx @@ -186,7 +186,9 @@ struct PACKED NFS_ROOT_PARTITION_BLOCK final Kernel::UInt64 Version; - Kernel::Char Pad[kNewFSPadLen]; + Kernel::Lba EpmBlock; + + Kernel::Char Pad[kNewFSPadLen-sizeof(Kernel::Lba)]; }; namespace Kernel @@ -252,7 +254,7 @@ namespace Kernel _Output NFS_CATALOG_STRUCT* CreateCatalog(_Input const char* name); - bool WriteCatalog(_Input _Output NFS_CATALOG_STRUCT* catalog, + Bool WriteCatalog(_Input _Output NFS_CATALOG_STRUCT* catalog, voidPtr data, SizeT sizeOfData, _Input const char* forkName); @@ -272,7 +274,7 @@ namespace Kernel /// @brief Make a EPM+NewFS drive out of the disk. /// @param drive The drive to write on. /// @return If it was sucessful, see ErrLocal(). - bool Format(_Input _Output DriveTrait* drive); + bool Format(_Input _Output DriveTrait* drive, _Input const Lba endLba, _Input const Int32 flags, const Char* part_name); public: Int32 fDriveIndex{kNewFSSubDriveC}; diff --git a/Kernel/FirmwareKit/EPM.hxx b/Kernel/FirmwareKit/EPM.hxx index d7038ff7..2605ec24 100644 --- a/Kernel/FirmwareKit/EPM.hxx +++ b/Kernel/FirmwareKit/EPM.hxx @@ -63,13 +63,18 @@ ///! Anything below is reserved for Data backup by the Main OS. #define kEPMStartPartitionBlk (sizeof(_BOOT_BLOCK_STRUCT)) -///! @brief Current EPM revision +///! @brief Current EPM revision. #define kEPMRevision (0xAD) -///! @brief Current EPM revision + +///! @brief Current EPM revision. #define kEPMRevisionUEFI (0xAF) -/// !@brief EPM base address + +/// !@brief EPM base address. #define kEpmBase (0U) +struct _BLOCK_GUID_STRUCT; +struct _BOOT_BLOCK_STRUCT; + /* The first 0 > 128 addresses of a disk contains these headers. */ /// @brief EPM GUID structure. @@ -93,11 +98,12 @@ struct PACKED _BOOT_BLOCK_STRUCT Kernel::Int32 Version; Kernel::Int64 NumBlocks; Kernel::Int64 SectorSz; - Kernel::Int64 LbaStart; + Kernel::Int64 LbaStart; // base offset + Kernel::Int64 LbaEnd; // addition of lba_start to get the end of partition. Kernel::Int16 Kind; Kernel::Int32 FsVersion; Kernel::Char Fs[kEPMFilesystemLength]; /* NewFS, ffs2... */ - Kernel::Char Reserved[409]; // to fill a full sector. + Kernel::Char Reserved[401]; // to fill a full sector. }; ///! @brief Version kind enum. diff --git a/Kernel/HALKit/AMD64/HalBoot.asm b/Kernel/HALKit/AMD64/HalBoot.asm index 8cb55a20..f03982e6 100644 --- a/Kernel/HALKit/AMD64/HalBoot.asm +++ b/Kernel/HALKit/AMD64/HalBoot.asm @@ -23,3 +23,10 @@ HandoverType: dw kTypeKernel HandoverArch: dw kArchAmd64 ;; This NewBootStart points to Main. HandoverStart: dq hal_init_platform + +section .text + +[global ke_startup_platform] + +ke_startup_platform: + ret
\ No newline at end of file diff --git a/Kernel/KernelKit/ProcessScheduler.hxx b/Kernel/KernelKit/ProcessScheduler.hxx index a6d55c24..4b149a52 100644 --- a/Kernel/KernelKit/ProcessScheduler.hxx +++ b/Kernel/KernelKit/ProcessScheduler.hxx @@ -208,7 +208,7 @@ namespace Kernel //! @return Int32 local error code. Int32& GetLocalCode() noexcept; - const ProcessLevelRing& GetSelector() noexcept; + const ProcessLevelRing& GetLevelRing() noexcept; const ProcessStatus& GetStatus() noexcept; const AffinityKind& GetAffinity() noexcept; diff --git a/Kernel/KernelRsrc.rsrc b/Kernel/KernelRsrc.rsrc index 5a6f41ee..4cf7e352 100644 --- a/Kernel/KernelRsrc.rsrc +++ b/Kernel/KernelRsrc.rsrc @@ -15,7 +15,7 @@ BEGIN VALUE "FileVersion", KERNEL_VERSION VALUE "InternalName", "newoskrnl" VALUE "LegalCopyright", "(c) ZKA Technologies, all rights reserved." - VALUE "OriginalFilename", "newoskrnl.exe" + VALUE "OriginalFilename", "newoskrnl.dll" VALUE "ProductName", "newoskrnl" VALUE "ProductVersion", KERNEL_VERSION END diff --git a/Kernel/Linker/16x0.json b/Kernel/Linker/16x0.json index fd7f167a..9c284b53 100644 --- a/Kernel/Linker/16x0.json +++ b/Kernel/Linker/16x0.json @@ -1,7 +1,7 @@ { "linker": "link.exe", "executable_type": "kernel", - "output_name": "newoskrnl.exe", + "output_name": "newoskrnl.dll", "start_proc": "__ImageStart", "arch": "16x0", "format": "PEF" diff --git a/Kernel/Linker/32x0.json b/Kernel/Linker/32x0.json index a827de05..05a3db9b 100644 --- a/Kernel/Linker/32x0.json +++ b/Kernel/Linker/32x0.json @@ -1,7 +1,7 @@ { "linker": "link.exe", "executable_type": "kernel", - "output_name": "newoskrnl.exe", + "output_name": "newoskrnl.dll", "start_proc": "__ImageStart", "arch": "32x0", "format": "PEF" diff --git a/Kernel/Linker/64x0.json b/Kernel/Linker/64x0.json index f1a6611e..c1d0e388 100644 --- a/Kernel/Linker/64x0.json +++ b/Kernel/Linker/64x0.json @@ -1,7 +1,7 @@ { "linker": "link.exe", "executable_type": "kernel", - "output_name": "newoskrnl.exe", + "output_name": "newoskrnl.dll", "start_proc": "__ImageStart", "arch": "64x0", "format": "PEF" diff --git a/Kernel/Linker/arm64.json b/Kernel/Linker/arm64.json index eb7ff4d2..99c190bf 100644 --- a/Kernel/Linker/arm64.json +++ b/Kernel/Linker/arm64.json @@ -1,7 +1,7 @@ { "linker": "link.exe", "executable_type": "kernel", - "output_name": "newoskrnl.exe", + "output_name": "newoskrnl.dll", "start_proc": "__ImageStart", "arch": "arm64", "format": "PEF" diff --git a/Kernel/Modules/GL/.keepme b/Kernel/Modules/GL/.keepme new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/Kernel/Modules/GL/.keepme diff --git a/Kernel/NewKit/Defines.hxx b/Kernel/NewKit/Defines.hxx index a934494d..54bf55a2 100644 --- a/Kernel/NewKit/Defines.hxx +++ b/Kernel/NewKit/Defines.hxx @@ -11,7 +11,7 @@ #define NEWKIT_VERSION "1.01" #if !defined(_INC_NO_STDC_HEADERS) && defined(__GNUC__) -#include <CRT/__mpcc_defines.hxx> +#include <CRTKit/__mpcc_defines.hxx> #endif #ifdef __has_feature diff --git a/Kernel/Sources/FS/NewFS.cxx b/Kernel/Sources/FS/NewFS.cxx index f9b08bcf..c5b9c1e3 100644 --- a/Kernel/Sources/FS/NewFS.cxx +++ b/Kernel/Sources/FS/NewFS.cxx @@ -23,7 +23,7 @@ using namespace Kernel; #ifdef __ED__ /** - Define those external symbols, to make the editor shutup + Define those external symbols, to make the editor shutup */ /// @brief get sector count. @@ -34,7 +34,6 @@ Kernel::SizeT drv_std_get_drv_size(); #endif - ///! BUGS: 0 /***********************************************************************************/ @@ -53,7 +52,7 @@ STATIC MountpointInterface sMountpointInterface; /// @param theFork the fork itself. /// @return the fork _Output NFS_FORK_STRUCT* NewFSParser::CreateFork(_Input NFS_CATALOG_STRUCT* catalog, - _Input NFS_FORK_STRUCT& theFork) + _Input NFS_FORK_STRUCT& theFork) { if (!sMountpointInterface.GetAddressOf(this->fDriveIndex)) return nullptr; @@ -77,7 +76,7 @@ _Output NFS_FORK_STRUCT* NewFSParser::CreateFork(_Input NFS_CATALOG_STRUCT* cata NFS_FORK_STRUCT curFork{0}; NFS_FORK_STRUCT prevFork{0}; - Lba lbaOfPreviousFork = lba; + Lba lbaOfPreviousFork = lba; /// do not check for anything. Loop until we get what we want, that is a free fork zone. while (true) @@ -160,10 +159,10 @@ _Output NFS_FORK_STRUCT* NewFSParser::CreateFork(_Input NFS_CATALOG_STRUCT* cata /// @param name the fork name. /// @return the fork. _Output NFS_FORK_STRUCT* NewFSParser::FindFork(_Input NFS_CATALOG_STRUCT* catalog, - _Input const Char* name, - Boolean isDataFork) + _Input const Char* name, + Boolean isDataFork) { - auto drv = sMountpointInterface.GetAddressOf(this->fDriveIndex); + auto drv = sMountpointInterface.GetAddressOf(this->fDriveIndex); NFS_FORK_STRUCT* theFork = nullptr; Lba lba = isDataFork ? catalog->DataFork : catalog->ResourceFork; @@ -223,8 +222,8 @@ _Output NFS_CATALOG_STRUCT* NewFSParser::CreateCatalog(_Input const char* name) /// @param kind the catalog kind. /// @return catalog pointer. _Output NFS_CATALOG_STRUCT* NewFSParser::CreateCatalog(_Input const char* name, - _Input const Int32& flags, - _Input const Int32& kind) + _Input const Int32& flags, + _Input const Int32& kind) { if (!sMountpointInterface.GetAddressOf(this->fDriveIndex)) return nullptr; @@ -447,8 +446,12 @@ _Output NFS_CATALOG_STRUCT* NewFSParser::CreateCatalog(_Input const char* name, /// @brief Make a EPM+NewFS drive out of the disk. /// @param drive The drive to write on. /// @return If it was sucessful, see ErrLocal(). -bool NewFSParser::Format(_Input _Output DriveTrait* drive) +bool NewFSParser::Format(_Input _Output DriveTrait* drive, _Input const Lba endLba, _Input const Int32 flags, const Char* part_name) { + if (*part_name == 0 || + endLba == 0) + return false; + // verify disk. drive->fVerify(&drive->fPacket); @@ -464,14 +467,78 @@ bool NewFSParser::Format(_Input _Output DriveTrait* drive) Char sectorBuf[kNewFSSectorSz] = {0}; + Lba start = kNewFSStartLba; + drive->fPacket.fPacketContent = sectorBuf; drive->fPacket.fPacketSize = kNewFSSectorSz; - drive->fPacket.fLba = kNewFSStartLba; + drive->fPacket.fLba = start; drive->fInput(&drive->fPacket); + if (flags & kNewFSPartitionTypeBoot) + { + // make it bootable when needed. + Char bufEpmHdr[kNewFSSectorSz] = {0}; + + BOOT_BLOCK_STRUCT* epmBoot = (BOOT_BLOCK_STRUCT*)bufEpmHdr; + + constexpr auto cFsName = "NewFS"; + constexpr auto cBlockName = "ZKA:"; + + rt_copy_memory(reinterpret_cast<VoidPtr>(const_cast<Char*>(cFsName)), epmBoot->Fs, rt_string_len(cFsName)); + + epmBoot->FsVersion = kNewFSVersionInteger; + epmBoot->LbaStart = 0; + epmBoot->SectorSz = kNewFSSectorSz; + + rt_copy_memory(reinterpret_cast<VoidPtr>(const_cast<Char*>(cBlockName)), epmBoot->Name, rt_string_len(cBlockName)); + rt_copy_memory(reinterpret_cast<VoidPtr>(const_cast<Char*>(kEPMMagic)), epmBoot->Magic, rt_string_len(kEPMMagic)); + + Lba outEpmLba = kEpmBase; + + Char buf[kNewFSSectorSz]; + + Lba prevStart = 0; + SizeT cnt = 0; + + while (drive->fPacket.fPacketGood) + { + drive->fPacket.fPacketContent = buf; + drive->fPacket.fPacketSize = kNewFSSectorSz; + drive->fPacket.fLba = outEpmLba; + + drive->fInput(&drive->fPacket); + + if (buf[0] == 0) + { + epmBoot->LbaStart = prevStart; + + if (epmBoot->LbaStart) + epmBoot->LbaStart = outEpmLba; + + epmBoot->LbaEnd = endLba; + epmBoot->NumBlocks = cnt; + + drive->fPacket.fPacketContent = bufEpmHdr; + drive->fPacket.fPacketSize = kNewFSSectorSz; + drive->fPacket.fLba = outEpmLba; + + drive->fOutput(&drive->fPacket); + + break; + } + else + { + prevStart = ((BOOT_BLOCK_STRUCT*)buf)->LbaStart + ((BOOT_BLOCK_STRUCT*)buf)->LbaEnd; + } + + outEpmLba += sizeof(BOOT_BLOCK_STRUCT); + ++cnt; + } + } + // disk isnt faulty and data has been fetched. - if (drive->fPacket.fPacketGood) + while (drive->fPacket.fPacketGood) { NFS_ROOT_PARTITION_BLOCK* partBlock = (NFS_ROOT_PARTITION_BLOCK*)sectorBuf; @@ -483,7 +550,7 @@ bool NewFSParser::Format(_Input _Output DriveTrait* drive) partBlock->Version = kNewFSVersionInteger; - const auto cUntitledHD = "Untitled HD\0"; + const auto cUntitledHD = part_name; rt_copy_memory((VoidPtr)kNewFSIdent, (VoidPtr)partBlock->Ident, kNewFSIdentLen); @@ -522,40 +589,18 @@ bool NewFSParser::Format(_Input _Output DriveTrait* drive) // write the root catalog. this->CreateCatalog(kNewFSRoot, 0, kNewFSCatalogKindDir); - if (partBlock->Flags & kNewFSPartitionTypeBoot) - { - // make it bootable when needed. - Char bufEpmHdr[kNewFSSectorSz] = {0}; - - BOOT_BLOCK_STRUCT* epmBoot = (BOOT_BLOCK_STRUCT*)bufEpmHdr; - - constexpr auto cFsName = "NewFS"; - constexpr auto cBlockName = "Zeta:"; - - rt_copy_memory(reinterpret_cast<VoidPtr>(const_cast<Char*>(cFsName)), epmBoot->Fs, rt_string_len(cFsName)); - - epmBoot->FsVersion = kNewFSVersionInteger; - epmBoot->LbaStart = kNewFSStartLba; - epmBoot->SectorSz = partBlock->SectorSize; - epmBoot->NumBlocks = partBlock->CatalogCount; - - rt_copy_memory(reinterpret_cast<VoidPtr>(const_cast<Char*>(cBlockName)), epmBoot->Name, rt_string_len(cBlockName)); - rt_copy_memory(reinterpret_cast<VoidPtr>(const_cast<Char*>(kEPMMagic)), epmBoot->Magic, rt_string_len(kEPMMagic)); - - drive->fPacket.fPacketContent = bufEpmHdr; - drive->fPacket.fPacketSize = (epmBoot->SectorSz); - drive->fPacket.fLba = kEpmBase; - - drive->fOutput(&drive->fPacket); - } - return true; } kcout << "newoskrnl: partition block already exists.\r"; - // return success as well, do not ignore that partition. - return true; + start += partBlock->DiskSize; + + drive->fPacket.fPacketContent = sectorBuf; + drive->fPacket.fPacketSize = kNewFSSectorSz; + drive->fPacket.fLba = start; + + drive->fInput(&drive->fPacket); } return false; @@ -650,7 +695,7 @@ bool NewFSParser::WriteCatalog(_Input _Output NFS_CATALOG_STRUCT* catalog, voidP /// @param catalogName the catalog name. /// @return the newly found catalog. _Output NFS_CATALOG_STRUCT* NewFSParser::FindCatalog(_Input const char* catalogName, - Lba& outLba) + Lba& outLba) { if (!sMountpointInterface.GetAddressOf(this->fDriveIndex)) return nullptr; @@ -823,7 +868,7 @@ Boolean NewFSParser::RemoveCatalog(_Input const Char* catalogName) drive->fPacket.fLba = outLba; // the catalog position. drive->fPacket.fPacketSize = - sizeof(NFS_CATALOG_STRUCT); // size of catalog. roughly the sector size. + sizeof(NFS_CATALOG_STRUCT); // size of catalog. roughly the sector size. drive->fPacket.fPacketContent = catalog; // the catalog itself. drive->fOutput(&drive->fPacket); // send packet. @@ -863,8 +908,8 @@ Boolean NewFSParser::RemoveCatalog(_Input const Char* catalogName) /***********************************************************************************/ VoidPtr NewFSParser::ReadCatalog(_Input _Output NFS_CATALOG_STRUCT* catalog, - _Input SizeT dataSz, - _Input const char* forkName) + _Input SizeT dataSz, + _Input const char* forkName) { if (!catalog) { diff --git a/Kernel/Sources/ProcessScheduler.cxx b/Kernel/Sources/ProcessScheduler.cxx index 55017c83..c004e932 100644 --- a/Kernel/Sources/ProcessScheduler.cxx +++ b/Kernel/Sources/ProcessScheduler.cxx @@ -151,7 +151,7 @@ namespace Kernel } /// @brief process selector getter. - const ProcessSelector& PROCESS_HEADER_BLOCK::GetSelector() noexcept + const ProcessLevelRing& PROCESS_HEADER_BLOCK::GetLevelRing() noexcept { return this->Selector; } diff --git a/Kernel/amd64-efi.make b/Kernel/amd64-efi.make index 22e958b7..6546d12d 100644 --- a/Kernel/amd64-efi.make +++ b/Kernel/amd64-efi.make @@ -5,9 +5,9 @@ CC = x86_64-w64-mingw32-g++ LD = x86_64-w64-mingw32-ld -CCFLAGS = -fshort-wchar -c -fPIC -ffreestanding -D__NEWOS_AMD64__ -mno-red-zone -fno-rtti -fno-exceptions \ +CCFLAGS = -fshort-wchar -c -shared -ffreestanding -fPIC -D__NEWOS_AMD64__ -mno-red-zone -fno-rtti -fno-exceptions \ -std=c++20 -D__NEWOS_SUPPORT_NX__ -I../Vendor -D__FSKIT_USE_NEWFS__ \ - -D__KERNEL__ -D__HAVE_MAHROUSS_APIS__ -D__MAHROUSS__ -I./ + -D__KERNEL__ -D__HAVE_MAHROUSS_APIS__ -D__MAHROUSS__ -I./ -I../ ASM = nasm @@ -35,11 +35,11 @@ COPY = cp ASMFLAGS = -f win64 # Kernel subsystem is 17 and entrypoint is __ImageStart -LDFLAGS = -e hal_init_platform --subsystem=17 +LDFLAGS = -e ke_startup_platform --subsystem=17 LDOBJ = Objects/*.obj # This file is the kernel, responsible of task management and memory. -KERNEL = newoskrnl.exe +KERNEL = newoskrnl.dll .PHONY: error error: diff --git a/Kernel/arm64-efi.make b/Kernel/arm64-efi.make index 310ffcdd..6518356f 100644 --- a/Kernel/arm64-efi.make +++ b/Kernel/arm64-efi.make @@ -7,7 +7,7 @@ CC = clang++ LD = lld-link CCFLAGS = -fshort-wchar -c -ffreestanding -MMD -mno-red-zone -D__NEWOS_ARM64__ -fno-rtti -fno-exceptions -I./ \ -target aarch64-unknown-windows \ - -std=c++20 -D__FSKIT_USE_NEWFS__ -D__ZETA_MACHINE__ -D__KERNEL__ -D__HAVE_MAHROUSS_APIS__ -D__MAHROUSS__ + -std=c++20 -D__FSKIT_USE_NEWFS__ -D__ZETA_MACHINE__ -D__KERNEL__ -D__HAVE_MAHROUSS_APIS__ -D__MAHROUSS__ -I../ ASM = clang++ @@ -27,7 +27,7 @@ LDFLAGS = -subsystem:efi_application -entry:hal_init_platform /nodefaultlib LDOBJ = Objects/*.obj # This file is the kernel, responsible of task management and memory. -KERNEL = newoskrnl.exe +KERNEL = newoskrnl.dll .PHONY: error error: |
