diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-04-17 09:54:17 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-04-17 10:08:50 +0200 |
| commit | c0099ab36bf9606c5503ceb0fa0d5b64f71c7203 (patch) | |
| tree | 1c310521280e3c995981a903895c7c2e124582ee /Private | |
| parent | f93fb4439aaa865d998a790348313a4c7163bb8b (diff) | |
Unrelated: These changes are important but related to nothing.
- Window now becomes Wm, as in Window manager.
- Fix entrypoint for FragLib.
- Remove CoreEvents to be replaced with Event Server, reworked Display Server.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private')
| -rw-r--r-- | Private/KernelKit/PEF.hpp | 2 | ||||
| -rw-r--r-- | Private/NewBoot/Source/makefile | 8 | ||||
| -rw-r--r-- | Private/Servers/CoreDisplay/Headers/CDBitBlt.h | 10 | ||||
| -rw-r--r-- | Private/Servers/CoreDisplay/Headers/CDServerStartup.h | 10 | ||||
| -rw-r--r-- | Private/Servers/CoreDisplay/Headers/CoreDisplay.h | 0 | ||||
| -rw-r--r-- | Private/Servers/CoreDisplay/Sources/CDBitBlt.c | 11 | ||||
| -rw-r--r-- | Private/Servers/CoreDisplay/Sources/CDServerStartup.c (renamed from Private/Servers/CoreEvents/Sources/CoreEvents.c) | 12 | ||||
| -rw-r--r-- | Private/Servers/CoreDisplay/Sources/CoreDisplay.c | 33 | ||||
| -rw-r--r-- | Private/Servers/CoreEvents/Headers/.gitkeep | 0 | ||||
| -rw-r--r-- | Private/Servers/CoreEvents/Headers/CoreEvents.h | 0 | ||||
| -rw-r--r-- | Private/Servers/CoreEvents/README.txt | 1 | ||||
| -rw-r--r-- | Private/Source/PEFCodeManager.cxx | 18 | ||||
| -rw-r--r-- | Private/makefile | 8 |
13 files changed, 53 insertions, 60 deletions
diff --git a/Private/KernelKit/PEF.hpp b/Private/KernelKit/PEF.hpp index 532382d2..bc2e0990 100644 --- a/Private/KernelKit/PEF.hpp +++ b/Private/KernelKit/PEF.hpp @@ -92,6 +92,6 @@ enum { // NewOS System Binary Interface. #define kPefAbi (0x5046) -#define kPefStart "__start" +#define kPefStart "__ImageStart" #endif /* ifndef __PEF__ */ diff --git a/Private/NewBoot/Source/makefile b/Private/NewBoot/Source/makefile index b6eb80b0..50259398 100644 --- a/Private/NewBoot/Source/makefile +++ b/Private/NewBoot/Source/makefile @@ -3,17 +3,17 @@ # This is the bootloader makefile. ################################################## -CC_GNU=x86_64-w64-mingw32-g++.exe -LD_GNU=x86_64-w64-mingw32-ld.exe +CC_GNU=x86_64-w64-mingw32-g++ +LD_GNU=x86_64-w64-mingw32-ld -WINDRES=x86_64-w64-mingw32-windres.exe +WINDRES=x86_64-w64-mingw32-windres ADD_FILE=touch COPY=cp HTTP_GET=wget ifeq ($(shell uname), Windows_NT) -EMU=qemu-system-x86_64w.exe +EMU=qemu-system-x86_64w else EMU=qemu-system-x86_64 endif diff --git a/Private/Servers/CoreDisplay/Headers/CDBitBlt.h b/Private/Servers/CoreDisplay/Headers/CDBitBlt.h new file mode 100644 index 00000000..21823755 --- /dev/null +++ b/Private/Servers/CoreDisplay/Headers/CDBitBlt.h @@ -0,0 +1,10 @@ +/* ------------------------------------------- + + Copyright Mahrouss Logic + + File: CDBitBlt.h + Purpose: Userbuffer to Framebuffer magic. + +------------------------------------------- */ + +#pragma once
\ No newline at end of file diff --git a/Private/Servers/CoreDisplay/Headers/CDServerStartup.h b/Private/Servers/CoreDisplay/Headers/CDServerStartup.h new file mode 100644 index 00000000..47f369ae --- /dev/null +++ b/Private/Servers/CoreDisplay/Headers/CDServerStartup.h @@ -0,0 +1,10 @@ +/* ------------------------------------------- + + Copyright Mahrouss Logic + + File: CDServerStartup.h + Purpose: Server entrypoint. + +------------------------------------------- */ + +#pragma once
\ No newline at end of file diff --git a/Private/Servers/CoreDisplay/Headers/CoreDisplay.h b/Private/Servers/CoreDisplay/Headers/CoreDisplay.h deleted file mode 100644 index e69de29b..00000000 --- a/Private/Servers/CoreDisplay/Headers/CoreDisplay.h +++ /dev/null diff --git a/Private/Servers/CoreDisplay/Sources/CDBitBlt.c b/Private/Servers/CoreDisplay/Sources/CDBitBlt.c new file mode 100644 index 00000000..91e5342f --- /dev/null +++ b/Private/Servers/CoreDisplay/Sources/CDBitBlt.c @@ -0,0 +1,11 @@ +/* ------------------------------------------- + + Copyright Mahrouss Logic + + File: CDBitBlt.c + Purpose: Userbuffer to Framebuffer magic. + +------------------------------------------- */ + +#include <CDBitBlt.h> + diff --git a/Private/Servers/CoreEvents/Sources/CoreEvents.c b/Private/Servers/CoreDisplay/Sources/CDServerStartup.c index e15bdebe..7293b720 100644 --- a/Private/Servers/CoreEvents/Sources/CoreEvents.c +++ b/Private/Servers/CoreDisplay/Sources/CDServerStartup.c @@ -2,25 +2,23 @@ Copyright Mahrouss Logic - File: CoreEvents.c - Purpose: Event server. + File: CDServerStartup.c + Purpose: Server entrypoint. ------------------------------------------- */ -#include <CoreEvents.h> +#include <CDServerStartup.h> #include <IPC.h> /// @brief Called when the server starts. -DWordType ServerStartup(VoidType) +int ServerStartup(void) { - IPCSendMessage(kIPCBroadcastNew); /// broadcast our presence return 0; } /// @brief Called when the server shuts down. -DWordType ServerShutdown(VoidType) +int ServerShutdown(void) { - IPCSendMessage(kIPCBroadcastDispose); /// broadcast our dispose. return 0; } diff --git a/Private/Servers/CoreDisplay/Sources/CoreDisplay.c b/Private/Servers/CoreDisplay/Sources/CoreDisplay.c deleted file mode 100644 index 2a3f31fe..00000000 --- a/Private/Servers/CoreDisplay/Sources/CoreDisplay.c +++ /dev/null @@ -1,33 +0,0 @@ -/* ------------------------------------------- - - Copyright Mahrouss Logic - - File: CoreDisplay.c - Purpose: Display server. - -------------------------------------------- */ - -#include <CoreDisplay.h> -#include <IPC.h> - -/// @brief Called when the server starts. -DWordType ServerStartup(VoidType) -{ - CDInitDisplay(kCDNoFlags); // init standard display. Need to notify other endpoits. - // as well. - // - - IPCSendMessage(kIPCBroadcastNew); /// broadcast our presence - - return 0; -} - -/// @brief Called when the server shuts down. -DWordType ServerShutdown(VoidType) -{ - CDCloseDisplay(kCDShutdownAll); /// takes the close flag argument, which tells here to also close the child nodes. - IPCSendMessage(kIPCBroadcastDispose); /// broadcast our presence - return 0; -} - -/// EOF. diff --git a/Private/Servers/CoreEvents/Headers/.gitkeep b/Private/Servers/CoreEvents/Headers/.gitkeep deleted file mode 100644 index e69de29b..00000000 --- a/Private/Servers/CoreEvents/Headers/.gitkeep +++ /dev/null diff --git a/Private/Servers/CoreEvents/Headers/CoreEvents.h b/Private/Servers/CoreEvents/Headers/CoreEvents.h deleted file mode 100644 index e69de29b..00000000 --- a/Private/Servers/CoreEvents/Headers/CoreEvents.h +++ /dev/null diff --git a/Private/Servers/CoreEvents/README.txt b/Private/Servers/CoreEvents/README.txt deleted file mode 100644 index 900e332a..00000000 --- a/Private/Servers/CoreEvents/README.txt +++ /dev/null @@ -1 +0,0 @@ -CoreEvents server.
\ No newline at end of file diff --git a/Private/Source/PEFCodeManager.cxx b/Private/Source/PEFCodeManager.cxx index ed6b7bbc..f8616a8c 100644 --- a/Private/Source/PEFCodeManager.cxx +++ b/Private/Source/PEFCodeManager.cxx @@ -24,6 +24,8 @@ UInt32 rt_get_pef_platform(void) noexcept { return kPefArch64x0; #elif defined(__x86_64__) return kPefArchAMD64; +#elif defined(__powerpc64__) + return kPefArchPowerPC; #else return kPefArchInvalid; #endif // __32x0__ || __64x0__ || __x86_64__ @@ -53,15 +55,6 @@ PEFLoader::PEFLoader(const char *path) : fCachedBlob(nullptr), fBad(false) { PEFContainer *container = reinterpret_cast<PEFContainer *>(fCachedBlob); - auto fFree = [&]() -> void { - kcout << "CodeManager: Warning: Executable format error!\n"; - fBad = true; - - ke_delete_ke_heap(fCachedBlob); - - fCachedBlob = nullptr; - }; - if (container->Cpu == Detail::rt_get_pef_platform() && container->Magic[0] == kPefMagic[0] && container->Magic[1] == kPefMagic[1] && @@ -74,7 +67,12 @@ PEFLoader::PEFLoader(const char *path) : fCachedBlob(nullptr), fBad(false) { } } - fFree(); + kcout << "CodeManager: Warning: Executable format error!\n"; + fBad = true; + + ke_delete_ke_heap(fCachedBlob); + + fCachedBlob = nullptr; } } diff --git a/Private/makefile b/Private/makefile index 781da4e8..412739ca 100644 --- a/Private/makefile +++ b/Private/makefile @@ -3,10 +3,10 @@ # This is the microkernel makefile. ################################################## -CC = x86_64-w64-mingw32-gcc.exe -LD = x86_64-w64-mingw32-ld.exe +CC = x86_64-w64-mingw32-gcc +LD = x86_64-w64-mingw32-ld CCFLAGS = -c -ffreestanding -D__NEWOS_AMD64__ -mgeneral-regs-only -mno-red-zone -fno-rtti -fno-exceptions -std=c++20 -D__FSKIT_NEWFS__ -D__KERNEL__ -D__HAVE_MAHROUSS_APIS__ -D__MAHROUSS__ -I../ -I./ -ASM = nasm.exe +ASM = nasm ifneq ($(ATA_PIO_SUPPORT), ) DISKDRIVER = -D__ATA_PIO__ @@ -40,7 +40,7 @@ error: @echo "Use a specific target." MOVEALL=./MoveAll.sh -WINDRES=x86_64-w64-mingw32-windres.exe +WINDRES=x86_64-w64-mingw32-windres .PHONY: newos-amd64-epm newos-amd64-epm: clean |
