From 9f9bed7aa889f61ba165e3b479c22c86f4de8347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Mon, 2 Jan 2023 20:39:17 +0000 Subject: [PATCH] nvme_drv: move PRP list helper construction Since the 'Platform::Device' constructor will defer the creation until the content of the devices ROM is valid performing the PRP list helper creation afterwards should be done with valid IOMMU information. Issue #4715. --- repos/os/src/drivers/nvme/main.cc | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/repos/os/src/drivers/nvme/main.cc b/repos/os/src/drivers/nvme/main.cc index 3b3d55ac98..a44349065c 100644 --- a/repos/os/src/drivers/nvme/main.cc +++ b/repos/os/src/drivers/nvme/main.cc @@ -1374,19 +1374,6 @@ class Nvme::Driver : Genode::Noncopyable } catch (...) { } } - /********* - ** DMA ** - *********/ - - Constructible _dma_buffer { }; - - /* - * The PRP (Physical Region Pages) page is used to setup - * large requests. - */ - Platform::Dma_buffer _prp_list_helper { _platform, Nvme::PRP_DS_SIZE, - UNCACHED }; - /************** ** Requests ** **************/ @@ -1463,6 +1450,19 @@ class Nvme::Driver : Genode::Noncopyable Signal_context_capability _irq_sigh; Nvme::Controller _nvme_ctrlr { _env, _platform, _delayer, _irq_sigh }; + /********* + ** DMA ** + *********/ + + Constructible _dma_buffer { }; + + /* + * The PRP (Physical Region Pages) page is used to setup + * large requests. + */ + Platform::Dma_buffer _prp_list_helper { _platform, Nvme::PRP_DS_SIZE, + UNCACHED }; + /*********** ** Block ** ***********/