WIP CSR support

Change-Id: I70253ebfc3b2b65453f60162bea2b2103d24e52c