Update driver loading procedure

This commit is contained in:
Alex
2023-03-23 20:49:13 +02:00
parent 7b2137bf4d
commit 76f8477712
4 changed files with 254 additions and 144 deletions

View File

@ -27,11 +27,21 @@ namespace Driver
DRIVER_CONFLICT
};
class DriverInterruptHook;
struct DriverFile
{
bool Enabled;
unsigned long DriverUID;
void *Address;
void *InterruptCallback;
Memory::MemMgr *MemTrk;
DriverInterruptHook *InterruptHook[16];
};
class DriverInterruptHook : public Interrupts::Handler
{
private:
void *Handle;
void *Data;
DriverFile *Handle;
#if defined(a64)
void OnInterruptReceived(CPU::x64::TrapFrame *Frame);
@ -42,19 +52,10 @@ namespace Driver
#endif
public:
DriverInterruptHook(int Interrupt, void *Address, void *ParamData);
DriverInterruptHook(int Interrupt, DriverFile *Handle);
virtual ~DriverInterruptHook() = default;
};
struct DriverFile
{
bool Enabled;
unsigned long DriverUID;
void *Address;
Memory::MemMgr *MemTrk;
DriverInterruptHook *InterruptHook[16];
};
class Driver
{
private: