ableos/sysdata/programs/svga_driver/src/device.hb
2024-09-14 03:51:57 -05:00

41 lines
783 B
Plaintext

pci := @use("../../../libraries/pci/src/lib.hb");
.{PCIAddress} := pci
SVGADevice := struct {
pciAddr: PCIAddress,
ioBase: u32,
fifoMem: ^u32,
fbMem: ^u8,
fifoSize: int,
fbSize: int,
vramSize: int,
deviceVersionId: int,
capabilities: int,
width: int,
height: int,
bpp: int,
pitch: int,
}
svga_device := fn(): SVGADevice {
pci_addr := PCIAddress.(0, 0, 0)
return SVGADevice.(pci_addr, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
}
/*
struct {
uint32 reservedSize;
Bool usingBounceBuffer;
uint8 bounceBuffer[1024 * 1024];
uint32 nextFence;
} fifo;
volatile struct {
uint32 pending;
uint32 switchContext;
IntrContext oldContext;
IntrContext newContext;
uint32 count;
} irq;
*/