mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-30 00:08:03 +00:00
Update Driver API header
This commit is contained in:
parent
692a309289
commit
bff3cb04a0
57
DAPI.hpp
57
DAPI.hpp
@ -127,11 +127,6 @@ enum CallbackReason
|
|||||||
*/
|
*/
|
||||||
ConfigurationReason,
|
ConfigurationReason,
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief This will be called when the registered interrupt is triggered.
|
|
||||||
*/
|
|
||||||
InterruptReason,
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This is used when the kernel wants to stop the driver.
|
* @brief This is used when the kernel wants to stop the driver.
|
||||||
*
|
*
|
||||||
@ -348,4 +343,56 @@ union KernelCallback
|
|||||||
unsigned long raw;
|
unsigned long raw;
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
|
union CPURegisters
|
||||||
|
{
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
#if defined(__x86_64__) || defined(__amd64__)
|
||||||
|
unsigned long r15;
|
||||||
|
unsigned long r14;
|
||||||
|
unsigned long r13;
|
||||||
|
unsigned long r12;
|
||||||
|
unsigned long r11;
|
||||||
|
unsigned long r10;
|
||||||
|
unsigned long r9;
|
||||||
|
unsigned long r8;
|
||||||
|
|
||||||
|
unsigned long rbp;
|
||||||
|
unsigned long rdi;
|
||||||
|
unsigned long rsi;
|
||||||
|
unsigned long rdx;
|
||||||
|
unsigned long rcx;
|
||||||
|
unsigned long rbx;
|
||||||
|
unsigned long rax;
|
||||||
|
|
||||||
|
unsigned long InterruptNumber;
|
||||||
|
unsigned long ErrorCode;
|
||||||
|
unsigned long rip;
|
||||||
|
unsigned long cs;
|
||||||
|
unsigned long rflags;
|
||||||
|
unsigned long rsp;
|
||||||
|
unsigned long ss;
|
||||||
|
#elif defined(__i386__) || defined(__i686__)
|
||||||
|
unsigned int ebp;
|
||||||
|
unsigned int edi;
|
||||||
|
unsigned int esi;
|
||||||
|
unsigned int edx;
|
||||||
|
unsigned int ecx;
|
||||||
|
unsigned int ebx;
|
||||||
|
unsigned int eax;
|
||||||
|
|
||||||
|
unsigned int InterruptNumber;
|
||||||
|
unsigned int ErrorCode;
|
||||||
|
unsigned int eip;
|
||||||
|
unsigned int cs;
|
||||||
|
unsigned int eflags;
|
||||||
|
unsigned int esp;
|
||||||
|
unsigned int ss;
|
||||||
|
#else
|
||||||
|
#error "Unsupported architecture"
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
unsigned long raw;
|
||||||
|
} __attribute__((packed));
|
||||||
|
|
||||||
#endif // !__FENNIX_DRIVER_API_H__
|
#endif // !__FENNIX_DRIVER_API_H__
|
||||||
|
Loading…
x
Reference in New Issue
Block a user