summaryrefslogtreecommitdiff
path: root/src/hardware/pci.c
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2017-07-16 09:21:36 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2017-07-16 09:21:36 +0200
commit8183f17368ea6944c8b36d7cb7564b33d2a0503a (patch)
treefc9ea3df698cab447dcee86cf94e047db037e9b6 /src/hardware/pci.c
parent1e8bad98827b651009a8ad4b8134d8a72a004be3 (diff)
downloadabaos-8183f17368ea6944c8b36d7cb7564b33d2a0503a.tar.gz
abaos-8183f17368ea6944c8b36d7cb7564b33d2a0503a.tar.bz2
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
Diffstat (limited to 'src/hardware/pci.c')
-rw-r--r--src/hardware/pci.c9
1 files changed, 3 insertions, 6 deletions
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;