static uint32_t ecc_data_next_read;
static uint32_t ecc_data_next_write;
static boolean_t ecc_data_empty = TRUE; // next read == next write : empty or full?
-static boolean_t ecc_prefer_panic = TRUE;
static lck_grp_t *ecc_data_lock_group;
static lck_spin_t ecc_data_lock;
static uint32_t ecc_correction_count;
void
ecc_log_init()
{
- ecc_prefer_panic = !PE_reboot_on_panic();
ecc_data_lock_group = lck_grp_alloc_init("ecc-data", NULL);
lck_spin_init(&ecc_data_lock, ecc_data_lock_group, NULL);
OSMemoryBarrier();
}
-boolean_t
-ecc_log_prefer_panic(void)
-{
- OSMemoryBarrier();
- return ecc_prefer_panic;
-}
-
uint32_t
ecc_log_get_correction_count()
{