From 9fcff991059ff5cdbdf71848039e7b56ccd5bc49 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Wed, 14 May 2025 09:53:11 +0200 Subject: feat(kernel): add ddk.sys to the build flow, finished the mk_fwrk CLI. Signed-off-by: Amlal El Mahrouss --- dev/user/Opts.h | 15 --------------- dev/user/SciCalls.h | 15 +++++++++++++++ dev/user/src/SystemCalls.cc | 12 ++++++------ 3 files changed, 21 insertions(+), 21 deletions(-) delete mode 100644 dev/user/Opts.h create mode 100644 dev/user/SciCalls.h (limited to 'dev/user') diff --git a/dev/user/Opts.h b/dev/user/Opts.h deleted file mode 100644 index 4b3b63c1..00000000 --- a/dev/user/Opts.h +++ /dev/null @@ -1,15 +0,0 @@ -/* ------------------------------------------- - - Copyright (C) 2025, Amlal El Mahrouss, all rights reserved. - -------------------------------------------- */ - -#pragma once - -#include -#include - -IMPORT_C VoidPtr sci_syscall_arg_1(SizeT id); -IMPORT_C VoidPtr sci_syscall_arg_2(SizeT id, VoidPtr arg1); -IMPORT_C VoidPtr sci_syscall_arg_3(SizeT id, VoidPtr arg1, VoidPtr arg3); -IMPORT_C VoidPtr sci_syscall_arg_4(SizeT id, VoidPtr arg1, VoidPtr arg3, VoidPtr arg4); diff --git a/dev/user/SciCalls.h b/dev/user/SciCalls.h new file mode 100644 index 00000000..4b3b63c1 --- /dev/null +++ b/dev/user/SciCalls.h @@ -0,0 +1,15 @@ +/* ------------------------------------------- + + Copyright (C) 2025, Amlal El Mahrouss, all rights reserved. + +------------------------------------------- */ + +#pragma once + +#include +#include + +IMPORT_C VoidPtr sci_syscall_arg_1(SizeT id); +IMPORT_C VoidPtr sci_syscall_arg_2(SizeT id, VoidPtr arg1); +IMPORT_C VoidPtr sci_syscall_arg_3(SizeT id, VoidPtr arg1, VoidPtr arg3); +IMPORT_C VoidPtr sci_syscall_arg_4(SizeT id, VoidPtr arg1, VoidPtr arg3, VoidPtr arg4); diff --git a/dev/user/src/SystemCalls.cc b/dev/user/src/SystemCalls.cc index f8b6d597..874f607d 100644 --- a/dev/user/src/SystemCalls.cc +++ b/dev/user/src/SystemCalls.cc @@ -4,7 +4,7 @@ ------------------------------------------- */ -#include +#include #include /// @file SystemCalls.cc @@ -63,15 +63,15 @@ IMPORT_C Void IoCloseFile(_Input Ref desc) { } IMPORT_C UInt64 IoSeekFile(_Input Ref desc, _Input UInt64 off) { - auto ret = (UInt64*) sci_syscall_arg_3(3, reinterpret_cast(desc), - reinterpret_cast(&off)); + auto ret = (volatile UInt64*) sci_syscall_arg_3(3, reinterpret_cast(desc), + reinterpret_cast(&off)); MUST_PASS((*ret) != ~0UL); return *ret; } IMPORT_C UInt64 IoTellFile(_Input Ref desc) { - auto ret = (UInt64*) sci_syscall_arg_2(4, reinterpret_cast(desc)); + auto ret = (volatile UInt64*) sci_syscall_arg_2(4, reinterpret_cast(desc)); return *ret; } @@ -80,8 +80,8 @@ IMPORT_C SInt32 PrintOut(_Input IORef desc, const char* fmt, ...) { va_start(args, fmt); - auto ret = (UInt64*) sci_syscall_arg_4(5, reinterpret_cast(desc), - reinterpret_cast(const_cast(fmt)), args); + auto ret = (volatile UInt64*) sci_syscall_arg_4( + 5, reinterpret_cast(desc), reinterpret_cast(const_cast(fmt)), args); va_end(args); -- cgit v1.2.3