mali: platform rewrite 2