Finding Lel0_synchronous_vector_64_long:
- Find string xref
"\"cpu_data_alloc() failed\n\""(in_ml_processor_register) - Next instructions should be
mov x19, 0; mov x0, x19; bl _cpu_data_init;. Themov x0, x19is also branched to after bzero call just to be sure. - Go to
_cpu_data_init. It'd initialize a lot of structure feilds to constants, and two of them would be set to ptrs. Right before the end,_exc_vectors_tablewould be referenced (after memset zeroing). _exc_vectors_tableis an array of 12 function ptrs.Lel0_synchronous_vector_64_longis 9th (if counting starts at 1).
To verify:
- It should theoretically end with 25c (at least on devices without KTRR) due to how exception handlers are aligned
- Compare to
Lel0_synchronous_vector_64_longin xnu sources. - In the end it loads
fleh_synchronousinto x1 and branches tofleh_dispatch64.fleh_dispatch64calls_sleh_synchronous._sleh_synchronousreferences a lot of stuff, but one of the first string references is\"ESR (0x%x) for instruction trapped from U32, but saved state is 64-bit.\".