__imr_remove_range(9)
π __imr_remove_range(9) π
okay so bestie, welcome to the Kernel API Manual β¨ β this is the page for __imr_remove_range, and yes it's giving "low-level x86 Quark energy" and we're gonna get through it together π«Ά
πΈ NAME πΈ
__imr_remove_range β delete an Isolated Memory Region. that's it, that's the whole vibe. bye IMR ππ
β¨ SYNOPSIS β¨
int __imr_remove_range (int reg , phys_addr_t base , size_t size );
like, that's the whole call. three args, one int coming back at you π
π¦ ARGUMENTS π¦
regβ the imr index to remove. the main character of this call ngl πbaseβ the physical base address of the region, and it has to be aligned to 1 KiB. not negotiable, she's picky πsizeβ the physical size of the region in bytes, also aligned to 1 KiB. same energy, same rule β
π DESCRIPTION π
so here's the tea β: this function lets you delete an IMR by its index β that's the reg param β or by an address range, which is what base and size are for.
and the way it works is honestly iconic: if you specify an index on its own, the base and size parameters are ignored. literally ignored. not even looked at. π
check it:
imr_remove_range(0, base, size);
that one deletes the IMR at index 0 β base/size ignored, periodt π
imr_remove_range(-1, base, size);
and that one deletes the IMR from base to base+size. see how the index being -1 flips it over to range mode? iykyk π₯
π RETURN π
here's the vibe check on what comes back at you:
-EINVALβ invalid range, or an out of range id. bestie no π-ENODEVβregis valid but no IMR exists, or it's locked. locked!! she's unavailable π0β success, we ate, everything slayed β¨π
π SEE ALSO π
kernel file ./arch/x86/platform/intel-quark/imr.c β go read her, she's long but worth it ππ
and the whole friend group:
imr_is_enabled(9)imr_read(9)imr_write(9)imr_dbgfs_state_show(9)imr_debugfs_register(9)imr_check_params(9)imr_raw_size(9)imr_address_overlap(9)imr_add_range(9)imr_remove_range(9)imr_clear(9)imr_fixup_memmap(9)imr_init(9)
ok that's the page!! remember: index-only means base and size get ghosted, -1 means range mode, and 1 KiB alignment is not a suggestion π«Ά
mwah π this has been your girl signing off β brought to you by the source path ./arch/x86/platform/intel-quark, dated October 2026. catch you in the next manpage, bestie π§ββοΈβ¨
π¦ 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