MCPcopy Create free account
hub / github.com/F-Stack/f-stack / dmar_enable_translation

Function dmar_enable_translation

freebsd/x86/iommu/intel_utils.c:493–504  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

491}
492
493int
494dmar_enable_translation(struct dmar_unit *unit)
495{
496 int error;
497
498 DMAR_ASSERT_LOCKED(unit);
499 unit->hw_gcmd |= DMAR_GCMD_TE;
500 dmar_write4(unit, DMAR_GCMD_REG, unit->hw_gcmd);
501 DMAR_WAIT_UNTIL(((dmar_read4(unit, DMAR_GSTS_REG) & DMAR_GSTS_TES)
502 != 0));
503 return (error);
504}
505
506int
507dmar_disable_translation(struct dmar_unit *unit)

Callers 3

dmar_get_ctx_for_dev1Function · 0.85
dmar_attachFunction · 0.85

Calls 2

dmar_write4Function · 0.85
dmar_read4Function · 0.85

Tested by

no test coverage detected