Expand description
Calculate DMA hint value if not provided by host.
Constantsยง
- LOOKUP_
TABLE_ ๐DEBUG - DEV/TEST ONLY variant of the lookup table above. Since the IGVM manifest specifies additional VTL2 memory for dev (well above what is required for release configs), allow the heuristics to still kick in.
- LOOKUP_
TABLE_ ๐RELEASE - Lookup table for VTL2 DMA hint calculation. This table is used to retrofit dedicated DMA memory for existing configurations known at the time of writing. Dedicated DMA memory is required for devices that survive OpenHCL servicing operations (for example, NVMe and MANA devices). Those devices express their need as the โpersistent memoryโ requirement when they create a DMA client. Since the amount of dedicated DMA memory cannot be changed at runtime, the amount of memory set aside must account for the maximum expected usage.
- MAX_
DMA_ ๐HINT_ MEM_ SIZE - Maximum allowed memory size for DMA hint calculation (1 TiB).
- ONE_MB ๐
- PAGES_
PER_ ๐2MB - Number of 4K pages in 2MiB.
- RATIO ๐
Functionsยง
- pick_
private_ pool_ size - round_
up_ ๐to_ 2mb - Round up to next 2MiB.
- vtl2_
calculate_ dma_ hint - Returns calculated DMA hint value, in 4k pages.