Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTDEV

Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


How can you allocate shared memory <16M on W2000?

OSR_Community_UserOSR_Community_User Member Posts: 110,217
I have an NDIS4 MAC driver which uses 28-bit DMA. On NT 4.0
we can allocate share memory below 16M but not on Windows 2000.

NdisMAllocateMapRegisters( ) and NdisMAllocateSharedMemory( )
both succed but the physical address is above 16M.

Is there something we can do to free up some memory for our
adapter or force an allocation below 16M ?

Perry Smith
Compuware Corp.

Comments

  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    When you call NdisMAllocateMapRegisters(), I think you may want to set the
    Dma32BitAddresses to FALSE. I think this will insure that all physical
    memory allocations are below 16Mb.

    NDIS_STATUS
    NdisMAllocateMapRegisters(
    IN NDIS_HANDLE MiniportAdapterHandle,
    IN UINT DmaChannel,
    IN BOOLEAN Dma32BitAddresses,
    IN ULONG PhysicalMapRegistersNeeded,
    IN ULONG MaximumPhysicalMapping
    );

    ----- Original Message -----
    From: "Smith, Perry D" <[email protected]>
    To: "NT Developers Interest List" <[email protected]>
    Sent: Thursday, March 23, 2000 1:41 PM
    Subject: [ntdev] How can you allocate shared memory <16M on W2000?


    >
    >
    > I have an NDIS4 MAC driver which uses 28-bit DMA. On NT 4.0
    > we can allocate share memory below 16M but not on Windows 2000.
    >
    > NdisMAllocateMapRegisters( ) and NdisMAllocateSharedMemory( )
    > both succed but the physical address is above 16M.
    >
    > Is there something we can do to free up some memory for our
    > adapter or force an allocation below 16M ?
    >
    > Perry Smith
    > Compuware Corp.
    >
    >
    >
    > ---
    > You are currently subscribed to ntdev as: [email protected]
    > To unsubscribe send a blank email to $subst('Email.Unsub')
    >
    >
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    Yes, Dma32BitAddresses was set to FALSE. That's the
    problem, why are we getting an allocation above 16M
    when we requested below 16M?

    Is this a bug, or is there a way to force the allocation
    below 16M?

    Perry Smith
    Compuware Corp.

    -----Original Message-----
    From: Dominick Cafarelli [mailto:[email protected]]
    Sent: Thursday, March 23, 2000 10:20 PM
    To: NT Developers Interest List
    Subject: [ntdev] Re: How can you allocate shared memory <16M on W2000?


    When you call NdisMAllocateMapRegisters(), I think you may want to set the
    Dma32BitAddresses to FALSE. I think this will insure that all physical
    memory allocations are below 16Mb.

    NDIS_STATUS
    NdisMAllocateMapRegisters(
    IN NDIS_HANDLE MiniportAdapterHandle,
    IN UINT DmaChannel,
    IN BOOLEAN Dma32BitAddresses,
    IN ULONG PhysicalMapRegistersNeeded,
    IN ULONG MaximumPhysicalMapping
    );

    ----- Original Message -----
    From: "Smith, Perry D" <[email protected]>
    To: "NT Developers Interest List" <[email protected]>
    Sent: Thursday, March 23, 2000 1:41 PM
    Subject: [ntdev] How can you allocate shared memory <16M on W2000?


    >
    >
    > I have an NDIS4 MAC driver which uses 28-bit DMA. On NT 4.0
    > we can allocate share memory below 16M but not on Windows 2000.
    >
    > NdisMAllocateMapRegisters( ) and NdisMAllocateSharedMemory( )
    > both succed but the physical address is above 16M.
    >
    > Is there something we can do to free up some memory for our
    > adapter or force an allocation below 16M ?
    >
    > Perry Smith
    > Compuware Corp.
    >
    >
    >
    > ---
    > You are currently subscribed to ntdev as: [email protected]
    > To unsubscribe send a blank email to $subst('Email.Unsub')
    >
    >


    ---
    You are currently subscribed to ntdev as: [email protected]
    To unsubscribe send a blank email to $subst('Email.Unsub')
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Writing WDF Drivers 12 September 2022 Live, Online
Internals & Software Drivers 23 October 2022 Live, Online
Kernel Debugging 14 November 2022 Live, Online
Developing Minifilters 5 December 2022 Live, Online