summaryrefslogtreecommitdiffhomepage
path: root/Drv
diff options
context:
space:
mode:
authorAmlal <amlalelmahrouss@icloud.com>2024-06-19 07:59:04 +0000
committerAmlal <amlalelmahrouss@icloud.com>2024-06-19 07:59:04 +0000
commitb820eb6a5a7948597d81998137b05ddc0eb0dbad (patch)
treedb4eaea0b6863076c4f1476f361e2317823a663a /Drv
parent36ff25861676cd1f5fb94b901fa59b015c614bc5 (diff)
parent6735570c44516661260546dadb81f0f5c238d1db (diff)
Merged in MHR-31 (pull request #16)
MHR-31: Round robin scheduler.
Diffstat (limited to 'Drv')
-rw-r--r--Drv/GSMDrv/CheckStck.c11
-rw-r--r--Drv/GSMDrv/DriverRsrc.rsrc25
-rw-r--r--Drv/GSMDrv/GSMDrv.c25
-rw-r--r--Drv/GSMDrv/x86_64.make51
-rw-r--r--Drv/SampleDriver/CheckStck.c11
-rw-r--r--Drv/SampleDriver/SampleDriver.c6
-rw-r--r--Drv/VideoDrv/CheckStck.c11
-rw-r--r--Drv/VideoDrv/DriverRsrc.rsrc25
-rw-r--r--Drv/VideoDrv/VideoDrv.c22
-rw-r--r--Drv/VideoDrv/x86_64.make51
10 files changed, 232 insertions, 6 deletions
diff --git a/Drv/GSMDrv/CheckStck.c b/Drv/GSMDrv/CheckStck.c
new file mode 100644
index 00000000..3eb157ba
--- /dev/null
+++ b/Drv/GSMDrv/CheckStck.c
@@ -0,0 +1,11 @@
+/* -------------------------------------------
+
+ Copyright Zeta Electronics Corporation
+
+------------------------------------------- */
+
+///! @brief Use this to check your stack, if using MinGW/MSVC/CodeTools.
+void ___chkstk_ms(void)
+{
+ (void)0;
+}
diff --git a/Drv/GSMDrv/DriverRsrc.rsrc b/Drv/GSMDrv/DriverRsrc.rsrc
new file mode 100644
index 00000000..f8e9c05f
--- /dev/null
+++ b/Drv/GSMDrv/DriverRsrc.rsrc
@@ -0,0 +1,25 @@
+1 ICON "../../Icons/driver-logo.ico"
+
+1 VERSIONINFO
+FILEVERSION 1,0,0,0
+PRODUCTVERSION 1,0,0,0
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "080904E4"
+ BEGIN
+ VALUE "CompanyName", "Zeta Electronics Corporation"
+ VALUE "FileDescription", "New OS driver."
+ VALUE "FileVersion", "1.00"
+ VALUE "InternalName", "SampleDriver"
+ VALUE "LegalCopyright", "Copyright Zeta Electronics Corporation, all rights reserved."
+ VALUE "OriginalFilename", "SampleDriver.exe"
+ VALUE "ProductName", "SampleDriver"
+ VALUE "ProductVersion", "1.00"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x809, 1252
+ END
+END
diff --git a/Drv/GSMDrv/GSMDrv.c b/Drv/GSMDrv/GSMDrv.c
new file mode 100644
index 00000000..1b7cfed6
--- /dev/null
+++ b/Drv/GSMDrv/GSMDrv.c
@@ -0,0 +1,25 @@
+/* -------------------------------------------
+
+ Copyright Zeta Electronics Corporation
+
+------------------------------------------- */
+
+#include <DDK/KernelString.h>
+#include <DDK/KernelPrint.h>
+
+/// @brief GSM entrypoint.
+int __at_enter(void)
+{
+ kernelPrintStr("GSMDrv: Starting up...\r");
+
+ /// @brief activate SIM 0..n
+
+ return 0;
+}
+
+/// @brief GSM 'atexit' function.
+int __at_exit(void)
+{
+ kernelPrintStr("GSMDrv: Shutting down...\r");
+ return 0;
+}
diff --git a/Drv/GSMDrv/x86_64.make b/Drv/GSMDrv/x86_64.make
new file mode 100644
index 00000000..a47c40ae
--- /dev/null
+++ b/Drv/GSMDrv/x86_64.make
@@ -0,0 +1,51 @@
+##################################################
+# (C) Zeta Electronics Corporation, all rights reserved.
+# This is the sample driver makefile.
+##################################################
+
+CC_GNU=x86_64-w64-mingw32-gcc
+LD_GNU=x86_64-w64-mingw32-ld
+
+WINDRES=x86_64-w64-mingw32-windres
+
+ADD_FILE=touch
+COPY=cp
+HTTP_GET=wget
+
+LD_FLAGS=-e __ImageStart --subsystem=17
+
+OBJ=*.o
+
+
+REM=rm
+REM_FLAG=-f
+
+FLAG_ASM=-f win64
+FLAG_GNU=-fshort-wchar -D__EFI_x86_64__ -mgeneral-regs-only -mno-red-zone -D__KERNEL__ -DEFI_FUNCTION_WRAPPER -I../ -I../../ -I./ -c -ffreestanding -std=c17 -D__HAVE_MAHROUSS_APIS__ -D__MAHROUSS__ -D__BOOTLOADER__ -I./
+
+.PHONY: invalid-recipe
+invalid-recipe:
+ @echo "invalid-recipe: Use make all instead."
+
+.PHONY: all
+all: compile-amd64
+ $(LD_GNU) $(OBJ) $(LD_FLAGS) -o GSMDrv.exe
+
+ifneq ($(DEBUG_SUPPORT), )
+DEBUG = -D__DEBUG__
+endif
+
+.PHONY: compile-amd64
+compile-amd64:
+ $(WINDRES) DriverRsrc.rsrc -O coff -o DriverRsrc.o
+ $(CC_GNU) $(FLAG_GNU) $(DEBUG) $(wildcard *.c) $(wildcard ../../DDK/*.c) $(wildcard ../../DDK/*.S)
+
+.PHONY: clean
+clean:
+ $(REM) $(REM_FLAG) $(OBJ) GSMDrv.exe
+
+.PHONY: help
+help:
+ @echo "=== HELP ==="
+ @echo "clean: Clean driver."
+ @echo "compile-amd64: Build driver."
diff --git a/Drv/SampleDriver/CheckStck.c b/Drv/SampleDriver/CheckStck.c
new file mode 100644
index 00000000..3eb157ba
--- /dev/null
+++ b/Drv/SampleDriver/CheckStck.c
@@ -0,0 +1,11 @@
+/* -------------------------------------------
+
+ Copyright Zeta Electronics Corporation
+
+------------------------------------------- */
+
+///! @brief Use this to check your stack, if using MinGW/MSVC/CodeTools.
+void ___chkstk_ms(void)
+{
+ (void)0;
+}
diff --git a/Drv/SampleDriver/SampleDriver.c b/Drv/SampleDriver/SampleDriver.c
index 94d5635b..85bd8d54 100644
--- a/Drv/SampleDriver/SampleDriver.c
+++ b/Drv/SampleDriver/SampleDriver.c
@@ -18,9 +18,3 @@ int __ImageEnd(void)
kernelPrintStr("SampleDriver: Shutting down...\r");
return 0;
}
-
-///! @brief Use this to check your stack, if using MinGW/MSVC.
-void ___chkstk_ms(void)
-{
- (void)0;
-}
diff --git a/Drv/VideoDrv/CheckStck.c b/Drv/VideoDrv/CheckStck.c
new file mode 100644
index 00000000..3eb157ba
--- /dev/null
+++ b/Drv/VideoDrv/CheckStck.c
@@ -0,0 +1,11 @@
+/* -------------------------------------------
+
+ Copyright Zeta Electronics Corporation
+
+------------------------------------------- */
+
+///! @brief Use this to check your stack, if using MinGW/MSVC/CodeTools.
+void ___chkstk_ms(void)
+{
+ (void)0;
+}
diff --git a/Drv/VideoDrv/DriverRsrc.rsrc b/Drv/VideoDrv/DriverRsrc.rsrc
new file mode 100644
index 00000000..f8e9c05f
--- /dev/null
+++ b/Drv/VideoDrv/DriverRsrc.rsrc
@@ -0,0 +1,25 @@
+1 ICON "../../Icons/driver-logo.ico"
+
+1 VERSIONINFO
+FILEVERSION 1,0,0,0
+PRODUCTVERSION 1,0,0,0
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "080904E4"
+ BEGIN
+ VALUE "CompanyName", "Zeta Electronics Corporation"
+ VALUE "FileDescription", "New OS driver."
+ VALUE "FileVersion", "1.00"
+ VALUE "InternalName", "SampleDriver"
+ VALUE "LegalCopyright", "Copyright Zeta Electronics Corporation, all rights reserved."
+ VALUE "OriginalFilename", "SampleDriver.exe"
+ VALUE "ProductName", "SampleDriver"
+ VALUE "ProductVersion", "1.00"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x809, 1252
+ END
+END
diff --git a/Drv/VideoDrv/VideoDrv.c b/Drv/VideoDrv/VideoDrv.c
new file mode 100644
index 00000000..fc79d2a0
--- /dev/null
+++ b/Drv/VideoDrv/VideoDrv.c
@@ -0,0 +1,22 @@
+/* -------------------------------------------
+
+ Copyright Zeta Electronics Corporation
+
+------------------------------------------- */
+
+#include <DDK/KernelString.h>
+#include <DDK/KernelPrint.h>
+
+#include <Builtins/GX/GX>
+
+int __at_enter(void)
+{
+ kernelPrintStr("VideoDrv: Starting up...\r");
+ return 0;
+}
+
+int __at_exit(void)
+{
+ kernelPrintStr("VideoDrv: Shutting down...\r");
+ return 0;
+}
diff --git a/Drv/VideoDrv/x86_64.make b/Drv/VideoDrv/x86_64.make
new file mode 100644
index 00000000..8ec42277
--- /dev/null
+++ b/Drv/VideoDrv/x86_64.make
@@ -0,0 +1,51 @@
+##################################################
+# (C) Zeta Electronics Corporation, all rights reserved.
+# This is the sample driver makefile.
+##################################################
+
+CC_GNU=x86_64-w64-mingw32-gcc
+LD_GNU=x86_64-w64-mingw32-ld
+
+WINDRES=x86_64-w64-mingw32-windres
+
+ADD_FILE=touch
+COPY=cp
+HTTP_GET=wget
+
+LD_FLAGS=-e __ImageStart --subsystem=17
+
+OBJ=*.o
+
+
+REM=rm
+REM_FLAG=-f
+
+FLAG_ASM=-f win64
+FLAG_GNU=-fshort-wchar -D__EFI_x86_64__ -mgeneral-regs-only -mno-red-zone -D__KERNEL__ -DEFI_FUNCTION_WRAPPER -I../ -I../../ -I./ -c -ffreestanding -std=c17 -D__HAVE_MAHROUSS_APIS__ -D__MAHROUSS__ -D__BOOTLOADER__ -I./
+
+.PHONY: invalid-recipe
+invalid-recipe:
+ @echo "invalid-recipe: Use make all instead."
+
+.PHONY: all
+all: compile-amd64
+ $(LD_GNU) $(OBJ) $(LD_FLAGS) -o VideoDrv.exe
+
+ifneq ($(DEBUG_SUPPORT), )
+DEBUG = -D__DEBUG__
+endif
+
+.PHONY: compile-amd64
+compile-amd64:
+ $(WINDRES) DriverRsrc.rsrc -O coff -o DriverRsrc.o
+ $(CC_GNU) $(FLAG_GNU) $(DEBUG) $(wildcard *.c) $(wildcard ../../DDK/*.c) $(wildcard ../../DDK/*.S)
+
+.PHONY: clean
+clean:
+ $(REM) $(REM_FLAG) $(OBJ) VideoDrv.exe
+
+.PHONY: help
+help:
+ @echo "=== HELP ==="
+ @echo "clean: Clean driver."
+ @echo "compile-amd64: Build driver."