diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-08-16 19:56:21 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-16 19:56:21 +0200 |
| commit | 1a32b9307357ac0fc9095e853b2b6d94f9fe62bb (patch) | |
| tree | f41f723659c8926e38182fbe062746d821ab487e /public/frameworks | |
| parent | eb9df5eea339812513c25a8d3b2eeb03c633e7ac (diff) | |
| parent | b301047903b79560dce69085fc271a653a1eb4b6 (diff) | |
Merge pull request #55 from nekernel-org/dev
v0.0.4
Diffstat (limited to 'public/frameworks')
| -rw-r--r-- | public/frameworks/CoreFoundation.fwrk/CoreFoundation.json | 3 | ||||
| -rw-r--r-- | public/frameworks/CoreFoundation.fwrk/headers/Foundation.h | 2 | ||||
| -rw-r--r-- | public/frameworks/CoreFoundation.fwrk/headers/String.h | 5 | ||||
| -rw-r--r-- | public/frameworks/DiskImage.fwrk/headers/DiskImage.h | 1 | ||||
| -rw-r--r-- | public/frameworks/DiskImage.fwrk/src/DiskImage+EPM.cc | 7 | ||||
| -rw-r--r-- | public/frameworks/KernelTest.fwrk/headers/KernelTest.h | 24 | ||||
| -rw-r--r-- | public/frameworks/KernelTest.fwrk/src/UnitTests.cc | 17 | ||||
| -rw-r--r-- | public/frameworks/OpenMSG.fwrk/.keep | 0 | ||||
| -rw-r--r-- | public/frameworks/OpenMSG.fwrk/OpenMSG.json | 19 | ||||
| -rw-r--r-- | public/frameworks/OpenMSG.fwrk/headers/.keep | 0 | ||||
| -rw-r--r-- | public/frameworks/OpenMSG.fwrk/src/.keep | 0 | ||||
| -rw-r--r-- | public/frameworks/OpenMSG.fwrk/src/DylibMain.cc | 5 | ||||
| -rw-r--r-- | public/frameworks/OpenMSG.fwrk/xml/.keep | 0 | ||||
| -rw-r--r-- | public/frameworks/OpenMSG.fwrk/xml/app.xml | 2 |
14 files changed, 44 insertions, 41 deletions
diff --git a/public/frameworks/CoreFoundation.fwrk/CoreFoundation.json b/public/frameworks/CoreFoundation.fwrk/CoreFoundation.json index 076b35ae..39e6b480 100644 --- a/public/frameworks/CoreFoundation.fwrk/CoreFoundation.json +++ b/public/frameworks/CoreFoundation.fwrk/CoreFoundation.json @@ -15,7 +15,8 @@ "kCFVersion=0x0100", "kCFVersionHighest=0x0100", "kCFVersionLowest=0x0100", - "__NE_AMD64__" + "__NE_AMD64__", + "__CF_64BIT__" ] }
\ No newline at end of file diff --git a/public/frameworks/CoreFoundation.fwrk/headers/Foundation.h b/public/frameworks/CoreFoundation.fwrk/headers/Foundation.h index 500ad544..8396a3e8 100644 --- a/public/frameworks/CoreFoundation.fwrk/headers/Foundation.h +++ b/public/frameworks/CoreFoundation.fwrk/headers/Foundation.h @@ -25,7 +25,7 @@ struct CFPoint; struct CFRect; struct CFColor; -#ifndef __LP64__ +#ifndef __CF_64BIT__ typedef SInt32 CFInteger; typedef float CFReal; #else diff --git a/public/frameworks/CoreFoundation.fwrk/headers/String.h b/public/frameworks/CoreFoundation.fwrk/headers/String.h index c28c05cd..80b68536 100644 --- a/public/frameworks/CoreFoundation.fwrk/headers/String.h +++ b/public/frameworks/CoreFoundation.fwrk/headers/String.h @@ -14,5 +14,10 @@ class CFString; class CFString final CF_OBJECT { public: + CFString() = default; + ~CFString() = default; + + CFString(const CFString&) = delete; + CFString& operator=(const CFString&) = delete; }; } // namespace CF
\ No newline at end of file diff --git a/public/frameworks/DiskImage.fwrk/headers/DiskImage.h b/public/frameworks/DiskImage.fwrk/headers/DiskImage.h index 53348f3e..4a18b079 100644 --- a/public/frameworks/DiskImage.fwrk/headers/DiskImage.h +++ b/public/frameworks/DiskImage.fwrk/headers/DiskImage.h @@ -39,6 +39,7 @@ struct DI_DISK_IMAGE { SInt32 block_cnt = 0; SizeT disk_sz = kDIMinDiskSz; Char out_name[kDIOutNameLen] = kDIDefaultOutputName; + SInt32 fs_version = 0UL; }; /// @brief Format with an EPM partition. diff --git a/public/frameworks/DiskImage.fwrk/src/DiskImage+EPM.cc b/public/frameworks/DiskImage.fwrk/src/DiskImage+EPM.cc index a1182e64..83b52905 100644 --- a/public/frameworks/DiskImage.fwrk/src/DiskImage+EPM.cc +++ b/public/frameworks/DiskImage.fwrk/src/DiskImage+EPM.cc @@ -17,7 +17,7 @@ /// @return Status code upon completion. SInt32 DI::DIFormatPartitionEPM(struct DI_DISK_IMAGE& img) noexcept { if (!img.sector_sz || (img.sector_sz % 512 != 0)) return kDIFailureStatus; - + if (!img.fs_version) return kDIFailureStatus; if (*img.out_name == 0 || *img.disk_name == 0) return kDIFailureStatus; struct ::EPM_PART_BLOCK block {}; @@ -27,10 +27,11 @@ SInt32 DI::DIFormatPartitionEPM(struct DI_DISK_IMAGE& img) noexcept { block.Version = kEPMRevisionBcd; block.LbaStart = sizeof(struct ::EPM_PART_BLOCK); block.LbaEnd = img.disk_sz - block.LbaStart; - block.FsVersion = kNeFSVersionInteger; + block.FsVersion = img.fs_version; ::MmCopyMemory(block.Name, (VoidPtr) img.disk_name, ::MmStrLen(img.disk_name)); - ::MmCopyMemory(block.Magic, (VoidPtr) kEPMMagic86, ::MmStrLen(kEPMMagic86)); + + ::MmCopyMemory(block.Magic, (VoidPtr) kEPMMagic, ::MmStrLen(kEPMMagic)); IORef handle = IoOpenFile(img.out_name, nullptr); diff --git a/public/frameworks/KernelTest.fwrk/headers/KernelTest.h b/public/frameworks/KernelTest.fwrk/headers/KernelTest.h index 04e90964..70b1b9b3 100644 --- a/public/frameworks/KernelTest.fwrk/headers/KernelTest.h +++ b/public/frameworks/KernelTest.fwrk/headers/KernelTest.h @@ -11,21 +11,25 @@ /// @brief Kernel Test Framework. /// @file KernelTest.h -#define KT_TEST_VERSION_BCD (0x0001) -#define KT_TEST_VERSION "v0.0.1-kerneltest" +#define KT_TEST_VERSION_BCD (0x0002) +#define KT_TEST_VERSION "v0.0.2-kerneltest" #define KT_TEST_FAILURE (1) #define KT_TEST_SUCCESS (0) -#define KT_DECL_TEST(NAME, FN) \ - class KT_##NAME final { \ - public: \ - void Run(); \ - const char* ToString(); \ - }; \ - inline void KT_##NAME::Run() { MUST_PASS(FN() == true); } \ - inline const char* KT_##NAME::ToString() { return #FN; } +#define KT_DECL_TEST(NAME, FN) \ + class KT_##NAME final { \ + public: \ + Kernel::Void Run(); \ + const Kernel::Char* ToString(); \ + }; \ + inline Kernel::Void KT_##NAME::Run() { \ + MUST_PASS(FN() == true); \ + } \ + inline const Kernel::Char* KT_##NAME::ToString() { \ + return #FN; \ + } KT_DECL_TEST(ALWAYS_BREAK, []() -> bool { return false; }); KT_DECL_TEST(ALWAYS_GOOD, []() -> bool { return true; });
\ No newline at end of file diff --git a/public/frameworks/KernelTest.fwrk/src/UnitTests.cc b/public/frameworks/KernelTest.fwrk/src/UnitTests.cc new file mode 100644 index 00000000..07e7b129 --- /dev/null +++ b/public/frameworks/KernelTest.fwrk/src/UnitTests.cc @@ -0,0 +1,17 @@ +/* ------------------------------------------- + + Copyright (C) 2025, Amlal El Mahrouss, all rights reserved. + +------------------------------------------- */ + +#include <public/frameworks/KernelTest.fwrk/headers/KernelTest.h> + +EXTERN_C Kernel::Void KT_TestBreak() { + KT_ALWAYS_BREAK brk; + brk.Run(); +} + +EXTERN_C Kernel::Void KT_TestGood() { + KT_ALWAYS_GOOD good; + good.Run(); +}
\ No newline at end of file diff --git a/public/frameworks/OpenMSG.fwrk/.keep b/public/frameworks/OpenMSG.fwrk/.keep deleted file mode 100644 index e69de29b..00000000 --- a/public/frameworks/OpenMSG.fwrk/.keep +++ /dev/null diff --git a/public/frameworks/OpenMSG.fwrk/OpenMSG.json b/public/frameworks/OpenMSG.fwrk/OpenMSG.json deleted file mode 100644 index 4bda8798..00000000 --- a/public/frameworks/OpenMSG.fwrk/OpenMSG.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compiler_path": "clang++", - "compiler_std": "c++20", - "headers_path": [ - "./", - "../../../dev/kernel", - "../../../public/frameworks/", - "../../../dev/", - "./" - ], - "sources_path": [], - "output_name": "./dist/libOpenMSG.fwrk.dylib", - "cpp_macros": [ - "kSampleFWVersion=0x0100", - "kSampleFWVersionHighest=0x0100", - "kSampleFWVersionLowest=0x0100", - "__NE_SDK__" - ] -}
\ No newline at end of file diff --git a/public/frameworks/OpenMSG.fwrk/headers/.keep b/public/frameworks/OpenMSG.fwrk/headers/.keep deleted file mode 100644 index e69de29b..00000000 --- a/public/frameworks/OpenMSG.fwrk/headers/.keep +++ /dev/null diff --git a/public/frameworks/OpenMSG.fwrk/src/.keep b/public/frameworks/OpenMSG.fwrk/src/.keep deleted file mode 100644 index e69de29b..00000000 --- a/public/frameworks/OpenMSG.fwrk/src/.keep +++ /dev/null diff --git a/public/frameworks/OpenMSG.fwrk/src/DylibMain.cc b/public/frameworks/OpenMSG.fwrk/src/DylibMain.cc deleted file mode 100644 index 99eebd26..00000000 --- a/public/frameworks/OpenMSG.fwrk/src/DylibMain.cc +++ /dev/null @@ -1,5 +0,0 @@ -#include <libSystem/SystemKit/System.h> - -SInt32 _DylibAttach(SInt32 argc, Char* argv[]) { - return EXIT_FAILURE; -}
\ No newline at end of file diff --git a/public/frameworks/OpenMSG.fwrk/xml/.keep b/public/frameworks/OpenMSG.fwrk/xml/.keep deleted file mode 100644 index e69de29b..00000000 --- a/public/frameworks/OpenMSG.fwrk/xml/.keep +++ /dev/null diff --git a/public/frameworks/OpenMSG.fwrk/xml/app.xml b/public/frameworks/OpenMSG.fwrk/xml/app.xml deleted file mode 100644 index 6a46e598..00000000 --- a/public/frameworks/OpenMSG.fwrk/xml/app.xml +++ /dev/null @@ -1,2 +0,0 @@ -<PropertyList> -<PLEntry Type="CFString" Name="LibraryName" Len="12" Value="OpenMSG.fwrk" /></PropertyList>
\ No newline at end of file |
