Hello,
from what I’ve read, it looks like a legacy driver is your best choice.
In that case, I’d forego KMDF as it is primarily designed for
PnP/Power-aware device drivers, i.e., an overhead of complexity you don’t
seem to require.
In addition to PnP & Power management, KMDF’s main strength is the
simplification of complex I/O logic, but unless you’re going to have
asynchronous, pended operations, this would hardly be of use to you.
DMA is only useful for frequent, large, non-critical transfers, so I doubt
you’d need it either.
On Wed, 26 Nov 2008 05:48:00 +0100, A P wrote:
> martin,
>
> the existing driver is WHQLed, so I am hoping the new one will also be
> so.
>
> we can have several chipsets any of those chipset manufactures how allow
> soft SMI and who buy our BIOS, 965 is one possibility.
>
> my original question was in KMDF which sample fits the closest match (I
> am
> new to WDF/KMDF/WDM), I have only worked with legacy before.
> So when you say none fits correctly, then here is what my furhter
> questions
> are:
>
> 1. Does this kind of a driver need to be PNP aware?
> 2. Considering the adv of KMDF architecture - less code - it seems to be
> an
> attractive idea, the target OS is vista and above.
> 3. Does the driver need to be power savvy?
> 4. what abt DMA, do we need DMA at all? If so, what kind of DMA?
>
>
> Thanks
>
> AP
>
>
>
>
> On Tue, Nov 25, 2008 at 8:01 PM, Martin O’Brien
> wrote:
>
>> No problem, AP - all these acronyms get confusing.
>>
>> In theory, an SMI can only be generated externally; in practice, there’s
>> plenty of hardware on a motherboard that can generate one for you, so
>> it’s
>> usually (probably close to always these days on anything commodity)
>> effectively possible to generate one in software, assuming that you know
>> your chipset.
>>
>> That’s really all I can tell you to do - get the documentation for your
>> chipset and read it front to back. If you’re using some commodity intel
>> chipset - 965, Q35, et. c. - then there’s probably dozens of ways to
>> either
>> cause a SMI directly or indirectly by latching a SMI interrupt to some
>> sort
>> of event - for example, some allow the generation of an SMI when an NMI
>> occurs.
>>
>> You’re not going to get any help from MSFT on this - as it currently
>> stands, SMM remains a way to actually see physical resources in the
>> presence
>> of hardware assisted virtualization. Directed I/O could change this,
>> but
>> that assumes that the os will still run acceptably, without breaking
>> BIOS
>> and hardware vendors. In any case, if you’re BIOS vendor is a big one,
>> they
>> might help them, but they’ll never help you, unless you happen to work
>> for
>> .
>>
>> I don’t understand why your BIOS vendor isn’t able to tell you how to do
>> this. If they are, and your question is one purely of ‘how to write a
>> driver to do this,’ then the answer is to pick which ever model you feel
>> most comfortable with, because nothing will support this explicitly.
>> Assuming that you’re just going to beat on some port, et. c., the a
>> legacy
>> style (NT4, DriverEntry, DriverUnload) will be the easiest, I think, and
>> this is NEVER going to get WHQL’d, unless you work for, say, Dell, ATI,
>> nVidia, et. c., so that should enter in to what model you choose.
>>
>> What’s your chipset?
>>
>>
>> Good luck,
>>
>> mm
>>
>>
>>
>> A P wrote:
>>
>>> martin,
>>> first of all apologies for confusing you/others. i am new to this
>>> hence
>>> the terminologies are messed up a bit.
>>> >I’m still not sure what you’re really trying to do - SMBIOS, SMM
>>> and/or
>>> SMBus.
>>> I am working hand in hand with a BIOS vendor, so you can pretty much
>>> say
>>> that the BOIS ‘is ours’. We need to do certain ‘updates’ etc in the
>>> BIOS
>>> that requires us to go use SMI to get int SMM.
>>> Ofcourse we have good justification of doing the same.
>>> hope this clarifies.
>>> thanks
>>> ap
>>>
>>> On Tue, Nov 25, 2008 at 7:38 PM, Martin O’Brien <
>>> xxxxx@evitechnology.com mailto:xxxxx> wrote:
>>>
>>> AP, I know that they are easily confused, and that you probably know
>>> which one you really mean, but you need to use the terminology
>>> correctly, because at the moment, I’m still not sure what you’re
>>> really trying to do - SMBIOS, SMM and/or SMBus.
>>>
>>> SMBIOS is a standard (of sorts) that defines some tables in the BIOS
>>> and is fully documented:
>>>
>>> http://www.dmtf.org/standards/published_documents/DSP0134_2.6.0.pdf
>>>
>>> MSFT has this to say on Windows support:
>>>
>>>
>>> http://download.microsoft.com/download/5/D/6/5D6EAF2B-7DDF-476B-93DC-7CF0072878E6/SMBIOS.doc
>>>
>>> SMBus is basically a subset of the I2C bus, used to (at least)
>>> connect things like out of band baseboard controllers on
>>> motherboards to do things like report on battery levels:
>>>
>>> http://smbus.org/specs/smbus20.pdf
>>> http://smbus.org/specs/smbus_cmi10.pdf
>>> http://smbus.org/specs/smbus_driver_ext_arch10.pdf
>>>
>>> SMM/SMI is a mode of the Intel x86/x64 line of processors, since
>>> something like the 386SL. It is documented by Intel in the
>>> ‘Intel(R)
>>> 64 and IA-32 Architectures Software Developer’s Manual
>>> Volume 3B: System Programming Guide:’
>>>
>>> http://download.intel.com/design/processor/manuals/253669.pdf
>>>
>>> So, if you restate your goal using these terms more precisely, I
>>> might be able to help you, but I know squat about SMBus.
>>>
>>> Is this your proprietary BIOS or some other vendor’s? If the
>>> latter, you really need to talk with them before proceeding. In the
>>> case of SMBIOS and SMBus, there may be a quasi-official way to do
>>> whatever it is you are trying to do, but knowing what you’re
>>> ultimate goal is (i. e. - changing the amount of physical memory as
>>> reported by SMBIOS) would help. I know that msft learned the hard
>>> way that Windows cannot configure the computer in a way that
>>> contradicts what the BIOS believes the situation to be and have the
>>> system still run; I’m not sure what you can safely accomplish here.
>>>
>>>
>>> Good luck,
>>>
>>> mm
>>>
>>>
>>>
>>>
>>>
>>>
>>> A P wrote:
>>>
>>> wht i meant here was SMI mode for the bios.
>>>
>>> On Tue, Nov 25, 2008 at 7:08 PM, Joseph M. Newcomer
>>>
>>> mailto:xxxxx>>
>>> wrote:
>>>
>>> Interfacing to the SM Bus is one of the common questions I
>>> get from
>>> students. Other driver experts have told me that the SM Bus
>>> is not
>>> at all supported by the driver model, and as far as I can
>>> tell, the
>>> reason this is used is hardware developers who think it is
>>> cool and
>>> do not understand the reality of operating systems.
>>> So, in the case of KMDF, does it support SM Bus at all, or
>>> is it
>>> just that hardware that uses the SM Bus is the result of lazy
>>> hardware designers who latched onto what is probably a Bad
>>> Idea but
>>> which is really easy to interface to?
>>>
>>> joe
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> From: xxxxx@lists.osr.com
>>> mailto:xxxxx
>>> mailto:xxxxx>>> mailto:xxxxx>
>>> [mailto:xxxxx@lists.osr.com
>>> mailto:xxxxx
>>> mailto:xxxxx>>> mailto:xxxxx>] On* Behalf Of *A
>>> P
>>> Sent: Tuesday, November 25, 2008 10:01 PM
>>> To: Windows System Software Devs Interest List
>>> Subject: Re: [ntdev] adddevice routine
>>>
>>> it is a driver that interacts with the SMBIOS. we
>>> ae
>>> experimenting
>>> with a propreitory BOIS and the job of the driver is to
>>> configure
>>> it. So we have mostly IOCLT calls from the control program
>>> that are
>>> passed down to the BIOS. One concern is, we might need to go
>>> into
>>> SMM from the driver (currect driver is capable of doing it)
>>>
>>>
>>>
>>> On Tue, Nov 25, 2008 at 5:21 PM, Tim Roberts <
>>> xxxxx@probo.com
>>> mailto:xxxxx
>>> mailto:xxxxx>> wrote:
>>>
>>> A P wrote:
>>> >
>>> > 1. so if i want to port this WDM driver into KMDF, what
>>> sample should
>>> > I use as a baseline?
>>>
>>> Depends on what the driver does, but the toaster/func sample
>>> is probably
>>> a good start.
>>>
>>>
>>>
>>> > 2. just a thought: can’t I manually call the adddevice
>>> inside
>>> > DriverEntry, like non-pnp sample does? would the two paths
>>> (pnp
>>> > calling adddevice, and driverentry calling adddevie) be
>>> same
>>> internally?
>>>
>>> The non-PnP sample has a function that is somewhat like
>>> AddDevice,
>>> although it’s not exactly the same.
>>>
>>> The answer to your question depends on what you need to do.
>>> The “root
>>> enumerated” option gives you an icon in Device Manager. Your
>>> device can
>>> be managed using the normal Device Manager functions, like
>>> enable/disable/uninstall/update. The non-PnP option makes
>>> you a
>>> service. Instead of appearing in Device Manager, you appear
>>> in the
>>> control panel Services applet, and you have to be managed
>>> with Service
>>> Manager APIs like “net start” and “net stop”.
>>>
>>> What does your driver actually do?
>>>
>>> –
>>>
>>> Tim Roberts, xxxxx@probo.com mailto:xxxxx
>>> mailto:xxxxx>
>>>
>>>
>>> Providenza & Boekelheide, Inc.
>>>
>>>
>>> —
>>> NTDEV is sponsored by OSR
>>>
>>> For our schedule of WDF, WDM, debugging and other seminars
>>> visit:
>>> http://www.osr.com/seminars
>>>
>>> To unsubscribe, visit the List Server section of OSR Online
>>> at
>>> http://www.osronline.com/page.cfm?name=ListServer
>>>
>>>
>>> — NTDEV is sponsored by OSR For our schedule of WDF, WDM,
>>> debugging and other seminars visit:
>>> http://www.osr.com/seminars To
>>> unsubscribe, visit the List Server section of OSR Online at
>>> http://www.osronline.com/page.cfm?name=ListServer
>>> – This message has been scanned for viruses and
>>> dangerous content by MailScanner
>>> http:</http:>,
>>>
>>> and is
>>> believed to be clean.
>>>
>>>
>>> —
>>> NTDEV is sponsored by OSR
>>>
>>> For our schedule of WDF, WDM, debugging and other seminars
>>> visit:
>>> http://www.osr.com/seminars
>>>
>>> To unsubscribe, visit the List Server section of OSR Online
>>> at
>>> http://www.osronline.com/page.cfm?name=ListServer
>>>
>>>
>>>
>>> —
>>> NTDEV is sponsored by OSR
>>>
>>> For our schedule of WDF, WDM, debugging and other seminars visit:
>>> http://www.osr.com/seminars
>>>
>>> To unsubscribe, visit the List Server section of OSR Online at
>>> http://www.osronline.com/page.cfm?name=ListServer
>>>
>>>
>>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx>