Use common memory infrastructure and introduce device tree support