Subject: Multiple Processor support and LKM's
To: None <netbsd-users@netbsd.org>
From: Ian McIntosh <ianm@cat.co.za>
List: netbsd-users
Date: 07/25/2007 11:14:29
Hi all

I am having trouble with a netbsd 3 kernel compiled with multiple 
processor support (GENERIC.MPAPIC) and the lkms my company uses to 
interface with the PCI cards we produce.

If using a single processor kernel everything works as expected. The 
lkms load correctly and the PCI interfaces to the cards works as expected.

However with the multiprocessor kernel I get some quite strange 
behavior. The lkms appear to load correctly, in that there are no errors 
reported on the attach(). Once loaded, however, any register reads using 
bus_space_read_4() returns rubbish data. To me it seems that the PCI 
registers have been incorrectly mapped, even though the attach() returns 
no errors. There is no difference in source code between the 
multiprocessor and single processor lkms.

I would have expected that compiling the lkms with the -DMULTIPROCESSOR 
flag would be all that is needed to get them to function correctly. Am I 
correct in this assumption? I am not an expert in this area and would 
appreciate any pointers on where to look or any good reading material on 
the subject.

I felt netbsd-users was the most appropriate list to post to (my other 
option was tech-kern). Please redirect me if this is the incorrect list.

Regards,
Ian McIntosh