module driver interface

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Post Reply
Meshounah
Member
Member
Posts: 38
Joined: Sun Jun 24, 2007 6:48 pm

module driver interface

Post by Meshounah »

What would be the easiest way of implementing a dynamic driver loading interface? my idea was to have certain parts of the kernel blank and load the driver into these blank spots. What do you think?
chik'n
frank
Member
Member
Posts: 729
Joined: Sat Dec 30, 2006 2:31 pm
Location: East Coast, USA

Post by frank »

You could reserve a certain section of the address space for the drivers. ie all of the space between 0xD0000000 and 0xDFFFFFFF is designed for use with drivers. Then you could use relocatable code to put the drivers at the right locations.
Meshounah
Member
Member
Posts: 38
Joined: Sun Jun 24, 2007 6:48 pm

Post by Meshounah »

ok that makes sense thanks(my kernel isn't that far but that was bugging me)
chik'n
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post by Dex »

The simplest way, is just have a list of address to fake drivers, if you have no driver load, it just returns with a error code (eg: no driver loaded).
When you load a driver as a relocatable module, just replace the address in the list with the load address of the driver.
Post Reply