platform_drv: move IOMMU domain destruction

Destruction of IOMMU domain should happen after the PCI device was
disabled in order to prevent faulty DMA transactions.

genodelabs/genode#5002
This commit is contained in:
Johannes Schlatow 2023-10-04 16:46:54 +02:00
parent d7b9cd0654
commit ae7e461452

View File

@ -436,12 +436,12 @@ Session_component::Session_component(Env & env,
Session_component::~Session_component()
{
_domain_registry.for_each([&] (Io_mmu_domain & wrapper) {
destroy(heap(), &wrapper); });
_device_registry.for_each([&] (Device_component & dc) {
_release_device(dc); });
_domain_registry.for_each([&] (Io_mmu_domain & wrapper) {
destroy(heap(), &wrapper); });
/* free up dma buffers */
_dma_allocator.buffer_registry().for_each([&] (Dma_buffer & buf) {
_free_dma_buffer(buf); });