amdgpu_ttm_a...mio_remap_bo(9)
π amdgpu_ttm_alloc_mmio_remap_bo β the Kernel API Manual, but make it make sense
okay so bestie, welcome to amdgpu_ttm_a...mio_remap_bo(9) β yes that's the real truncated title, no I did not do that, the manpage did. we're in the Kernel API Manual today and this function is lowkey a lil' one-job icon. let's get into it β¨
πΈ NAME
amdgpu_ttm_alloc_mmio_remap_bo β literally just "Allocate the singleton MMIO_REMAP BO". that's it. that's the whole assignment. one BO, allocated, singular, iconic. π
π¦ SYNOPSIS
int amdgpu_ttm_alloc_mmio_remap_bo (struct amdgpu_device *adev );
likeβ¦ that's the whole call. one argument. she's minimal. she's clean. she knows what she wants. π
π ARGUMENTS
adevβ the amdgpu device. that's your whole context bestie, everything you need to know lives in there. π«Ά
β¨ DESCRIPTION
so here's the tea β: this function allocates a global BO with backing AMDGPU_PL_MMIO_REMAP β but only when two conditions are both serving looks:
- the hardware actually exposes a remap base (that's
adev->rmmio_remap.bus_addr), and - the host
PAGE_SIZEis<=AMDGPU_GPU_PAGE_SIZE(4K).
both or nothing, no cap. π¦
and the way it makes the BO? it's created as a regular GEM object via amdgpu_bo_create. nothing weird, nothing cursed, just a normal GEM object doing normal GEM object things. π§
π RETURN
0β on success or an intentional skip (like, the feature isn't present / isn't supported β she chose peace, and that's still a win π)- negative errno β on allocation failure π (the BO did not eat, and we're all sad about it)
π SEE ALSO
the source of truth lives right here, bestie:
Kernel file ./drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
and the whole friend group, in order, no one left out:
amdgpu_evict_flags(9)amdgpu_ttm_map_buffer(9)amdgpu_ttm_copy_mem_to_mem(9)amdgpu_res_cpu_visible(9)amdgpu_ttm_domain_start(9)amdgpu_ttm_mmio_remap_alloc_sgt(9)amdgpu_ttm_tt_create(9)amdgpu_ttm_tt_get_userptr(9)amdgpu_ttm_tt_set_userptr(9)amdgpu_ttm_tt_pde_flags(9)amdgpu_ttm_tt_pte_flags(9)amdgpu_ttm_access_memory(9)amdgpu_ttm_training_reserve_vram_fini(9)amdgpu_ttm_free_mmio_remap_bo(9)amdgpu_ttm_enable_buffer_funcs(9)amdgpu_ttm_disable_buffer_funcs(9)amdgpu_ttm_clear_buffer(9)amdgpu_ttm_evict_resources(9)
fr fr, go read amdgpu_ttm.c if you want the full lore. this page is the sparknotes and the sparknotes are cute. π¦
okay that's the whole page!! huge thanks to the /drivers/gpu/drm/amd/amdgpu directory for hosting all this, and a very October 2026 coded shoutout to the amdgpu_ttm_a...mio_remap_bo(9) header+footer combo that got truncated in the middle and honestly? relatable. she's giving main character energy with a name too long for the terminal πππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms