adddevice routine

hi all,

i am trying to understand the flow of a driver that communicates to a
non-pnp device. however, this driver does have an AddDevice routine and it
does get called while Init.

DDK docs say tht AddDevice will only be called by the PNP manager while
init, so if this device is non-pnp, then how come I see this call?

Thanks

AP

It is not whether the device is PnP but whether the driver and the install
treat it as PnP. If you have an INF file that sets up a device driver, then
it does not matter if the device is PnP or not, you will see an AddDevice
routine called. Note: you can have a totally software device, that works
this way.


Don Burn (MVP, Windows DDK)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply

“A P” wrote in message news:xxxxx@ntdev…
> hi all,
>
> i am trying to understand the flow of a driver that communicates to a
> non-pnp device. however, this driver does have an AddDevice routine and it
> does get called while Init.
>
> DDK docs say tht AddDevice will only be called by the PNP manager while
> init, so if this device is non-pnp, then how come I see this call?
>
> Thanks
>
> AP
>

A P wrote:

i am trying to understand the flow of a driver that communicates to a
non-pnp device. however, this driver does have an AddDevice routine
and it does get called while Init.

DDK docs say tht AddDevice will only be called by the PNP manager
while init, so if this device is non-pnp, then how come I see this call?

You are incorrect. If your DriverEntry supplies an AddDevice callback,
then it is a PnP driver, by definition.

Not all PnP drivers have hardware. Your device is probably “root
enumerated”, meaning that it is loaded by PnP when triggered by a
software bus driver during startup. If you post your INF file, we can
help you figure out how it is being loaded.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

don, tim,

thanks for the help. as sought, here is the INF copy pasted below…

;; MyDevice.inf

;--------- Version Section

[Version]
Signature=“$Windows 95$”
Provider=%ProviderName%
Class=MyDevice
ClassGUID={ff646f80-8def-11d2-9449-00105a075f6b}
[SourceDisksNames]
1 = “Install Disk”,Disk1,
[SourceDisksFiles]
MyDevice.sys = 1,
;--------- ClassInstall/ClassInstall32 Section

; Not necessary if using a standard class
[ClassInstall32]
Addreg=Class_AddReg
[Class_AddReg]
HKR,%DeviceClassName%
HKR,Icon,“-1”
;--------- DestinationDirs Section

[DestinationDirs]
MyDevice_Files_Driver = 10,System32\Drivers
;--------- Manufacturer and Models Sections

[Manufacturer]
%MfgName%=Mfg0
[Mfg0]
%DeviceDesc%=MyDevice_DDI, ROOT/Aragon_MyDevice
;---------- DDInstall Sections

[MyDevice_DDI.NT]
CopyFiles=MyDevice_Files_Driver
AddReg=MyDevice_NT_AddReg
[MyDevice_DDI.NT.Services]
Addservice = MyDevice, 0x00000002, MyDevice_AddService
[MyDevice_AddService]
DisplayName = %SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %10%\System32\Drivers\MyDevice.sys
[MyDevice_NT_AddReg]
HKLM, “System\CurrentControlSet\Services\MyDevice\Parameters”,\
“BreakOnEntry”, 0x00010001, 0

; --------- Files (common) -------------
[MyDevice_Files_Driver]
MyDevice.sys
;--------- Strings Section

[Strings]
ProviderName=“Aragon Technologies Ltd.”
MfgName=“Aragon Technologies Ltd.”
DeviceDesc=“MyAdap Adapter”
DeviceClassName=“MyAdap”
SvcDesc=“MyAdap”

On Tue, Nov 25, 2008 at 2:26 PM, Tim Roberts wrote:

> A P wrote:
> >
> > i am trying to understand the flow of a driver that communicates to a
> > non-pnp device. however, this driver does have an AddDevice routine
> > and it does get called while Init.
> >
> > DDK docs say tht AddDevice will only be called by the PNP manager
> > while init, so if this device is non-pnp, then how come I see this call?
>
> You are incorrect. If your DriverEntry supplies an AddDevice callback,
> then it is a PnP driver, by definition.
>
> Not all PnP drivers have hardware. Your device is probably “root
> enumerated”, meaning that it is loaded by PnP when triggered by a
> software bus driver during startup. If you post your INF file, we can
> help you figure out how it is being loaded.
>
> –
> Tim Roberts, xxxxx@probo.com
> 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
>

A P wrote:

don, tim,

thanks for the help. as sought, here is the INF copy pasted below…

;--------- Manufacturer and Models Sections

[Manufacturer]
%MfgName%=Mfg0
[Mfg0]
%DeviceDesc%=MyDevice_DDI, ROOT/Aragon_MyDevice

Yep, as I said, this is a “root enumerated” device. It definitely is a
PnP device. The software “root” bus driver will enumerate this
automatically, exactly like the USB bus driver enumerates the devices it
finds.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

thanks again tim,

  1. so if i want to port this WDM driver into KMDF, what sample should I use
    as a baseline?

  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?

Thanks

AP

On Tue, Nov 25, 2008 at 2:47 PM, Tim Roberts wrote:

> A P wrote:
> > don, tim,
> >
> > thanks for the help. as sought, here is the INF copy pasted below…
> > …
> > ;--------- Manufacturer and Models Sections
> > ----------------------------------
> > [Manufacturer]
> > %MfgName%=Mfg0
> > [Mfg0]
> > %DeviceDesc%=MyDevice_DDI, ROOT/Aragon_MyDevice
>
> Yep, as I said, this is a “root enumerated” device. It definitely is a
> PnP device. The software “root” bus driver will enumerate this
> automatically, exactly like the USB bus driver enumerates the devices it
> finds.
>
> –
> Tim Roberts, xxxxx@probo.com
> 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
>

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.

  1. 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
Providenza & Boekelheide, Inc.

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 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
> 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
>

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@lists.osr.com] 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 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
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 http:</http:> MailScanner, and is
believed to be clean.

wht i meant here was SMI mode for the bios.

On Tue, Nov 25, 2008 at 7:08 PM, Joseph M. Newcomer
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@lists.osr.com] 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 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
> 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
>

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? 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
> 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@lists.osr.com
> 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 > 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
> 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
>
></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx>

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
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 <
>> xxxxx@flounder.com 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@lists.osr.com
>> 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 >> 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
>> 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
></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx>

“A P” wrote in message news:xxxxx@ntdev…

> wht i meant here was SMI mode for the bios.

Sorry… tampering with SMM is not among the usual Windows driver patterns
that KMDF addresses :slight_smile:
Following the exciting discoveries of Ms. Rutkowska, BIOS providers are
making
it even harder to hack.

Smbus as well, is not exactly a PnP bus, has never been designed for that.

–pa

since my client owns the BIOS, I guess ‘tampering’ would not be the right
word here (GRIN)

On Tue, Nov 25, 2008 at 7:41 PM, Pavel A. wrote:

> “A P” wrote in message news:xxxxx@ntdev…
>
> wht i meant here was SMI mode for the bios.
>>
>
> Sorry… tampering with SMM is not among the usual Windows driver patterns
> that KMDF addresses :slight_smile:
> Following the exciting discoveries of Ms. Rutkowska, BIOS providers are
> making
> it even harder to hack.
>
> Smbus as well, is not exactly a PnP bus, has never been designed for that.
>
> --pa
>
>
>
> —
> 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
>

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
> > 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?
> 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 > 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
>
></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx>

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>

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.

  • Cay

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>

I was not aware that a non-PnP/Power driver could be WHQLed at this point.
Generally, legacy drivers tend to actively interfere with power management
(I had to deal with this at a client site; none of their laptops using their
new device could go into sleep mode).
joe


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of A P
Sent: Tuesday, November 25, 2008 11:48 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] adddevice routine

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 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-7CF0072
878E6/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 ‘IntelR
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
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

— 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 http:</http:> MailScanner, and is
believed to be clean.</mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx>

AP:

In my opinion, you need to take stock of these items before you proceed with anything else:

  1. You need to find out what the deal is with getting something like this WHQL’d, and that’s
    probably not going to be a simple as it sounds. Unless you know something that I don’t or I’m just
    wrong (totally possible), the direct answer to the question of whether this will pass whql without a
    major vendor behind it is probably ‘no.’ That being said, although I have never submitted anything
    to WHQL, I would imagine that it is also possible that no one may ever look or notice that this is
    going on, unless you tell them. I’m no advising you to do anything that ask someone who knows how
    to get this questions answered fully. I’m not sure why, but it sounds like you can’t ask the vendor
    who wrote the previous driver that passed WHQL (if you can, then I’m really confused as to why
    you’re doing this), and similarly I don’t imagine that you have the source to it, so I don’t have
    any ideas here.

  2. If you don’t think you can get it WHQL’d and it still makes sense to proceed, given that you are
    familiar with the legacy/NT4 style, I would absolutely proceed that way, unless this driver also has
    some other purpose. Even in that case, to cur down on the number of things that are new to you, I
    would split them in to two drivers if possible, which might also allow you to get one through WHQL,
    if possible, if that matters. Although I think that KMDF absolutely rocks for what it was really
    designed for, I don’t see any benefit to using it for something that’s legacy-ish, and I think it
    just will make the driver harder to understand for someone who is not experienced with it, or really
    anyone in the case of (what would appear to be - port i/o) a simple driver (with very complex
    behavior under the os) like this.

  3. If you can get it WHQL’d, then do whatever the person who gives you the answer tells you to do.
    Do not deviate.

  4. I know I’ve said it before, but I don’t see why you’re BIOS vendor isn’t telling you exactly
    what you MUST do, including sample code. This, to my way of thinking, would provide the answers to
    your other questions, which don’t make a great deal of sense to me, given my understanding that all
    this thing is supposed to do (from a Windows point of view) so is enter SMM - like whether or not it
    needs to be PNP aware or support power management or DMA, unless you mean you are expecting Windows
    to respond to the changes you make in the BIOS through it’s natural mechanisms without rebooting.
    If that’s the case, that’s a suicide mission. The BIOS vendor should and pretty much has to spell
    out the protocol for flashing the BIOS on a specific architecture and platform, which I’m guessing
    they do, given that you say that this why you know you need to enter SMM.

  5. I have no idea of what product this is driving, but if the only purpose of hitting SMM is to
    allow for the update to run without requiring a boot disk or whatever, I would really advise you to
    reconsider, if that’s an option in the eyes of your client/manager. Flashing from DOS or the like
    is a very simple operation; doing something in SMM while Windows is running is totally possible, but
    it’s without question an order of magnitude harder, and unlike the DOS case, people will get a lot
    more pissed if you crash the machine on them. Also, while you in theory could get by without an
    Arium in both cases, the odds of doing this in the Windows case in a profitable time frame are a lot
    smaller than the DOS case (which would be doable if you have some time to work with and a lot of
    patience). That being said, while I would not ideally suggest that you undertake either of these
    approaches if an Arium will not be an option, the realities of getting an Arium to work with
    whatever your particular target happens to be can be extremely time consuming and sometimes impossible.

  6. Similarly, the BIOS vendor has to tell you what cpu/chipset/board triplets they support.
    There’s no way around this; once you know them, you need to stop whatever you are doing, pick one
    chipset as a paradigm, download the reference manuals and read them cover to cover, starting with
    (using Intel terminology) the I/O Controller Hub (ICH) manual.

Using ICH9 as an example: www.intel.com/design/chipsets/datashts/316972.htm

There are any number of ways that one can flash the bios, at least as far as the chipset is
concerned, but the won’t all work depending on the configuration of the system at the time - things
like VT-d, TXT, SMM lockout, et. c. will influence this. Also, in addition to the more traditional
options like LPC, SPI (not quite as traditional), there’s something like AMT, which might make the
whole thing easier for you, but it will be TOTALLY different, and only work if your
cpu/chipset/board/maybe ethernet controller/maybe baseboard controller/bios all support it and are
all using the same protocol, for lack of a better word.

This doesn’t even get in to making Windows coexist at least with the transition to SMM, which is
totally undocumented, and getting an arium to coexist meaningfully with windbg is another matter. I
don’t mean to be critical, but based on what you’ve posted so far, it sounds like most of this is
new to you, so I’d really think about the necessity of this feature (as seen by you, your manager
and your client/contract) relative to scope of this task, the time frame, the resources that you
have to dedicate to it (including vendor help, if any).

Good luck,

mm

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
>
> mailto:xxxxx> 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?
> 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>
> mailto:xxxxx> mailto:xxxxx mailto:xxxxx> 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> mailto:xxxxx
> mailto:xxxxx> mailto:xxxxx>>
> [mailto:xxxxx@lists.osr.com
> mailto:xxxxx
>
> mailto:xxxxx> mailto:xxxxx>
> mailto:xxxxx> 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
>
> mailto:xxxxx>
> 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>
> 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></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx>

>I was not aware that a non-PnP/Power driver could be WHQLed at this point. Generally, legacy

drivers tend to actively interfere with power management

This only occurs if the driver uses the obsolete NT3-4 hardware resources APIs like HalAssignSlotResources.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com