mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-30 10:49:28 +00:00
swiotlb: Add restricted DMA pool initialization
Add the initialization function to create restricted DMA pools from matching reserved-memory nodes. Regardless of swiotlb setting, the restricted DMA pool is preferred if available. The restricted DMA pools provide a basic level of protection against the DMA overwriting buffer contents at unexpected times. However, to protect against general data leakage and system memory corruption, the system needs to provide a way to lock down the memory access, e.g., MPU. Signed-off-by: Claire Chang <tientzu@chromium.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Tested-by: Stefano Stabellini <sstabellini@kernel.org> Tested-by: Will Deacon <will@kernel.org> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
This commit is contained in:
parent
f4111e39a5
commit
0b84e4f8b7
3 changed files with 92 additions and 1 deletions
|
@ -73,7 +73,8 @@ extern enum swiotlb_force swiotlb_force;
|
|||
* range check to see if the memory was in fact allocated by this
|
||||
* API.
|
||||
* @nslabs: The number of IO TLB blocks (in groups of 64) between @start and
|
||||
* @end. This is command line adjustable via setup_io_tlb_npages.
|
||||
* @end. For default swiotlb, this is command line adjustable via
|
||||
* setup_io_tlb_npages.
|
||||
* @used: The number of used IO TLB block.
|
||||
* @list: The free list describing the number of free entries available
|
||||
* from each index.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue