mips_cdmm_early_probe(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 🧚

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