mips_cdmm_early_probe(9)
π mips_cdmm_early_probe π
okay so real talk bestie, this is mips_cdmm_early_probe(9) from the Kernel API Manual β and yes it's a kernel thing, but it's actually kind of a slay?? it's the "sneak a peek at the hardware before literally anything else is ready" function. iconic behaviour. let's get into it π«Ά
β¨ NAME β¨
mips_cdmm_early_probe β the bare-minimum little probe that goes looking for one specific device on CDMM π
πΈ SYNOPSIS πΈ
void __iomem * mips_cdmm_early_probe (unsigned int dev_type );
π¦ ARGUMENTS π¦
dev_typeβ the CDMM type code you're hunting for. that's it. that's the whole assignment π
π DESCRIPTION π
so basically you minimally configure the in-CPU Common Device Memory Map (CDMM) β like, the lightest possible setup, no overachieving β and then you go look for one specific device. that's the vibe. π
and why would you even do this? because it can be used to find a device very early in boot β for example to configure an early FDC console device. yeah. before everything. main character energy from the jump π₯
β οΈ okay important one, bestie: the caller must prevent migration to another CPU. how? either by disabling pre-emption, or by running from a pinned kernel thread. no cap, this part matters β do not skip it π
β RETURN β
you get back an MMIO pointer to device memory. cute! π
the caller can read the ACSR register to find more information about the device β stuff like the version number or the number of blocks π
and listen: it may return IOMEM_ERR_PTR(-errno) in case of error, so check with IS_ERR. literally always check. don't be out here trusting pointers blindly π
π§ SEE ALSO π§
- Kernel file
./drivers/bus/mips_cdmm.cβstruct mips_cdmm_work_dev(9) mips_cdmm_void_work(9)mips_cdmm_int_work(9)BUILD_PERCPU_HELPER(9)mips_cdmm_driver_register(9)mips_cdmm_driver_unregister(9)struct mips_cdmm_bus(9)mips_cdmm_get_bus(9)mips_cdmm_cur_base(9)mips_cdmm_phys_base(9)mips_cdmm_setup(9)mips_cdmm_release(9)mips_cdmm_bus_discover(9)BUILD_PERDEV_HELPER(9)mips_cdmm_cpu_down_prep(9)mips_cdmm_cpu_online(9)mips_cdmm_init(9)
like the whole friend group, fr fr π
and that's the page!! brought to you straight out of ./drivers/bus, dated October 2026 β so go forth, probe responsibly, and remember: check with IS_ERR or it's on you ππβ¨
π¦ 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