Line 240... |
Line 240... |
}
|
}
|
}
|
}
|
if (start_set < end_set) PRINTF("\n");
|
if (start_set < end_set) PRINTF("\n");
|
}
|
}
|
|
|
No newline at end of file
|
No newline at end of file
|
|
/*---------------------------------------------------[ IMMU configuration ]---*/
|
|
void immu_enabled(union param_val val, void *dat)
|
|
{
|
|
setsprbits (SPR_UPR, SPR_UPR_IMP, val.int_val ? 1 : 0);
|
|
config.immu.enabled = val.int_val;
|
|
}
|
|
|
|
void immu_nsets(union param_val val, void *dat)
|
|
{
|
|
if (is_power2(val.int_val) && val.int_val <= 256)
|
|
config.immu.nsets = val.int_val;
|
|
else
|
|
CONFIG_ERROR("value of power of two and lower or equal than 256 expected.");
|
|
}
|
|
|
|
void immu_nways(union param_val val, void *dat)
|
|
{
|
|
if (val.int_val >= 1 && val.int_val <= 4)
|
|
config.immu.nways = val.int_val;
|
|
else
|
|
CONFIG_ERROR("value 1, 2, 3 or 4 expected.");
|
|
}
|
|
|
|
void immu_pagesize(union param_val val, void *dat)
|
|
{
|
|
if (is_power2(val.int_val))
|
|
config.immu.pagesize = val.int_val;
|
|
else
|
|
CONFIG_ERROR("value of power of two expected.");
|
|
}
|
|
|
|
void immu_entrysize(union param_val val, void *dat)
|
|
{
|
|
if (is_power2(val.int_val))
|
|
config.immu.entrysize = val.int_val;
|
|
else
|
|
CONFIG_ERROR("value of power of two expected.");
|
|
}
|
|
|
|
void immu_ustates(union param_val val, void *dat)
|
|
{
|
|
if (val.int_val >= 2 && val.int_val <= 4)
|
|
config.immu.ustates = val.int_val;
|
|
else
|
|
CONFIG_ERROR("invalid USTATE.");
|
|
}
|
|
|
|
void immu_missdelay(union param_val val, void *dat)
|
|
{
|
|
config.immu.missdelay = val.int_val;
|
|
}
|
|
|
|
void immu_hitdelay(union param_val val, void *dat)
|
|
{
|
|
config.immu.hitdelay = val.int_val;
|
|
}
|
|
|
|
void reg_immu_sec(void)
|
|
{
|
|
struct config_section *sec = reg_config_sec("immu", NULL, NULL);
|
|
|
|
reg_config_param(sec, "enabled", paramt_int, immu_enabled);
|
|
reg_config_param(sec, "nsets", paramt_int, immu_nsets);
|
|
reg_config_param(sec, "nways", paramt_int, immu_nways);
|
|
reg_config_param(sec, "pagesize", paramt_int, immu_pagesize);
|
|
reg_config_param(sec, "entrysize", paramt_int, immu_entrysize);
|
|
reg_config_param(sec, "ustates", paramt_int, immu_ustates);
|
|
reg_config_param(sec, "missdelay", paramt_int, immu_missdelay);
|
|
reg_config_param(sec, "hitdelay", paramt_int, immu_hitdelay);
|
|
}
|
|
|
No newline at end of file
|
No newline at end of file
|