- /* This should be initialized by the time we get here */
- assert(panic_info->eph_panic_log_offset != 0);
+ /*
+ * This should be initialized by the time we get here, but
+ * if it is not, asserting about it will be of no use (it will
+ * come right back to here), so just loop right here and now.
+ * This prevents early-boot panics from becoming recursive and
+ * thus makes them easier to debug. If you attached to a device
+ * and see your PC here, look down a few frames to see your
+ * early-boot panic there.
+ */
+ while (!panic_info || panic_info->eph_panic_log_offset == 0) {
+ ;
+ }