Allocating Page Aligned Memory in User Space

From: LegoGT (legoburns_at_yahoo.com)
Date: 08/21/03

  • Next message: Kasper Dupont: "Re: Allocating Page Aligned Memory in User Space"
    Date: 21 Aug 2003 07:36:32 -0700
    
    

    I have a program that I'm writing to interface with a driver that
    controls an IO board. In order to take the data from the driver and
    DMA it to another IO device (IDE drive) I need to have the data DMA
    page aligned. So, I'm pretty sure it can be a 32-bit address, but the
    data needs to be on a 64k boundary along with the PRD (Physical Region
    Descriptor) entries which will hold pointers to these data chunks.

    Does anyone know how to allocate memory like this without having to
    write a (kernel level) driver? Are there certain files or steps I
    need to look at in order to have this kernel functionality? (I know
    that it's possible using kmalloc, but I'm not quite sure how to use
    that from a program -- even if it's run as root.)

    Thanks,
    Greg


  • Next message: Kasper Dupont: "Re: Allocating Page Aligned Memory in User Space"

    Relevant Pages

    • Re: Device drivers in C#.NET
      ... CLR - maybe a special kernel level CLR. ... driver development. ...
      (microsoft.public.dotnet.general)
    • Re: A design problem related to drivers and/or application (single instance)
      ... Depending on what you are doing, you can either create a user-mode DLL (with ... The driver will either need to use calls such as ZwCreateFile and ... kernel, where a single mistake will can wipe out the system. ... I have to open another kernel level driver (lets name ...
      (microsoft.public.development.device.drivers)
    • Re: open source windows
      ... >> different at the kernel level that it's hard to imagine a way to run ... >> drivers on Linux. ... > Windows(forget about driver) but I am quite familiar with Linux ... machine running Linux-2.4.20. ...
      (comp.os.linux.development.system)
    • A design problem related to drivers and/or application (single instance)
      ... I am building a driver which is to be used by different ... instance of A which will be accessed by all the applications using it and ... I have to open another kernel level driver (lets name ... If its not possible for me to develop A as a user-mode driver then what ...
      (microsoft.public.development.device.drivers)
    • Re: Open Source Leaving Microsoft Sitting on the Fence? Very Long.
      ... >>design of automobile control systems. ... > etc. is the responsibility of the driver, and I've rented vehicles in many ... > transmission than the car I rent in Phoenix or Orlando, ... > familiarize themself with the location of such controls and their operation, ...
      (comp.os.linux.misc)