Hello,

I am looking at the net2280 USB Client driver and I see this call to
DDKReg_GetWindowInfo which fills in a DDKWINDOWINFO structure supposedly
from the registry, but what I dont seem to understand is the IO and MEM
windows data structures associated with this call ? Is there someone that
could explain this a bit better then what I find here or point me where to
look ?

http://msdn2.microsoft.com/en-us/library/ms897707.aspx

Thanks,

Joe W.

RE: DDKReg_GetWindowInfo by Silver

Silver
Wed Sep 26 18:05:02 CDT 2007

This is the struct, it is pretty basic, a base address and a size:

typedef struct _DEVICEWINDOW_tag {
DWORD dwBase;
DWORD dwLen;
} DEVICEWINDOW, *PDEVICEWINDOW;


Sorry to go recursive on you but what is it that you are missing?

PCI devices have a bunch of "windows", basically memory regions, that can be
accessed. DDKWINDOWINFO contains the list of the regions.

PCI has different types of bus cycles to access regions, IO cycles and
memory cycles - you need to use the correct cycle type to access the window.

Geoff
--


Re: DDKReg_GetWindowInfo by Steve

Steve
Wed Sep 26 15:37:02 CDT 2007

There's a lot of text in the docs for that. The DEVICEWINDOW strict is
pretty simple. Can you be more specific about what it is you don't
understand?

"Joe Welfeld" <jwelfeldnospam@datastrip.net> wrote in message
news:%23XU04MHAIHA.4568@TK2MSFTNGP02.phx.gbl...
> Hello,
>
> I am looking at the net2280 USB Client driver and I see this call to
> DDKReg_GetWindowInfo which fills in a DDKWINDOWINFO structure supposedly
> from the registry, but what I dont seem to understand is the IO and MEM
> windows data structures associated with this call ? Is there someone that
> could explain this a bit better then what I find here or point me where to
> look ?
>
> http://msdn2.microsoft.com/en-us/library/ms897707.aspx
>
> Thanks,
>
> Joe W.
>


Re: DDKReg_GetWindowInfo by Joe

Joe
Thu Sep 27 07:37:03 CDT 2007

Hi All,

what I dont see, in particular to the net2280 driver, (snippet below is
from that driver)

if (DDKReg_GetWindowInfo(hkDevice, &wini) != ERROR_SUCCESS) {
RETAILMSG(1, (_T("%s Error getting window information\r\n"),
pszFname));
goto EXIT;
}

// Sanity check windows
if (wini.dwNumMemWindows < 3) {
RETAILMSG(1, (_T("%s Less than 3 memory windows\r\n"),
pszFname));
goto EXIT;
}


In the documentation:
dwNumMemWindows
This value is derived from the number of matching window and size
pairs in the MemBase and MemLen registry values, and can be zero
(0).

But in the registry entry (below from common.reg) for the net2280 I cant
find these values set anywhere, yet the driver code expects there to be at
least 3 windows ? So as there another registry entry I cant find? or some
other way MemBase and MemLen get setup ?

; @CESYSGEN IF CE_MODULES_NET2280
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\PCI\Template\NET2280]
"Dll"="net2280.dll"
"Class"=dword:0C
"SubClass"=dword:03
"ProgIF"=dword:FE
"VendorID"=multi_sz:"17CC"
"DeviceID"=multi_sz:"2280"
"Prefix"="UFN"
"IsrDll"="giisr.dll"
"IsrHandler"="ISRHandler"
"Priority256"=dword:6C
"BusIoctl"=dword:2a0048
"IClass"=multi_sz:"{E2BDC372-598F-4619-BC50-54B3F7848D35}=%b","{6F40791D-300E-44E4-BC38-E0E63CA8375C}=%b"
; @CESYSGEN ENDIF CE_MODULES_NET2280





"Silver" <Silver@discussions.microsoft.com> wrote in message
news:1F82117E-8710-4CBF-B04E-3D43C544392E@microsoft.com...
> This is the struct, it is pretty basic, a base address and a size:
>
> typedef struct _DEVICEWINDOW_tag {
> DWORD dwBase;
> DWORD dwLen;
> } DEVICEWINDOW, *PDEVICEWINDOW;
>
>
> Sorry to go recursive on you but what is it that you are missing?
>
> PCI devices have a bunch of "windows", basically memory regions, that can
> be
> accessed. DDKWINDOWINFO contains the list of the regions.
>
> PCI has different types of bus cycles to access regions, IO cycles and
> memory cycles - you need to use the correct cycle type to access the
> window.
>
> Geoff
> --
>



Re: DDKReg_GetWindowInfo by Steve

Steve
Thu Sep 27 09:40:45 CDT 2007

>But in the registry entry (below from common.reg) for the net2280 I cant
>find these values set anywhere, yet the driver code expects there to be at
>least 3 windows ?
the NET2280 is a PCI device, thus those entries are added by the PCI bus
enumerator. Using the DDKReg_GetWindowInfo is the proper way to write a bus
agnostic driver.

- Steve Maillet
http://www.EmbeddedFusion.com


Re: DDKReg_GetWindowInfo by Joe

Joe
Thu Sep 27 10:31:29 CDT 2007

That's fine, it just didn't match what I read in the documentation and I
didn't get how it worked... I guess I need to read more about bus agnostic
drivers...


"Steve Maillet (MVP)" <nospam@EntelechyConsulting.com> wrote in message
news:uhbckRRAIHA.4984@TK2MSFTNGP06.phx.gbl...
> >But in the registry entry (below from common.reg) for the net2280 I cant
> >find these values set anywhere, yet the driver code expects there to be
> >at least 3 windows ?
> the NET2280 is a PCI device, thus those entries are added by the PCI bus
> enumerator. Using the DDKReg_GetWindowInfo is the proper way to write a
> bus agnostic driver.
>
> - Steve Maillet
> http://www.EmbeddedFusion.com