mali: platform rewrite