cpu:cortex_common: add core_panic function