diff options
Diffstat (limited to 'src/launch')
| -rw-r--r-- | src/launch/.launch_manifest | 4 | ||||
| -rw-r--r-- | src/launch/launch.json | 2 | ||||
| -rw-r--r-- | src/launch/src/CRuntimeZero.S | 18 | ||||
| -rw-r--r-- | src/launch/src/RuntimeMain.cpp | 9 |
4 files changed, 25 insertions, 8 deletions
diff --git a/src/launch/.launch_manifest b/src/launch/.launch_manifest new file mode 100644 index 00000000..201b1f61 --- /dev/null +++ b/src/launch/.launch_manifest @@ -0,0 +1,4 @@ +[Launch] +RunAsRoot=YES +# NOTE: This has to be generated and passed here to enable all-trustee permissions. +RootKey= diff --git a/src/launch/launch.json b/src/launch/launch.json index 1230b34d..77774618 100644 --- a/src/launch/launch.json +++ b/src/launch/launch.json @@ -3,7 +3,7 @@ "compiler_std": "c++20", "headers_path": ["../", "./", "../../public/frameworks"], "sources_path": ["src/*.cpp", "src/*.S"], - "output_name": "ne_launch.exe", + "output_name": "launch.exe", "compiler_flags": [ "-ffreestanding", "-shared", diff --git a/src/launch/src/CRuntimeZero.S b/src/launch/src/CRuntimeZero.S index 7dd283c9..1e5e2cbb 100644 --- a/src/launch/src/CRuntimeZero.S +++ b/src/launch/src/CRuntimeZero.S @@ -20,7 +20,21 @@ _NeMain: callq launch_startup_fn movq %rcx, 0 - callq ThrExitMainThread - popq %rbp + +.data +.global _ProgramData +_ProgramData: + //;; ident + .word 0xffeecc + //;; version + .word 0x0110 + //;; kind: 0x0 = LaunchSystem + .word 0x0 + //;; flags + .word 0x0 + //;; Launcher name + .asciz "NeKernel Launcher" + + diff --git a/src/launch/src/RuntimeMain.cpp b/src/launch/src/RuntimeMain.cpp index 3216dad0..dc379d54 100644 --- a/src/launch/src/RuntimeMain.cpp +++ b/src/launch/src/RuntimeMain.cpp @@ -3,7 +3,6 @@ // Licensed under the Apache License, Version 2.0 (see LICENSE file) // Official repository: https://github.com/ne-foss-org/nekernel - #include <LaunchKit/Foundation.h> #include <libSystem/SystemKit/Err.h> #include <libSystem/SystemKit/Syscall.h> @@ -11,14 +10,14 @@ /// @note This called by _NeMain from its own runtime. IMPORT_C SInt32 launch_startup_fn(Void) { /// Start LaunchHelpers.fwrk services, and make the launcher manageable too (via mgmt.launch) - UInt32* ret = - static_cast<UInt32*>(libsys_syscall_arg_1(libsys_hash_64("__launch_register_service"))); + UInt32* ret = static_cast<UInt32*>(libsys_syscall_arg_1( + libsys_hash_64("__launch_register_service"))); // Register service based on program data. if (ret) { switch (*ret) { case kErrorSuccess: { - ret = - static_cast<UInt32*>(libsys_syscall_arg_1(libsys_hash_64("__launch_listen_as_super"))); + ret = static_cast<UInt32*>(libsys_syscall_arg_1(libsys_hash_64( + "__launch_attach_service"))); // Attach this program as the service process. return *ret; } default: |
