memory: add API for creating ROM/device regions