mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 05:37:54 +00:00
platform_drv: add RMRR region before assign pci
This commit is contained in:
parent
82075a340d
commit
ed01c57677
@ -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));
|
||||
}
|
||||
};
|
||||
|
@ -777,13 +777,14 @@ class Platform::Session_component : public Genode::Rpc_object<Session>
|
||||
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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user