Lines Matching full:sid

372 smmu_dump_ste(struct smmu_softc *sc, int sid)
382 i = sid >> STRTAB_SPLIT;
393 sid * (STRTAB_STE_DWORDS << 3));
437 int sid;
451 sid = evt[1];
456 if (smmu_quirks_check(dev, sid, event_id, input_addr)) {
467 device_printf(sc->dev, "SID %x, Input Address: %jx\n",
468 sid, input_addr);
473 smmu_dump_ste(sc, sid);
508 cmd[0] |= ((uint64_t)entry->cfgi.sid << CFGI_0_STE_SID_S);
523 cmd[0] |= ((uint64_t)entry->prefetch.sid << PREFETCH_0_SID_S);
612 smmu_sync_cd(struct smmu_softc *sc, int sid, int ssid, bool leaf)
617 cmd.cfgi.sid = sid;
674 smmu_invalidate_sid(struct smmu_softc *sc, uint32_t sid)
680 cmd.cfgi.sid = sid;
686 smmu_prefetch_sid(struct smmu_softc *sc, uint32_t sid)
691 cmd.prefetch.sid = sid;
697 * Init STE in bypass mode. Traffic is not translated for the sid.
700 smmu_init_ste_bypass(struct smmu_softc *sc, uint32_t sid, uint64_t *ste)
714 smmu_invalidate_sid(sc, sid);
717 smmu_invalidate_sid(sc, sid);
719 smmu_prefetch_sid(sc, sid);
723 * Enable Stage1 (S1) translation for the sid.
727 uint32_t sid, uint64_t *ste)
754 smmu_invalidate_sid(sc, sid);
760 smmu_invalidate_sid(sc, sid);
761 smmu_sync_cd(sc, sid, 0, true);
762 smmu_invalidate_sid(sc, sid);
764 /* The sid will be used soon most likely. */
765 smmu_prefetch_sid(sc, sid);
771 smmu_get_ste_addr(struct smmu_softc *sc, int sid)
780 l1_desc = &strtab->l1[sid >> STRTAB_SPLIT];
782 addr += (sid & ((1 << STRTAB_SPLIT) - 1)) * STRTAB_STE_DWORDS;
785 STRTAB_STE_DWORDS * 8 * sid);
792 smmu_init_ste(struct smmu_softc *sc, struct smmu_cd *cd, int sid, bool bypass)
796 addr = smmu_get_ste_addr(sc, sid);
799 smmu_init_ste_bypass(sc, sid, addr);
801 smmu_init_ste_s1(sc, cd, sid, addr);
809 smmu_deinit_ste(struct smmu_softc *sc, int sid)
813 ste = smmu_get_ste_addr(sc, sid);
816 smmu_invalidate_sid(sc, sid);
817 smmu_sync_cd(sc, sid, 0, true);
818 smmu_invalidate_sid(sc, sid);
993 smmu_init_l1_entry(struct smmu_softc *sc, int sid)
1003 l1_desc = &strtab->l1[sid >> STRTAB_SPLIT];
1025 i = sid >> STRTAB_SPLIT;
1039 smmu_deinit_l1_entry(struct smmu_softc *sc, int sid)
1048 i = sid >> STRTAB_SPLIT;
1053 l1_desc = &strtab->l1[sid >> STRTAB_SPLIT];
1465 device_printf(sc->dev, "SID bits %d\n", sc->sid_bits);
1778 smmu_init_ste(sc, domain->cd, (ctx->sid | i), ctx->bypass);
1830 u_int sid;
1842 err = smmu_pci_get_sid(ctx->dev, NULL, &sid);
1847 ctx->sid = sid;
1853 err = smmu_init_l1_entry(sc, ctx->sid);
1865 smmu_init_ste(sc, domain->cd, ctx->sid, ctx->bypass);
1885 smmu_deinit_ste(sc, ctx->sid);
1893 smmu_ctx_lookup_by_sid(device_t dev, u_int sid)
1906 if (ctx->sid == sid)
1976 ctx->sid = cells[0];