lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <456BC6D4.9080109@shaw.ca>
Date:	Mon, 27 Nov 2006 23:19:16 -0600
From:	Robert Hancock <hancockr@...w.ca>
To:	Jon Ringle <jringle@...tical.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: Reserving a fixed physical address page of RAM.

Jon Ringle wrote:
> Robert Hancock wrote:
>> Jon Ringle wrote:
>>> Hi,
>>>
>>> I need to reserve a page of memory at a specific area of RAM that will
>>> be used as a "shared memory" with another processor over PCI. How can I
>>> ensure that the this area of RAM gets reseved so that the Linux's memory
>>> management (kmalloc() and friends) don't use it?
>>>
>>> Some things that I've considered are iotable_init() and ioremap().
>>> However, I've seen these used for memory mapped IO devices which are
>>> outside of the RAM memory. Can I use them for reseving RAM too?
>>>
>>> I appreciate any advice in this regard.
>>
>> Sounds to me like dma_alloc_coherent is what you want..
>>
> It looks promising, however, I need to reserve a physical address area 
> that is well known (so that the code running on the other processor 
> knows where in PCI memory to write to). It appears that 
> dma_alloc_coherent returns the address that it allocated. Instead I need 
> something where I can tell it what physical address and range I want to 
> use.

I don't think this is possible in the general case, as there's no 
mechanism for moving things out of the way if they might be in use. Your 
best solution is likely to use dma_alloc_coherent and pass the bus 
address returned into the other processor to tell it where to write..

-- 
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@...pamshaw.ca
Home Page: http://www.roberthancock.com/


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ