none
I would like to access what i believe is a system address. basically i want to access a device at fed9 0000 in hex. RRS feed

  • Question

  • Hello, I am trying to write a kernal mode driver for windows 8 platform. Basically I have an amd chipset and have determined that I would like to access a register with a certain offset from what amd labels acpimmioaddr base+offset. I have the offset and now I believe to have found the base or acpimmioaddr which is fed9 0000 in hex. I have determined I need to write a kernal mode driver to do this. In the driver how would I write and read this address? Also a secondary question how would I export functionality to either a user mode driver (dll) and ultimately an api?

    Notes: I am trying to access memory mapped I/O. 

    I believe I have to use hal functions but am not sure if it is hal.dll or sys file. I think I need to map the needed system space to kernal mode virtual memory using MmMapIoSpace(). I believe I have read some wheres that this may have changed in more recent versions of windows. If anyone can help I appreciate the time very much, thank you.

    Monday, January 12, 2015 4:38 AM

Answers

  • First you need to get the ACPI BIOS to make this register available to you, just grabbing a register without owning it will just crash the system at some point.  So what are you trying to do by accessing this register. 

    Once you have the register, you will be using MmMapIoSpace to map it into memory, and the various READ_XXX and WRITE_XXX HAL calls to access it.  Providing an API to user space depends on what type of device it is.  For a simple device a common approach is to use one or more IOCTL's where you define a handler for IRP_MJ_DEVICE_CONTROL to support these.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com

    Monday, January 12, 2015 12:14 PM
  • The ACPI BIOS owns the register, unless it creates a device entry for it , or has a documented access method (which would be unique to this BIOS) you are out of luck.  This has been asked many times before on this forum or the NTDEV list at http://www.osronline.com and the bottom line is unless you can get the BIOS to give you support, you cannot access the register.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com

    Monday, January 12, 2015 11:39 PM

All replies

  • First you need to get the ACPI BIOS to make this register available to you, just grabbing a register without owning it will just crash the system at some point.  So what are you trying to do by accessing this register. 

    Once you have the register, you will be using MmMapIoSpace to map it into memory, and the various READ_XXX and WRITE_XXX HAL calls to access it.  Providing an API to user space depends on what type of device it is.  For a simple device a common approach is to use one or more IOCTL's where you define a handler for IRP_MJ_DEVICE_CONTROL to support these.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com

    Monday, January 12, 2015 12:14 PM
  • What do you mean by get the ACPI BIOS? Will have to read on how to get acpi bois and what that means. this register is a control register for a gpio pin on the amd bolton fusion controller hub. amd data sheet says it is at an address mmioacpiaddr+offset for this particular pin. writing a 0 or 1 turns it off and on respectively. what i am trying to do is similar to older day parallel ports to work with custom circuitry made by myself. this is different in that the gpio pin is on the bolton fch and it is not a parallel port. most of the control of the device i plan to be implemented in the kernal mode driver eventually, to reduce latency by having to go through the os with irp's or ioctl's when it is not necessary. so ioctl's will probalby be enough so that I can basically control it from the api but really most of the work will be done by the kernal mode driver.

    Also again im not certain on acpi bios and accessing it, kinda new to pc hardware but im fairly certain that this device is accessed through mmio. so simply one of the system memory space address is actually io for this device. shouldnt it be enough to just write to the register? sorry if i am missing something i do know you said it would cause problems. I think though that to the processor, fed90000 should be the acpi base address and should not require special oi address space or special machine instructions for it. I did read that the bolton fch bios or firmware could reposition the base address. dont know how to find this information out other then testing it. 

    Hope to hear back, thanks for the reply it is helped. the hal instructions is going similar to what i have read, but question how do i access hal functions? is it a kernal mode driver or user mode? is it a dll or sys basically cause im not sure how to link to .sys files even though i have read that kernal mode driver's exported functions can be linked to similarly to user mode drivers (dll's) but when i try and use loadlibrary() and getprocaddress() loadlibrary() allways returns null if i remember correctly. 

    Monday, January 12, 2015 11:33 PM
  • The ACPI BIOS owns the register, unless it creates a device entry for it , or has a documented access method (which would be unique to this BIOS) you are out of luck.  This has been asked many times before on this forum or the NTDEV list at http://www.osronline.com and the bottom line is unless you can get the BIOS to give you support, you cannot access the register.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com

    Monday, January 12, 2015 11:39 PM
  • I am not an expert on acpi bios. From what I can make of it, according to the amd data sheets on the bolton fusion controller hub, it seems the mmio address that it will listen to for control of this gpio pin is programed by the chips bios or firmware. Amd even has an example of source code that actually determines the acpimmiobaseaddress. So provided I have the correct address which is a matter that is controlled by the bolton fch (amd's southbridge) or at least it appears that way, It is just a matter of the processors firmware and windows os to write to this address. 

    Thank your for the answers about writing to the system memory in windows and driver ioctl's. It appears as though windows may allow this and the problem would be with the firmware of the processor itself, if that memory range is not accessible in typical virtual mode. I have heard of int10 calls, which i believe were related calls to bios. Being as acpi has taken over pnp bios I think this may be a call to acpi bios. I will have to look into this. 

    I am concerned for system stability and correctness with in the operating system however my personal computer I am testing the driver on is not the primary concern instead it is the custom hardware. This is actually not a major step in developing the hardware and it is proving very time consuming. At the same point I do find the very complicated personal computer fascinating so in some ways I am enjoying this. Basically I will try to just map the system memory and write to it. If you could point me in the right direction for using the hal functions It would be much appreciated. Are they simply a dll, and I can use explicit dynamic linking? 

    Tuesday, January 13, 2015 9:06 PM
  • The problem is that the ACPI BIOS defaults to giving these functions to ACPI.SYS which can very easily be writing to the register.  At which point your OS stability is potentially toast.  Some ACPI BIOS's even have methods that can be called to write to this, so you may find another driver is attempting to use things. 

    For a good discussion of this go to the NTDEV forum and search for PIO.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com

    Tuesday, January 13, 2015 10:06 PM
  • Also if you could help with one thing, can I explicitly link to a .lib file for my kernal driver? Can I use LoadLibrary("ntoskrnl.lib") to get a handle or is that only for .dll types? I am aware in visual studio I can implicitly(?) link .lib and .dll by dragging and dropping into the resources folder for the project however sometimes I have seen this not work with dll's for various reasons and when I explicitly link the dll it then works. I like to be able to explicitly link them so I can verify the library and respective functions I will be using are actually initialized and working properly before continuing, I can break and return an error alerting me that basic linking is not working right, however with the drag and drop let visual studio take care of things method does not allow this as much?

    Also I found this site, http://wiki.osdev.org/Memory_Map_(x86) which says there is typically a range of x86 physical memory used for mmio and the address I would like to access does fall into this range suggesting that it is correct. Now I am aware that either the os or acpi bios may reserve this address (as it is explicitly used by amd obviously in the bolton fch) however I would like to try accessing it to see if that will in fact happen. Also it would be my first working windows kernal mode driver (even if it does in fact not work) it is an opportunity for me to learn to make the driver and to interface it with other things. 

    Tuesday, January 13, 2015 11:47 PM
  • You cannot use a user space library in kernel mode, and there is no equivalent of loadlibrary for DLL's in the kernel.  You cannot access the memory and say gee it worked, therefore it is safe.  I know of people who did this with the PCI configuration space registers, and sold product, of course unfortunately they created weird failure modes for other products (while theirs looked fine), and in the end were sued both out of business and out of their house and home.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com

    Wednesday, January 14, 2015 2:05 AM
  • Thank you, strangely I feel more familar with dynamically linked libraries then I do static. I was able to statically link to ntoskrnl.lib to get mmapiospace() from ntoskrnl.exe though it builds the driver I'm not really certain that is linked correctly other then visual studio does not throw any erros for the use of an declared, and uninitialized function mmapiospace() though maybe it is declared somewheres in the wdm.h headers. I wish there was some way to do it explicitly like dll's but I understand now that those two functions for dll's simply will not work for kernal mode drivers. (also msdn says only for .lib or .exe) (are all static libraries .exe's?)

    Is there some kind of convention that kernal libraries are .exe's instead of statically linked libraries? kinda confused at that point. Also sorry I know I have asked more and more questions to every asnwer and some of these are probably basic window c programming and not at the level of driver questions and I apologize. 

    Wednesday, January 14, 2015 8:39 PM
  • All the kernel mode support is through what you would think of as a DLL.  In fact a kernel driver is a DLL with a single entry point DriverEntry.  Now there are static stub libraries for all the entry points in the kernel, HAL, and other support DLL's that run in kernel mode, so you link to these.  Note: while the ntoskrnl is name an exe it is actually a DLL.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com

    Wednesday, January 14, 2015 8:47 PM
  • I see, I think now that all dll's are exe's but for kernal they are just named exe instead of dll and have a .lib which is statically linked. now my question is, when you make a kernal mode driver it is a .sys, could i also make a .exe much like a dll?
    Thursday, January 15, 2015 4:06 PM
  • Look up the Windows PE file information, see http://msdn.microsoft.com/en-us/library/windows/desktop/ms680547(v=vs.85).aspx  An EXE, a DLL and a SYS file are all this format.  It is how they are interpreted that is slightly different.

    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com

    Thursday, January 15, 2015 4:13 PM
  • Okay to even get started I need to go down the "how to install a driver path". I'm trying to use DriverInstallPackage() api, but always returns error for incorrect param. this is my code. 

    #include <stdio.h>
    #include <windows.h>
    #include <difxapi.h>
    #include <stdlib.h>
    #include <tchar.h>

    PCWSTR DriverPackageInfPath;  // C:\Users\Marshal Craft\Source\Workspaces\sample\wtfinstall\x64\Win8Release\wtfinstall Package
    DWORD Flags;
    PCINSTALLERINFO_A pInstallerInfo = NULL;
    BOOL *pNeedReboot; 
    BOOL NeedReboot;

    typedef int(*DRIVERPACKAGEINSTALL)( PCWSTR, DWORD, PCINSTALLERINFO_W, BOOL );

    int main()
    {
    DriverPackageInfPath =  "C:\\Users\\Marshal Craft\\Source\\Workspaces\\sample\\wtfinstall\\x64\\Win8Release\\wtfinstall Package\\wtfinstall.inf";
    Flags = 0;    // DRIVER_PACKAGE_LEGACY_MODE;
    HINSTANCE hDLL;             // Handle to DLL

    DRIVERPACKAGEINSTALL DriverPackageInstall;

    hDLL = LoadLibrary("difxapi.dll");
    if(NULL == hDLL)
    {
    printf("could not load dll");
    return  0;
    }

    DriverPackageInstall = (DRIVERPACKAGEINSTALL)GetProcAddress(hDLL, "DriverPackageInstallA");

    if(NULL == DriverPackageInstall)
    {
    printf("dll could not load function");
    return 1;
    }


    int error;
    error = DriverPackageInstall(DriverPackageInfPath, Flags, NULL, NeedReboot);
    printf("%d", error);


    return 2;
    }

    I'm basically explicitly loading the dll and and function from difxapi.dll which works however the function fails and returns error = 87. I believe that is invalid parameter. Any ideas?


    Sunday, January 25, 2015 3:47 PM
  • First check your INF file by running ChkInf on the file, fix all errors and warnings that show up.  Second thing turn on SetupAPI logging, see https://msdn.microsoft.com/en-us/library/windows/hardware/ff550887(v=vs.85).aspx Check the log after you try to install it should point you to the problem, worst case post the log on the forum.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com

    Sunday, January 25, 2015 3:58 PM
  •  this is my code now.

    #include <stdio.h>
    #include <windows.h>
    #include <difxapi.h>
    #include <stdlib.h>
    #include <tchar.h>

    PCSTR DriverPackageInfPath;  // C:\Users\Marshal Craft\Source\Workspaces\sample\wtfinstall\x64\Win8Release\wtfinstall Package
    DWORD Flags;
    PCINSTALLERINFO_A pInstallerInfo = NULL;
    BOOL NeedReboot = FALSE;

    typedef int(*DRIVERPACKAGEINSTALL)( PCSTR, DWORD, PCINSTALLERINFO_W, BOOL * );

    int wmain( int argc, WCHAR* argv[] ) 
    {
    DriverPackageInfPath =  "C:\\Users\\Marshal Craft\\Source\\Workspaces\\sample\\wtfinstall\\x64\\Win8Release\\wtfinstall.sys";
    Flags =  DRIVER_PACKAGE_LEGACY_MODE;
    HINSTANCE hDLL;             // Handle to DLL

    DRIVERPACKAGEINSTALL DriverPackageInstall;

    hDLL = LoadLibrary("difxapi.dll");
    if(NULL == hDLL)
    {
    printf("could not load dll");
    return  0;
    }

    DriverPackageInstall = (DRIVERPACKAGEINSTALL)GetProcAddress(hDLL, "DriverPackageInstallW");

    if(NULL == DriverPackageInstall)
    {
    printf("dll could not load function");
    return 1;
    }


    int error;
    error = DriverPackageInstall(DriverPackageInfPath, Flags, NULL, &NeedReboot);
    printf("%d ", error);


    return 1;
    }

    it throws no warnings now however still returns error code 2. think i am not specifying the file path correctly. interesting to is the error is for cannot find file. there is another error for incorect path wonder what the differences are in those. thanks for help everyone.


    Sunday, January 25, 2015 7:58 PM
  • will check inf file soon have to look into that api now. however a while back i do beleive i succesfully staged driver to driver store so think nothing has changed with the drive sense then.
    Sunday, January 25, 2015 8:00 PM
  • Not too sure one, is for anscii and one for unicode. think 8 or 16 bits? recompiled and run program with DriverInstallA and returns code -536870347 with the end of the path actually the .inf file and returns 2 still with the path just the directory the inf is in.
    Sunday, January 25, 2015 9:39 PM
  • #include <stdio.h>
    #include <windows.h>
    #include <difxapi.h>
    #include <stdlib.h>
    #include <tchar.h>

    PCSTR DriverPackageInfPath;  // C:\Users\Marshal Craft\Source\Workspaces\sample\wtfinstall\x64\Win8Release\wtfinstall Package
    DWORD Flags;
    PCINSTALLERINFO_A pInstallerInfo = NULL;
    BOOL NeedReboot = FALSE;

    typedef int(*DRIVERPACKAGEINSTALL)( PCSTR, DWORD, PCINSTALLERINFO_A, BOOL * );

    int wmain( int argc, WCHAR* argv[] ) 
    {
    DriverPackageInfPath =  "C:\\Users\\Marshal Craft\\Source\\Workspaces\\sample\\wtfinstall\\x64\\Win8Release\\wtfinstall.inf";
    Flags =  0; //DRIVER_PACKAGE_LEGACY_MODE;
    HINSTANCE hDLL;             // Handle to DLL

    DRIVERPACKAGEINSTALL DriverPackageInstall;

    hDLL = LoadLibrary("difxapi.dll");
    if(NULL == hDLL)
    {
    printf("could not load dll");
    return  0;
    }

    DriverPackageInstall = (DRIVERPACKAGEINSTALL)GetProcAddress(hDLL, "DriverPackageInstallA");

    if(NULL == DriverPackageInstall)
    {
    printf("dll could not load function");
    return 1;
    }


    int error;
    error = DriverPackageInstall(DriverPackageInfPath, Flags, NULL, &NeedReboot);
    printf("%d ", error);


    return 1;
    }

    with above code is now returning a strange negative integer?


    Sunday, January 25, 2015 10:00 PM
  • okay, which do you mean, the driver or the program which attempts to install the driver should be 64 bit configuration?
    Sunday, January 25, 2015 11:53 PM
  • would that need different difxapi.dll, one for 64 bit?
    Sunday, January 25, 2015 11:54 PM
  • ok i have replaced the dll with the 64 bit version found in the 64 bit path of the difx directory however it still returns same code. Also i was wondering why it is negative? is it something with printf that i am using? I did some reading and it appears I do need to rebuild the driver for 64 bit. I'm having trouble doing this. I have visual studio 2013 and is throwing an error for can not find trace.h 
    Friday, January 30, 2015 11:21 PM
  • have rebuilded both installer and a skeleton driver from wdk sample code just to test my installer which is pretty much the same as above. now i get code of -5368703269? dont see it in the that header you mentioned. this could be a larger unsigned integer, no?
    Friday, January 30, 2015 11:55 PM
  • K i think i have found the code if 3 higit hex value is the code, dont know about mask and other part but it would be add driver store failed, which would make sense cause it is not signed and driver can not be staged with out signing. will have to reboot and try in test mode?
    Saturday, January 31, 2015 12:26 AM
  • well booted in test mode or with driver signing off. will not install driver cause it says no device instance. it has staged the driver but not actually isntalled it. Also now i have a quesiton as to what the exact difference is between installing the driver and loading the driver and calling driver entry function? 
    Sunday, February 1, 2015 6:07 AM
  • Thank you for responding. Not sure I understand first part about ACPI device. But basically I'm trying to access a gpio that is memory mapped io that will then have a device attatched to it. My understanding so far is that PnP has to detect the device but there is no way for it to do that. I am new to windows drivers and so when i realized that installing a driver is in itself comparable to complexity as the driver itself, I decided to try and just install a generic driver that does nothing and has no devices just to see that I am in fact installing the driver. Then I had planed to learn how to load the driver and have it's driver entry function called that can fill in it's respective members. Eventually I had planed on creating ioctl's that could be accessed by user mode application and mapping physical memory of mmio address to system address. I thought this would allow it to at least work, then I could go back and try and bring it in line with windows methodology. Also there may already be functions already implemented by system supplied driver and a filter driver may allow it to be more portable but I had not planned on going into that until after I had got something working specific to my platform.

    Now just to go over where I am thus far, I will summarize what I believe to be necessary so far. A driver needs a device. Devices are found via hardware and it's respective drivers, which are then enumerated and pnp is alerted at kernal mode. pnp or io manager finds the driver and only then loads an installed driver or installs and then loads the driver if not installed already. It seems there is no device specific to a amd fusion controller hub gpio pin. Also there is no way for it to no about devices attatched with out my driver already loaded. I have started to read about bus drivers. I think a bus driver really doesnt fit PnP in that it is kinda already part of the system and self detection kinda doesnt make sense. So can I or do I have to make my driver a bus driver? Or does acpi or some low level firmware still have to say "hey im a bus and this is how i work" to the os? I looked at toaster sample code and it has an enum executable that plugs in or ejects devices based on device id's also a toaster seems pretty unorthodox device so could I create my own kind of device fitting to my purpose and then some how make a user mode application which alerts PnP "logically" instead of by hardware? 

    Also I had considered another approach of just using anything to that gets automatically enumerated and using it's device type to call my driver, then my driver does it's things even though they are unrelated to the device detected. I know this isnt how it's supposed to work and also would temporarily mess up PnP for that device for it's intended purpose, but would it allow me to at least access physical memory mapped io? 

    Sorry have been racking my head on this for months now and the whole purpose isnt to implement windows methodology but actually completely unrelated, what was originally important is development of new device and for the past 3 months all's I've worked on is windows drivers and progress has been little or none it seems.

    Sunday, February 1, 2015 9:40 PM
  • ;
    ; KMDFDriver7.inf
    ;

    [Version]
    Signature="$WINDOWS NT$"
    Class=Sample ; TODO: edit Class
    ClassGuid={78A1C341-4539-11d3-B88D-00C04FAD5171} ; TODO: edit ClassGuid
    Provider=%ManufacturerName%
    CatalogFile=KMDFDriver7.cat
    DriverVer=01/30/2015,18.33.3.884

    [DestinationDirs]
    DefaultDestDir = 12

    ; ================= Class section =====================

    [ClassInstall32]
    Addreg=SampleClassReg

    [SampleClassReg]
    HKR,,,0,%ClassName%
    HKR,,Icon,,-5

    [SourceDisksNames]
    1 = %DiskName%,,,""

    [SourceDisksFiles]
    KMDFDriver7.sys  = 1,,

    ;*****************************************
    ; Install Section
    ;*****************************************

    [Manufacturer]
    %ManufacturerName%=Standard,NTamd64

    [Standard.NTamd64]
    %KMDFDriver7.DeviceDesc%=KMDFDriver7_Device, Root\KMDFDriver7 ; TODO: edit hw-id

    [KMDFDriver7_Device.NT]
    CopyFiles=Drivers_Dir

    [Drivers_Dir]
    KMDFDriver7.sys

    ;-------------- Service installation
    [KMDFDriver7_Device.NT.Services]
    AddService = KMDFDriver7,%SPSVCINST_ASSOCSERVICE%, KMDFDriver7_Service_Inst

    ; -------------- KMDFDriver7 driver install sections
    [KMDFDriver7_Service_Inst]
    DisplayName    = %KMDFDriver7.SVCDESC%
    ServiceType    = 1               ; SERVICE_KERNEL_DRIVER
    StartType      = 3               ; SERVICE_DEMAND_START
    ErrorControl   = 1               ; SERVICE_ERROR_NORMAL
    ServiceBinary  = %12%\KMDFDriver7.sys
    LoadOrderGroup = Extended Base

    ;
    ;--- KMDFDriver7_Device Coinstaller installation ------
    ;

    [DestinationDirs]
    KMDFDriver7_Device_CoInstaller_CopyFiles = 11

    [KMDFDriver7_Device.NT.CoInstallers]
    AddReg=KMDFDriver7_Device_CoInstaller_AddReg
    CopyFiles=KMDFDriver7_Device_CoInstaller_CopyFiles

    [KMDFDriver7_Device_CoInstaller_AddReg]
    HKR,,CoInstallers32,0x00010000, "WdfCoInstaller01011.dll,WdfCoInstaller"

    [KMDFDriver7_Device_CoInstaller_CopyFiles]
    WdfCoInstaller01011.dll

    [SourceDisksFiles]
    WdfCoInstaller01011.dll=1 ; make sure the number matches with SourceDisksNames

    [KMDFDriver7_Device.NT.Wdf]
    KmdfService =  KMDFDriver7, KMDFDriver7_wdfsect
    [KMDFDriver7_wdfsect]
    KmdfLibraryVersion = 1.11

    [Strings]
    SPSVCINST_ASSOCSERVICE= 0x00000002
    ManufacturerName="" ; TODO: add ManufacturerName
    ClassName="Samples" ; TODO: edit ClassName
    DiskName = "KMDFDriver7 Installation Disk"
    KMDFDriver7.DeviceDesc = "KMDFDriver7 Device"
    KMDFDriver7.SVCDESC = "KMDFDriver7 Service"
    Sunday, February 1, 2015 9:49 PM
  • this one and another driver both gave the error for no device inst. on another note, I dont understand why DriverPackageInstall() cares if there is a device instance. Shouldnt it just install the driver anyways?
    Sunday, February 1, 2015 9:50 PM
  • okay will try have to look up the device id's can I make a new id for my type of device. It will basically make a new device that will be the on the root, then install driver for device id or will I have to install driver as I have been trying? Also will have to look into how I specify the device id the driver package is for, probably in the inf file I think. Will respond when done with these things. THANKS for help!
    Monday, February 2, 2015 1:48 AM
  • also it says it adds a non pnp device, could i make up and add a pnp device so my driver can automatically be loaded when i create the device on the root node?
    Monday, February 2, 2015 1:54 AM
  • Hello, I noticed in another question I think you have answer Is i need, 

    https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/6016d029-a331-4b88-92c5-8e32319104ba/how-to-create-a-new-rootenumerated-device-for-a-nonplug-and-play-device-by-difxapi?forum=wdk

    I think your post is to use setupAPI for the device. then pnp will automatically start the driver if the driver is staged and is best match for device id? What if the device is not a typical device or custom device? Also what about root devices? there is nothing to enumerate them it seems? Also i think there is a difference between device being enumerated and there at one point had been an instance of a device? when i try and use difxapi to just install a driver it will not do it cause it says no matching device id or is no device. Additionally sometimes hardware can detect new devices on it's own, but in my case there is no way with out my driver already running. Is there a way to tell plugnplay that hey there is a new device? seems like this would be needed for root devices. Then if I can use some api to enumerate a device, even though that has no hardware like hotwire for plug and play, i guess to enumerate it logically, pnp would take over and eventually load my driver if installed or install it. So i would not even need to install the driver ahead of time. I think though it would have to be loaded to the driver store or staged. 

    Thursday, February 12, 2015 1:27 AM
  • Okay after a while with no responses from anyone, I have done some reading, it seems I must attatch a device to the root device node that is essentially a bus driver. I will have to use devcon or better yet the apis used in devcon. looking through devcon now. 

    It seems the device can in fact be pnp, I did not really distinguish the difference between when a device is plugged in and enumerated and what pnp does. pnp does not really control if the device is detectable rather it controls the power states of the device. My driver would have to support the various power states that pnp manager will tell it to go to. that is different then disconnecting the device. My device initially will be allways pluged in. It will be a seperate bus driver for the amd bolton fhc. It will be a child device of the root device node.

    I am looking into this now and will report back when I am able to correctly install the device with devcon or deviceenumeration apis. I was able to stage my driver so once I have enumerated the device pnp should find my driver and start it. 

    Tuesday, March 17, 2015 12:22 AM