Fork us on GitHub Follow us on Facebook Follow us on Twitter

Opened 8 years ago

Closed 5 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:1 Changed 8 years ago by Jakub Jermář

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:

  • all physical memory is initially owned by the root physical memory arena
  • implement support for recursive importing of new ranges from the parent arena
  • one child arena will be used by our slab allocator, it will import memory from the root physical memory arena
  • one child arena will be used by the prospective DMA allocator, it will import memory from the root physical memory arena
  • if we could get rid of the current zone allocator in favor of this new setup, so much the better
Last edited 8 years ago by Jakub Jermář (previous) (diff)

comment:2 Changed 8 years ago by Jakub Jermář

As a short term solution, it should be possible to add an optional argument to frame_alloc() specifying the maximum address boundary.

comment:3 Changed 8 years ago by Jakub Jermář

Milestone: 0.5.00.5.1

comment:4 Changed 5 years ago by Jakub Jermář

Resolution: fixed
Status: newclosed

A new suitable frame allocator was merged in mainline,1956 and improved in further revisions up to mainline,1990.

Note: See TracTickets for help on using tickets.