summaryrefslogtreecommitdiffhomepage
path: root/dev/BootLoader/Modules/SysChk
diff options
context:
space:
mode:
Diffstat (limited to 'dev/BootLoader/Modules/SysChk')
-rw-r--r--dev/BootLoader/Modules/SysChk/.hgkeep0
-rw-r--r--dev/BootLoader/Modules/SysChk/Boot.S20
-rw-r--r--dev/BootLoader/Modules/SysChk/Module.cc22
-rw-r--r--dev/BootLoader/Modules/SysChk/build.json24
4 files changed, 66 insertions, 0 deletions
diff --git a/dev/BootLoader/Modules/SysChk/.hgkeep b/dev/BootLoader/Modules/SysChk/.hgkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/BootLoader/Modules/SysChk/.hgkeep
diff --git a/dev/BootLoader/Modules/SysChk/Boot.S b/dev/BootLoader/Modules/SysChk/Boot.S
new file mode 100644
index 00000000..ad1dc1d0
--- /dev/null
+++ b/dev/BootLoader/Modules/SysChk/Boot.S
@@ -0,0 +1,20 @@
+;; /*
+;; * ========================================================
+;; *
+;; * BootZ
+;; * Copyright (C) 2024, TQ B.V, all rights reserved., all rights reserved.
+;; *
+;; * ========================================================
+;; */
+
+.code64
+.intel_syntax noprefix
+
+#define kTypeDriver 101
+#define kArchAmd64 122
+#define kHandoverMagic 0xBADCC
+
+.section .ldr
+
+.quad kHandoverMagic
+.word kTypeDriver
diff --git a/dev/BootLoader/Modules/SysChk/Module.cc b/dev/BootLoader/Modules/SysChk/Module.cc
new file mode 100644
index 00000000..2ae5023e
--- /dev/null
+++ b/dev/BootLoader/Modules/SysChk/Module.cc
@@ -0,0 +1,22 @@
+/*
+ * ========================================================
+ *
+ * NetBoot
+ * Copyright (C) 2024, TQ B.V, all rights reserved., all rights reserved.
+ *
+ * ========================================================
+ */
+
+#include <BootKit/BootKit.h>
+
+EXTERN_C Int32 ModuleMain(Kernel::HEL::BootInfoHeader* Handover)
+{
+ EfiSystemTable* system_table = (EfiSystemTable*)Handover->f_FirmwareCustomTables[1];
+
+ system_table->ConOut->ClearScreen(system_table->ConOut);
+
+ system_table->ConOut->OutputString(system_table->ConOut, L"SYSCHK: CHECKING FOR VALID NEFS OR HPFS PARTITIONS...\r\n");
+ system_table->ConOut->OutputString(system_table->ConOut, L"SYSCHK: GOOD TO GO!\r\n");
+
+ return kEfiOk;
+}
diff --git a/dev/BootLoader/Modules/SysChk/build.json b/dev/BootLoader/Modules/SysChk/build.json
new file mode 100644
index 00000000..cd21e269
--- /dev/null
+++ b/dev/BootLoader/Modules/SysChk/build.json
@@ -0,0 +1,24 @@
+{
+ "compiler_path": "x86_64-w64-mingw32-g++",
+ "compiler_std": "c++20",
+ "headers_path": ["../", "../../", "../../../Kernel", "../../../", "./"],
+ "sources_path": ["*.cc", "*.S"],
+ "output_name": "syschk.sys",
+ "compiler_flags": [
+ "-ffreestanding",
+ "-nostdlib",
+ "-std=c++20",
+ "-fPIC",
+ "-fno-rtti",
+ "-fno-exceptions",
+ "-Wl,--subsystem=17,--image-base,0x10000000,-e,ModuleMain"
+ ],
+ "cpp_macros": [
+ "__MINOSKRNL__",
+ "__ZBAOSLDR__",
+ "__ZKA_AMD64__",
+ "kChkVersionHighest=0x0100",
+ "kChkVersionLowest=0x0100",
+ "kChkVersion=0x0100"
+ ]
+}