[okl4-developer] Question on device acess control.

Jean-Christophe DUBOIS jcd at tribudubois.net
Fri Jul 18 23:10:49 EST 2008


Josh,

Thanks for your answer. 

On Fri, 18 Jul 2008 22:50:29 +1000, Joshua Root <jmr at cse.unsw.edu.au>
wrote:
>> So now I am wondering if there is a way to prevent OKLINUX to "see" some
> hardware. Let's say I have a plateform with 2 identical PCI ethernet
boards
> and I want Linux to only handle one of them. Actually, I'd like to make
> sure Linux doesn't even see the second board because I want to assign it
to
> another partition.
>>
>> How will this work?
>>
>> Linux could be redoing the PCI enumeration/configuration. I guess this
> should be disabled and we should rely on the boot loader/BIOS to do the
> correct initialisation.
>>
>> So now Linux would just walk the PCI tree but is it possible to prevent
> it from seeing the second Ethernet board.
> 
> To make this work you'd need to virtualise the PCI bus somehow. So you
> could make a server, let's call it 'vpci', and modify Linux to talk to
> it to find out what devices are available. You could also give vpci
> control over mapping PCI memory, and only allow the Linux instance to
> map the devices you want it to use.

OK, I see. I guess this would work but is a bit cumbersome as it would
require to modify the Linux PCI subsystem to explicitly go through the vpci
server. I was kind of expecting something simpler.
 
> I'm not too familiar with the current Iguana release, but it looks like
> the vbus server might do something like this?

Thanks I'll have a look

>> If it is not possible to prevent this is it possible to prevent Linux
> from "writing" to this Ethernet board while still allowing another
> partition to get to it?
> 
> Sure, it ought to be possible to simply not give Linux permission to map
> that board's address range.

Do you know how you could prevent (from OKL4 or from the build system)
Linux from mapping a board address range? Any hint would be appreciated.
 
> Cheers,
> Josh




More information about the Developer mailing list