ENUM RISCV_IOMMU_DC_FSC_ATP_MODES(9)
β¨ enum riscv_iommu_dc_fsc_atp_modes β¨
okay so bestie, welcome to the Kernel API Manual π β this little page is all about enum riscv_iommu_dc_fsc_atp_modes, aka First stage address translation/protection modes. yes it's a mouthful, no you don't have to say it out loud. π
πΈ NAME πΈ
enum riscv_iommu_dc_fsc_atp_modes β First stage address translation/protection modes π¦
β SYNOPSIS β
here's the whole squad, literally all of them, exactly as declared:
enum riscv_iommu_dc_fsc_atp_modes {
RISCV_IOMMU_DC_FSC_MODE_BARE ,
RISCV_IOMMU_DC_FSC_IOSATP_MODE_SV32 ,
RISCV_IOMMU_DC_FSC_IOSATP_MODE_SV39 ,
RISCV_IOMMU_DC_FSC_IOSATP_MODE_SV48 ,
RISCV_IOMMU_DC_FSC_IOSATP_MODE_SV57 ,
RISCV_IOMMU_DC_FSC_PDTP_MODE_PD8 ,
RISCV_IOMMU_DC_FSC_PDTP_MODE_PD17 ,
RISCV_IOMMU_DC_FSC_PDTP_MODE_PD20
};
π Constants π
okay let's meet the members, one by one, no skipping, we love a complete list π
RISCV_IOMMU_DC_FSC_MODE_BAREβ No translation/protection. the "vibes only, no rules" setting ποΈRISCV_IOMMU_DC_FSC_IOSATP_MODE_SV32β Sv32, whendc.tc.SXL == 1RISCV_IOMMU_DC_FSC_IOSATP_MODE_SV39β Sv39, whendc.tc.SXL == 0RISCV_IOMMU_DC_FSC_IOSATP_MODE_SV48β Sv48, whendc.tc.SXL == 0RISCV_IOMMU_DC_FSC_IOSATP_MODE_SV57β Sv57, whendc.tc.SXL == 0RISCV_IOMMU_DC_FSC_PDTP_MODE_PD8β 1lvl PDT, 8bit process ids πRISCV_IOMMU_DC_FSC_PDTP_MODE_PD17β 2lvl PDT, 17bit process ids πRISCV_IOMMU_DC_FSC_PDTP_MODE_PD20β 3lvl PDT, 20bit process ids π
π¦ Description π¦
so like, here's the tea β β FSC holds IOSATP when RISCV_IOMMU_DC_TC_PDTV is 0, and holds PDTP otherwise. iykyk.
IOSATP controls the first stage address translation (same as the satp register on the RISC-V MMU, bestie β literally the same energy). and PDTP holds the process directory table, which is used to select a first stage page table based on a process id β for devices that support multiple process ids πβ¨
π SEE ALSO π
go read these next, they're lowkey iconic:
- Kernel file
./drivers/iommu/riscv/iommu-bits.henum riscv_iommu_igs_settings(9),enum riscv_iommu_ddtp_modes(9),enum riscv_iommu_hpmevent_id(9),struct riscv_iommu_dc(9),enum riscv_iommu_dc_iohgatp_modes(9),struct riscv_iommu_pc(9),struct riscv_iommu_command(9),struct riscv_iommu_fq_record(9),enum riscv_iommu_fq_causes(9),enum riscv_iommu_fq_ttypes(9),struct riscv_iommu_pq_record(9),struct riscv_iommu_msipte(9)
and that's the whole page, bestie π«Ά this came from ./drivers/iommu/riscv, dated October 2026, and it's all about enum riscv_...sc_atp_modes(9) β slay, go forth and translate your first stage addresses responsibly πβ¨
π¦ 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