Improved driver loading/unloading

This commit is contained in:
Alex
2022-12-18 14:31:02 +02:00
parent 02f592ede9
commit e4ec9d87b8
7 changed files with 70 additions and 53 deletions

View File

@ -5,6 +5,7 @@
#include <interrupts.hpp>
#include <vector.hpp>
#include <memory.hpp>
#include <debug.h>
#include <cpu.hpp>
@ -46,6 +47,7 @@ namespace Driver
{
unsigned long DriverUID;
void *Address;
Memory::Tracker *MemTrk;
DriverInterruptHook *InterruptHook[16];
};
@ -55,7 +57,7 @@ namespace Driver
Vector<DriverFile *> Drivers;
unsigned long DriverUIDs = 0;
DriverCode CallDriverEntryPoint(void *fex);
DriverCode CallDriverEntryPoint(void *fex, void *KAPIAddress);
DriverCode DriverLoadBindPCI(void *DrvExtHdr, uint64_t DriverAddress, uint64_t Size, bool IsElf = false);
DriverCode DriverLoadBindInterrupt(void *DrvExtHdr, uint64_t DriverAddress, uint64_t Size, bool IsElf = false);
DriverCode DriverLoadBindInput(void *DrvExtHdr, uint64_t DriverAddress, uint64_t Size, bool IsElf = false);