mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 15:34:33 +00:00
Added IOCB function
This commit is contained in:
parent
7d658a99e6
commit
2650202bc5
@ -114,6 +114,17 @@ namespace Driver
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
int Driver::IOCB(unsigned long DUID, void *KCB)
|
||||||
|
{
|
||||||
|
foreach (auto var in Drivers)
|
||||||
|
if (var->DriverUID == DUID)
|
||||||
|
{
|
||||||
|
FexExtended *DrvExtHdr = (FexExtended *)((uint64_t)var->Address + EXTENDED_SECTION_ADDRESS);
|
||||||
|
return ((int (*)(void *))((uint64_t)DrvExtHdr->Driver.Callback + (uint64_t)var->Address))(KCB);
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
DriverCode Driver::CallDriverEntryPoint(void *fex)
|
DriverCode Driver::CallDriverEntryPoint(void *fex)
|
||||||
{
|
{
|
||||||
KernelAPI *API = (KernelAPI *)KernelAllocator.RequestPages(TO_PAGES(sizeof(KernelAPI)));
|
KernelAPI *API = (KernelAPI *)KernelAllocator.RequestPages(TO_PAGES(sizeof(KernelAPI)));
|
||||||
|
@ -57,6 +57,8 @@ namespace Driver
|
|||||||
DriverCode CallDriverEntryPoint(void *fex);
|
DriverCode CallDriverEntryPoint(void *fex);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Vector<DriverFile *> GetDrivers() { return Drivers; }
|
||||||
|
int IOCB(unsigned long DUID, /* KernelCallback */ void *KCB);
|
||||||
DriverCode LoadDriver(uint64_t DriverAddress, uint64_t Size);
|
DriverCode LoadDriver(uint64_t DriverAddress, uint64_t Size);
|
||||||
DriverCode StartDrivers();
|
DriverCode StartDrivers();
|
||||||
Driver();
|
Driver();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user