From 8183f17368ea6944c8b36d7cb7564b33d2a0503a Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sun, 16 Jul 2017 09:21:36 +0200 Subject: introduced classes of driver types (graphics, mouse, keyboard, network, etc.) removed direct vga_init from kernel.c, using pci for this now, get the driver of type graphics from driver_manager --- src/hardware/pci.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/hardware/pci.c') diff --git a/src/hardware/pci.c b/src/hardware/pci.c index 0945a9a..bba0182 100644 --- a/src/hardware/pci.c +++ b/src/hardware/pci.c @@ -183,12 +183,9 @@ driver_t *pci_device_get_driver( pci_device_descriptor_t *descriptor, interrupt_ switch( descriptor->class_id ) { case 0x03: // graphics switch( descriptor->subclass_id ) { - case 0x00: // VGA - // TODO: we need a memory manager, otherwise we - // cannot load dynamically a VGA driver here! - // for now, let's put it directly into kernel.c - // for testing - // vga_t *vga = malloc( sizeof( vga_t ), interrupt, context ); + case 0x00: // Generic VGA + driver = (driver_t *)malloc( sizeof( vga_t ) ); + vga_init( (vga_t *)driver, interrupt, context ); break; } break; -- cgit v1.2.3-54-g00ecf