diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-01-11 15:17:49 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2026-01-11 15:20:14 +0100 |
| commit | 878919d80864301328f3e9c471fe2dce2a8ea61d (patch) | |
| tree | f41e78fadd920a5bbb6021ed8484e2902f92912e /src/boot | |
| parent | b294efa65072053b642dc16511c9ab5405cb8303 (diff) | |
chore: kernel/boot: Enforce subsystem 17 by default.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'src/boot')
| -rw-r--r-- | src/boot/src/BootThread.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/boot/src/BootThread.cc b/src/boot/src/BootThread.cc index ec26209b..bbb8fb5a 100644 --- a/src/boot/src/BootThread.cc +++ b/src/boot/src/BootThread.cc @@ -52,6 +52,13 @@ BootThread::BootThread(VoidPtr blob) : fStartAddress(nullptr), fBlob(blob) { } #endif // __NE_AMD64__ || __NE_ARM64__ +#if !defined(__nekernel_allow_non_nekernel_pe) + if (opt_header_ptr->Subsystem != kNeKernelPESubsystem) { + writer.Write("BootZ: Not a NeKernel PE32+ executable.\r"); + return; + } +#endif + writer.Write("BootZ: PE32+ executable detected (NeKernel Subsystem).\r"); auto numSecs = header_ptr->NumberOfSections; |
