diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-23 21:06:27 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-23 21:06:27 -0500 |
| commit | 23040fad647634c08697451fc22ee2ca999629c8 (patch) | |
| tree | 72888f88c7728c82f3f6df1f4f70591de15eab36 /dev/libDDK/DriverKit/ddk.h | |
| parent | e5cc7351f0577b54c528fb827a7c7e6306c3e843 (diff) | |
| parent | 83d870e58457a1d335a1d9b9966a6a1887cc297b (diff) | |
Merge pull request #81 from nekernel-org/dev
feat! breaking changes on kernel sources.
Diffstat (limited to 'dev/libDDK/DriverKit/ddk.h')
| -rw-r--r-- | dev/libDDK/DriverKit/ddk.h | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/dev/libDDK/DriverKit/ddk.h b/dev/libDDK/DriverKit/ddk.h deleted file mode 100644 index 45f7d356..00000000 --- a/dev/libDDK/DriverKit/ddk.h +++ /dev/null @@ -1,76 +0,0 @@ -/* ======================================== - - Copyright Amlal El Mahrouss 2025, licensed under the Apache 2.0 license. - - FILE: ddk.h - PURPOSE: DDK Driver model base header. - -======================================== */ - -#pragma once - -#include <DriverKit/macros.h> - -struct DDK_STATUS_STRUCT; -struct DDK_OBJECT_MANIFEST; - -/// \brief Object handle manifest. -struct DDK_OBJECT_MANIFEST DDK_FINAL { - char* p_name; - int32_t p_kind; - void* p_object; -}; - -/// \brief DDK status ping structure. -struct DDK_STATUS_STRUCT DDK_FINAL { - int32_t s_action_id; - int32_t s_issuer_id; - int32_t s_group_id; - struct DDK_OBJECT_MANIFEST* s_object; -}; - -typedef void* ptr_t; - -/// @brief Call Kernel procedure. -/// @param name the procedure name. -/// @param cnt number of elements in **dat** -/// @param dat data argument pointer. -/// @param sz sz of whole data argument pointer. -/// @return result of call -DDK_EXTERN void* ke_call_dispatch(const char* name, int32_t cnt, void* dat, size_t sz); - -/// @brief add a system call. -/// @param slot system call slot id. -/// @param slotFn, syscall slot. -DDK_EXTERN void ke_set_syscall(const int32_t slot, void (*slotFn)(void* a0)); - -/// @brief Allocates an heap ptr. -/// @param sz size of the allocated struct/type. -/// @return the pointer allocated or **nil**. -DDK_EXTERN void* kalloc(size_t sz); - -/// @brief Frees an heap ptr. -/// @param pointer kernel pointer to free. -DDK_EXTERN void kfree(void* the_ptr); - -/// @brief Gets a Kernel object. -/// @param slot object id (can be 0) -/// @param name the property's name. -/// @return DDK_OBJECT_MANIFEST. -DDK_EXTERN struct DDK_OBJECT_MANIFEST* ke_get_obj(const int slot, const char* name); - -/// @brief Set a Kernel object. -/// @param slot object id (can be 0) -/// @param name the property's name. -/// @param ddk_pr pointer to a object's DDK_OBJECT_MANIFEST. -/// @return returned object. -DDK_EXTERN void* ke_set_obj(const int32_t slot, const struct DDK_OBJECT_MANIFEST* ddk_pr); - -/// @brief The highest API version of the DDK. -DDK_EXTERN uint32_t kApiVersionHighest; - -/// @brief The lowest API version of the DDK. -DDK_EXTERN uint32_t kApiVersionLowest; - -/// @brief API version in BCD. -DDK_EXTERN uint32_t kApiVersion; |
