diff --git a/repos/os/src/drivers/platform/spec/x86/device_pd.cc b/repos/os/src/drivers/platform/spec/x86/device_pd.cc index 924f59d14..0a12f787c 100644 --- a/repos/os/src/drivers/platform/spec/x86/device_pd.cc +++ b/repos/os/src/drivers/platform/spec/x86/device_pd.cc @@ -84,8 +84,8 @@ void Platform::Device_pd::assign_pci(Genode::Io_mem_dataspace_capability const i { using Genode::print; using Genode::Hex; - print(out, Hex(v >> 8, Hex::Prefix::OMIT_PREFIX), ":", - Hex((v >> 3) & 0x1f, Hex::Prefix::OMIT_PREFIX), ".", + print(out, Hex((uint8_t)(v >> 8), Hex::Prefix::OMIT_PREFIX, Hex::PAD), ":", + Hex((uint8_t)((v >> 3) & 0x1f), Hex::Prefix::OMIT_PREFIX, Hex::PAD), ".", Hex(v & 0x7, Hex::Prefix::OMIT_PREFIX)); } }; diff --git a/repos/os/src/drivers/platform/spec/x86/pci_session_component.h b/repos/os/src/drivers/platform/spec/x86/pci_session_component.h index 6e7ffd4ac..32a1950dd 100644 --- a/repos/os/src/drivers/platform/spec/x86/pci_session_component.h +++ b/repos/os/src/drivers/platform/spec/x86/pci_session_component.h @@ -777,13 +777,14 @@ class Platform::Session_component : public Genode::Rpc_object if (base_ecam + base_offset != device->config_space()) throw 1; - _device_pd.assign_pci(_pciconf.cap(), base_offset, device->config().bdf()); - for (Rmrr *r = Rmrr::list()->first(); r; r = r->next()) { Io_mem_dataspace_capability rmrr_cap = r->match(_env, device->config()); if (rmrr_cap.valid()) _device_pd.attach_dma_mem(rmrr_cap); } + + _device_pd.assign_pci(_pciconf.cap(), base_offset, device->config().bdf()); + } catch (...) { Genode::error("assignment to device pd or of RMRR region failed"); }