Opened 13 years ago
Closed 10 years ago
#422 closed enhancement (fixed)
DMA allocator needs to support range and alignment specification
Reported by: | Martin Decky | Owned by: | Martin Decky |
---|---|---|---|
Priority: | major | Milestone: | 0.6.0 |
Component: | helenos/kernel/generic | Version: | mainline |
Keywords: | Cc: | ||
Blocker for: | Depends on: | ||
See also: |
Description
The DMA allocator for anonymous memory needs to support proper specification of memory range (e.g. for ISA hardware which is limited to physical addresses below 16 MB on ia32 and PCI hardware below 4 GB on amd64) and alignment (ISA hardware limited to 128k-aligned blocks).
Both the range and alignment specification can be provided by a single bit mask (showing 1s in bits of the physical address that the DMA allocator is allowed to set).
Change History (4)
comment:2 by , 13 years ago
As a short term solution, it should be possible to add an optional argument to frame_alloc() specifying the maximum address boundary.
comment:3 by , 13 years ago
Milestone: | 0.5.0 → 0.5.1 |
---|
comment:4 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
A new suitable frame allocator was merged in mainline,1956 and improved in further revisions up to mainline,1990.
I think the universal range allocator (kernel/generic/src/lib/ra.c) is especially suitable for the use by a prospective DMA allocator (in the end, it is modeled after Solaris' vmem allocator which is used exactly in this way). It is already possible to specify the alignment constraint. Adding the maximal address to the allocation API should not be difficult.
The range allocator should be made more integrated in the physical memory management subsystem and further enhanced, so that: