spi_nor_parse_smpt(9)
π spi_nor_parse_smpt(9) β the Kernel API Manual glow-up π
okay so bestie, welcome to spi_nor_parse_smpt(9) from the Kernel API Manual (section 9, obvs) β this is the little function that reads the Sector Map Parameter Table and, like, actually tells you where stuff lives in your flash chip. no cap, it's a whole vibe. β¨
πΈ NAME πΈ
spi_nor_parse_smpt β parse Sector Map Parameter Table πΊοΈ
β¨ SYNOPSIS β¨
int spi_nor_parse_smpt (struct spi_nor *nor , const struct
sfdp_parameter_header *smpt_header );
like, yes, the line break is real, that's literally how it's written, don't @ me π«Ά
π ARGUMENTS π
norβ pointer to astruct spi_norπ like, the whole flash device energysmpt_headerβ the sector map parameter table header π
π¦ DESCRIPTION π¦
so here's the tea π: this table is optional β it doesn't have to be there, it's not required, it's giving "if you know you know" β but when it is available? we parse it. periodt.
and what do we get from parsing it?? two iconic things:
- we identify the location and the size of the sectors within the main data array of the flash memory device π
- we identify which Erase Types are supported by each sector π₯
that's it, that's the whole slay. it's a small function with main character energy. π
π RETURN π
0on success β we ate, no crumbs π½οΈ-errnootherwise β not me crying in errno π
β SEE ALSO β
okay this list is LONG but every single one of these is a baddie, we're not skipping a single one, i would never π
Kernel file ./drivers/mtd/spi-nor/sfdp.c β
spi_nor_read_raw(9)spi_nor_read_sfdp(9)spi_nor_read_sfdp_dma_unsafe(9)spi_nor_set_erase_settings_from_bfpt(9)spi_nor_map_cmp_erase_type(9)spi_nor_sort_erase_mask(9)spi_nor_regions_sort_erase_types(9)spi_nor_parse_bfpt(9)spi_nor_smpt_addr_nbytes(9)spi_nor_smpt_read_dummy(9)spi_nor_get_map_in_use(9)spi_nor_region_check_overlay(9)spi_nor_init_non_uniform_erase_map(9)spi_nor_parse_4bait(9)spi_nor_parse_profile1(9)spi_nor_parse_sccr(9)spi_nor_parse_sccr_mc(9)spi_nor_post_sfdp_fixups(9)spi_nor_check_sfdp_signature(9)spi_nor_parse_sfdp(9)
π tiny reminder bestie: this table is optional, so if it's missing that's not a bug, that's just the flash chip choosing not to share. respect its boundaries. π«Ά
and that's the page!! sourced from ./drivers/mtd/spi-nor, dated October 2026, manual name Kernel API Manual β mwah, go read some SFDP specs, ily, bye ππ§ββοΈ
π¦ 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