mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-30 00:08:03 +00:00
Added stub code for kernel API
This commit is contained in:
parent
b809cab953
commit
0ccee08913
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include <interrupts.hpp>
|
#include <interrupts.hpp>
|
||||||
#include <memory.hpp>
|
#include <memory.hpp>
|
||||||
|
#include <dumper.hpp>
|
||||||
#include <task.hpp>
|
#include <task.hpp>
|
||||||
#include <lock.hpp>
|
#include <lock.hpp>
|
||||||
#include <printf.h>
|
#include <printf.h>
|
||||||
@ -74,6 +75,31 @@ namespace Driver
|
|||||||
return memset(Destination, Value, Size);
|
return memset(Destination, Value, Size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DriverNetSend(unsigned int DriverID, unsigned char *Data, unsigned short Size)
|
||||||
|
{
|
||||||
|
DumpData("DriverNetSend", Data, Size);
|
||||||
|
}
|
||||||
|
|
||||||
|
void DriverNetReceive(unsigned int DriverID, unsigned char *Data, unsigned short Size)
|
||||||
|
{
|
||||||
|
DumpData("DriverNetReceive", Data, Size);
|
||||||
|
}
|
||||||
|
|
||||||
|
void DriverAHCIDiskRead(unsigned int DriverID, unsigned long Sector, unsigned char *Data, unsigned int SectorCount, unsigned char Port)
|
||||||
|
{
|
||||||
|
DumpData("DriverDiskRead", Data, SectorCount * 512);
|
||||||
|
}
|
||||||
|
|
||||||
|
void DriverAHCIDiskWrite(unsigned int DriverID, unsigned long Sector, unsigned char *Data, unsigned int SectorCount, unsigned char Port)
|
||||||
|
{
|
||||||
|
DumpData("DriverDiskWrite", Data, SectorCount * 512);
|
||||||
|
}
|
||||||
|
|
||||||
|
char *DriverPCIGetDeviceName(unsigned int VendorID, unsigned int DeviceID)
|
||||||
|
{
|
||||||
|
return (char *)"Unknown";
|
||||||
|
}
|
||||||
|
|
||||||
KernelAPI KAPI = {
|
KernelAPI KAPI = {
|
||||||
.Version = {
|
.Version = {
|
||||||
.Major = 0,
|
.Major = 0,
|
||||||
@ -91,8 +117,7 @@ namespace Driver
|
|||||||
.Unmap = UnmapMemory,
|
.Unmap = UnmapMemory,
|
||||||
},
|
},
|
||||||
.PCI = {
|
.PCI = {
|
||||||
.GetDeviceName = nullptr,
|
.GetDeviceName = DriverPCIGetDeviceName,
|
||||||
.Write = nullptr,
|
|
||||||
},
|
},
|
||||||
.Util = {
|
.Util = {
|
||||||
.DebugPrint = DriverDebugPrint,
|
.DebugPrint = DriverDebugPrint,
|
||||||
@ -102,13 +127,13 @@ namespace Driver
|
|||||||
},
|
},
|
||||||
.Commmand = {
|
.Commmand = {
|
||||||
.Network = {
|
.Network = {
|
||||||
.SendPacket = nullptr,
|
.SendPacket = DriverNetSend,
|
||||||
.ReceivePacket = nullptr,
|
.ReceivePacket = DriverNetReceive,
|
||||||
},
|
},
|
||||||
.Disk = {
|
.Disk = {
|
||||||
.AHCI = {
|
.AHCI = {
|
||||||
.ReadSector = nullptr,
|
.ReadSector = DriverAHCIDiskRead,
|
||||||
.WriteSector = nullptr,
|
.WriteSector = DriverAHCIDiskWrite,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user