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

Function dmar_flush_write_bufs

freebsd/x86/iommu/intel_utils.c:474–491  ·  view source on GitHub ↗

* Flush the chipset write buffers. See 11.1 "Write Buffer Flushing" * in the architecture specification. */

Source from the content-addressed store, hash-verified

472 * in the architecture specification.
473 */
474int
475dmar_flush_write_bufs(struct dmar_unit *unit)
476{
477 int error;
478
479 DMAR_ASSERT_LOCKED(unit);
480
481 /*
482 * DMAR_GCMD_WBF is only valid when CAP_RWBF is reported.
483 */
484 KASSERT((unit->hw_cap & DMAR_CAP_RWBF) != 0,
485 ("dmar%d: no RWBF", unit->iommu.unit));
486
487 dmar_write4(unit, DMAR_GCMD_REG, unit->hw_gcmd | DMAR_GCMD_WBF);
488 DMAR_WAIT_UNTIL(((dmar_read4(unit, DMAR_GSTS_REG) & DMAR_GSTS_WBFS)
489 != 0));
490 return (error);
491}
492
493int
494dmar_enable_translation(struct dmar_unit *unit)

Callers 2

domain_get_idmap_pgtblFunction · 0.85
domain_map_bufFunction · 0.85

Calls 2

dmar_write4Function · 0.85
dmar_read4Function · 0.85

Tested by

no test coverage detected