target-arm: convert check_ap to ap_to_rw_prot