diff --git a/sysdata/programs/svga_driver/src/device.hb b/sysdata/programs/svga_driver/src/device.hb index 954105b4..daf98e46 100644 --- a/sysdata/programs/svga_driver/src/device.hb +++ b/sysdata/programs/svga_driver/src/device.hb @@ -89,19 +89,17 @@ GetBARAddr := fn(addr: PCIAddress, index: int): u32 { } setup_device := fn(svga_dev: ^SVGADevice): void { - // TODO: Fix this + // TODO: Fix this // refer to https://git.ablecorp.us/able/vmware-svga/src/commit/eea7ddcd0d34702f8f0a33c1933718706c6318c5/lib/refdriver/svga.c#L55 - svga_dev.pciAddr = PCIAddress.(0, 3, 0) - /* - pci_id := get_ids(svga_dev.pciAddr.bus, svga_dev.pciAddr.device, svga_dev.pciAddr.function) + pci_dev := pci.check_device(0, 3) - if pci_id.vendor != PCI_VENDOR_ID_VMWARE | pci_id.device != PCI_DEVICE_ID_VMWARE_SVGA2 { + if pci_dev.device_id.vendor != PCI_VENDOR_ID_VMWARE { log.error("SVGA device not found\0") return } - */ + //| pci_dev.device_id.device != PCI_DEVICE_ID_VMWARE_SVGA2 { svga_dev.ioBase = config_read32(svga_dev.pciAddr.bus, svga_dev.pciAddr.device, svga_dev.pciAddr.function, 0x10) & 0xFFFFFFF0 write_reg(svga_dev, reg.SVGA_REG_ENABLE, reg.SVGA_REG_ENABLE_ENABLE) diff --git a/sysdata/system_config.toml b/sysdata/system_config.toml index 86b0ad80..82e2aa32 100644 --- a/sysdata/system_config.toml +++ b/sysdata/system_config.toml @@ -20,14 +20,14 @@ resolution = "1024x768x24" # [boot.limine.ableos.modules.tests] # path = "boot:///tests.hbf" -# [boot.limine.ableos.modules.0serial_driver] +# [boot.limine.ableos.modules.serial_driver] # path = "boot:///serial_driver.hbf" # [boot.limine.ableos.modules.diskio_driver] # path = "boot:///diskio_driver.hbf" -# [boot.limine.ableos.modules.render_example] -# path = "boot:///render_example.hbf" +[boot.limine.ableos.modules.render_example] +path = "boot:///render_example.hbf" # [boot.limine.ableos.modules.serial_driver_test] # path = "boot:///serial_driver_test.hbf" @@ -41,11 +41,11 @@ resolution = "1024x768x24" # [boot.limine.ableos.modules.dt_buffer_test] # path = "boot:///dt_buffer_test.hbf" -[boot.limine.ableos.modules.svga_driver] -path = "boot:///svga_driver.hbf" +# [boot.limine.ableos.modules.svga_driver] +# path = "boot:///svga_driver.hbf" -# [boot.limine.ableos.modules.ps2_driver] -# path = "boot:///ps2_driver.hbf" +[boot.limine.ableos.modules.ps2_driver] +path = "boot:///ps2_driver.hbf" # [boot.limine.ableos.modules.filesystem_fat32] # path = "boot:///filesystem_fat32.hbf"