Discussion:
memory allocation during hw initialize in storport miniport
(too old to reply)
hitesh
2010-08-26 05:19:33 UTC
Permalink
hi,
as HW initialize routine runs @ DIRQ level it is not possible to
allocate memory.
what if i allocate memory in HwStorPassiveInitRoutine( )?
is it allowed to allocate memory?
i am trying to allocate in HwStorPassiveInitRoutine but system
crashes,
does anybody have any idea?
~hitesh
hitesh
2010-08-26 06:18:33 UTC
Permalink
Post by hitesh
hi,
allocate memory.
what if i allocate memory in HwStorPassiveInitRoutine( )?
is it allowed to allocate memory?
i am trying to allocate in HwStorPassiveInitRoutine but system
crashes,
does anybody have any idea?
~hitesh
one more starnge behavious i have seen,
i have allocated a memory using storportallocatepool () which will
give non paged pool.
if physically it is contiguous then if i call the function
StorPortGetPhysicalAddress ( ) should return length as total size of
allocated memory with physical address.
but what i found , it returns some 640 bytes as length everytime i
call the function to get the physical address. i make sure that memory
is contiguous by checking the input address to function increment by
return length.
what if i want to allocate memory in run time. i have used my all
memory whcih i allocated using StorportGetUncachedExtension( ).
~hitesh
eagersh
2010-08-26 16:51:04 UTC
Permalink
Post by hitesh
Post by hitesh
hi,
allocate memory.
what if i allocate memory in HwStorPassiveInitRoutine( )?
is it allowed to allocate memory?
i am trying to allocate in HwStorPassiveInitRoutine but system
crashes,
does anybody have any idea?
~hitesh
one more starnge behavious i have seen,
i have allocated a memory using storportallocatepool () which will
give non paged pool.
if physically it is contiguous then if i call the function
StorPortGetPhysicalAddress ( ) should return length as total size of
allocated memory with physical address.
but what i found , it returns some 640 bytes as length everytime i
call the function to get the physical address. i make sure that memory
is contiguous by checking the input address to function increment by
return length.
what if i want to allocate memory in run time. i have used my all
memory whcih i allocated using StorportGetUncachedExtension( ).
~hitesh
WDK documentation is not clear about return value. It does not say
implicitly it returns total mapped length. I would say it returns the
size of memory in the first mapped page. Usually a length in the first
element in MDL contains such value.

Igor Sharovar

eagersh
2010-08-26 16:45:23 UTC
Permalink
Post by hitesh
hi,
allocate memory.
what if i allocate memory in HwStorPassiveInitRoutine( )?
is it allowed to allocate memory?
i am trying to allocate in HwStorPassiveInitRoutine but system
crashes,
does anybody have any idea?
~hitesh
Which function do you use? StorPortAllocatePool should work fine.

Igor Sharovar
Loading...