1.1 --- a/libexec/lib/src/memory_area.cc Fri Mar 24 16:14:44 2023 +0100
1.2 +++ b/libexec/lib/src/memory_area.cc Sat Mar 25 18:45:42 2023 +0100
1.3 @@ -50,8 +50,13 @@
1.4
1.5 /* In general, a region supports a memory access within its bounds. */
1.6
1.7 -long MemoryArea::find(address_t addr, MemoryArea **area)
1.8 +long MemoryArea::find(address_t addr, MemoryArea **area, MemoryArea **parent)
1.9 {
1.10 + /* The parent is merely propagated through this method, but is present for
1.11 + conformance to the generic method signature. */
1.12 +
1.13 + (void) parent;
1.14 +
1.15 if ((addr >= _start) && (addr < _end))
1.16 {
1.17 *area = this;
1.18 @@ -82,9 +87,10 @@
1.19
1.20 /* A reserved area does not support any memory access. */
1.21
1.22 -long ReservedMemoryArea::find(address_t addr, MemoryArea **area)
1.23 +long ReservedMemoryArea::find(address_t addr, MemoryArea **area,
1.24 + MemoryArea **parent)
1.25 {
1.26 - (void) addr; (void) area;
1.27 + (void) addr; (void) area; (void) parent;
1.28 return -L4_ENOMEM;
1.29 }
1.30
1.31 @@ -145,7 +151,8 @@
1.32
1.33 /* Find an region able to support a memory access. */
1.34
1.35 -long AvailableMemoryArea::find(address_t addr, MemoryArea **area)
1.36 +long AvailableMemoryArea::find(address_t addr, MemoryArea **area,
1.37 + MemoryArea **parent)
1.38 {
1.39 MemoryAreaMap::iterator it = _areas.upper_bound(addr);
1.40
1.41 @@ -160,8 +167,10 @@
1.42
1.43 MemoryArea *r = it->second;
1.44
1.45 + *parent = this;
1.46 +
1.47 if (r->supports(addr))
1.48 - return r->find(addr, area);
1.49 + return r->find(addr, area, parent);
1.50 }
1.51
1.52 /* Otherwise, no area within this area supports the address. */