mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 09:46:20 +00:00
parent
10f1616c28
commit
1f1d1af041
@ -122,6 +122,7 @@ class Lx::Pci_dev : public pci_dev, public Lx_kit::List<Pci_dev>::Element
|
||||
|
||||
/* setup resources */
|
||||
bool io = false;
|
||||
bool mem = false;
|
||||
for (int i = 0; i < Device::NUM_RESOURCES; i++) {
|
||||
Device::Resource res = _client.resource(i);
|
||||
if (res.type() == Device::Resource::INVALID)
|
||||
@ -141,11 +142,14 @@ class Lx::Pci_dev : public pci_dev, public Lx_kit::List<Pci_dev>::Element
|
||||
_io_port.session(res.base(), res.size(), _client.io_port(virt_bar));
|
||||
io = true;
|
||||
}
|
||||
if (res.type() == Device::Resource::MEMORY)
|
||||
mem = true;
|
||||
}
|
||||
|
||||
/* enable bus master and io bits */
|
||||
/* enable bus master, memory and io bits */
|
||||
uint16_t cmd = _client.config_read(CMD, Device::ACCESS_16BIT);
|
||||
cmd |= io ? 0x1 : 0;
|
||||
cmd |= mem ? 0x2 : 0;
|
||||
|
||||
/* enable bus master */
|
||||
cmd |= 0x4;
|
||||
|
@ -253,7 +253,7 @@ class Lx_kit::Malloc : public Lx::Malloc
|
||||
|
||||
if (msb > SLAB_STOP_LOG2) {
|
||||
Genode::error("slab too large ",
|
||||
1UL << msb, "reqested ", size, " cached ", (int)_cached);
|
||||
1UL << msb, " requested ", size, " cached ", (int)_cached);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user