diff --git a/repos/base-hw/src/core/include/platform_pd.h b/repos/base-hw/src/core/include/platform_pd.h index 3659e21b7..3966a3a1e 100644 --- a/repos/base-hw/src/core/include/platform_pd.h +++ b/repos/base-hw/src/core/include/platform_pd.h @@ -89,6 +89,8 @@ class Hw::Address_space : public Genode::Address_space */ Address_space(Kernel::Pd* pd); + ~Address_space(); + /** * Insert memory mapping into translation table of the address space * @@ -170,8 +172,6 @@ class Genode::Platform_pd : public Hw::Address_space, */ Platform_pd(Allocator * md_alloc, char const *label); - ~Platform_pd(); - /** * Bind thread 't' to protection domain * diff --git a/repos/base-hw/src/core/platform_pd.cc b/repos/base-hw/src/core/platform_pd.cc index 14ff56978..f5360b1a0 100644 --- a/repos/base-hw/src/core/platform_pd.cc +++ b/repos/base-hw/src/core/platform_pd.cc @@ -96,6 +96,14 @@ Hw::Address_space::Address_space(Kernel::Pd * pd) } +Hw::Address_space::~Address_space() +{ + flush(platform()->vm_start(), platform()->vm_size()); + destroy(_cma(), _pslab); + destroy(_cma(), _tt); +} + + /************************************* ** Capability_space implementation ** *************************************/ @@ -161,14 +169,6 @@ Platform_pd::Platform_pd(Allocator * md_alloc, char const *label) } -Platform_pd::~Platform_pd() -{ - flush(platform()->vm_start(), platform()->vm_size()); - - /* TODO: destroy page slab and translation table!!! */ -} - - /************************************* ** Core_platform_pd implementation ** *************************************/