From 1018dbc89a2f1cdd8d05149428b91514918d9ea5 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Thu, 24 Nov 2016 10:01:39 +0100 Subject: [PATCH] dde_ipxe: handle platform session memory requests Issue #1039 --- repos/dde_ipxe/src/lib/dde_ipxe/dde_support.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/repos/dde_ipxe/src/lib/dde_ipxe/dde_support.cc b/repos/dde_ipxe/src/lib/dde_ipxe/dde_support.cc index c2c30c4533..1de36cf566 100644 --- a/repos/dde_ipxe/src/lib/dde_ipxe/dde_support.cc +++ b/repos/dde_ipxe/src/lib/dde_ipxe/dde_support.cc @@ -175,7 +175,7 @@ struct Pci_driver Genode::size_t donate = 4096; Genode::retry( - [&] () { client.config_write(devfn, val, _access_size(val)); } , + [&] () { client.config_write(devfn, val, _access_size(val)); }, [&] () { _pci.upgrade_ram(donate); donate *= 2; @@ -184,7 +184,10 @@ struct Pci_driver int first_device(int *bus, int *dev, int *fun) { - _cap = _pci.first_device(CLASS_NETWORK, CLASS_MASK); + _cap = Genode::retry( + [&] () { return _pci.first_device(CLASS_NETWORK, CLASS_MASK); }, + [&] () { _pci.upgrade_ram(4096); }); + if (!_cap.valid()) return -1; @@ -197,8 +200,10 @@ struct Pci_driver int result = -1; _last_cap = _cap; + _cap = Genode::retry( + [&] () { return _pci.next_device(_cap, CLASS_NETWORK, CLASS_MASK); }, + [&] () { _pci.upgrade_ram(4096); }); - _cap = _pci.next_device(_cap, CLASS_NETWORK, CLASS_MASK); if (_cap.valid()) { _bus_address(bus, dev, fun); result = 0;