Changeset View
Changeset View
Standalone View
Standalone View
head/sys/mips/mips/cpu.c
Show First 20 Lines • Show All 178 Lines • ▼ Show 20 Lines | #endif | ||||
cfg2 = 0; | cfg2 = 0; | ||||
cfg3 = 0; | cfg3 = 0; | ||||
if (cfg1 & MIPS_CONFIG1_M) { | if (cfg1 & MIPS_CONFIG1_M) { | ||||
cfg2 = mips_rd_config2(); | cfg2 = mips_rd_config2(); | ||||
if (cfg2 & MIPS_CONFIG2_M) | if (cfg2 & MIPS_CONFIG2_M) | ||||
cfg3 = mips_rd_config3(); | cfg3 = mips_rd_config3(); | ||||
} | } | ||||
/* Save FP implementation revision if FP is present. */ | |||||
if (cfg1 & MIPS_CONFIG1_FP) | |||||
cpuinfo->fpu_id = MipsFPID(); | |||||
/* Check to see if UserLocal register is implemented. */ | /* Check to see if UserLocal register is implemented. */ | ||||
if (cfg3 & MIPS_CONFIG3_ULR) { | if (cfg3 & MIPS_CONFIG3_ULR) { | ||||
/* UserLocal register is implemented, enable it. */ | /* UserLocal register is implemented, enable it. */ | ||||
cpuinfo->userlocal_reg = true; | cpuinfo->userlocal_reg = true; | ||||
tmp = mips_rd_hwrena(); | tmp = mips_rd_hwrena(); | ||||
mips_wr_hwrena(tmp | MIPS_HWRENA_UL); | mips_wr_hwrena(tmp | MIPS_HWRENA_UL); | ||||
} else { | } else { | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 273 Lines • ▼ Show 20 Lines | #endif | ||||
cfg0 = mips_rd_config(); | cfg0 = mips_rd_config(); | ||||
/* If config register selection 1 does not exist, exit. */ | /* If config register selection 1 does not exist, exit. */ | ||||
if (!(cfg0 & MIPS_CONFIG_CM)) | if (!(cfg0 & MIPS_CONFIG_CM)) | ||||
return; | return; | ||||
cfg1 = mips_rd_config1(); | cfg1 = mips_rd_config1(); | ||||
printf(" Config1=0x%b\n", cfg1, | printf(" Config1=0x%b\n", cfg1, | ||||
"\20\7COP2\6MDMX\5PerfCount\4WatchRegs\3MIPS16\2EJTAG\1FPU"); | "\20\7COP2\6MDMX\5PerfCount\4WatchRegs\3MIPS16\2EJTAG\1FPU"); | ||||
if (cpuinfo.fpu_id != 0) | |||||
printf(" FPU ID=0x%b\n", cpuinfo.fpu_id, | |||||
"\020" | |||||
"\020S" | |||||
"\021D" | |||||
"\022PS" | |||||
"\0233D" | |||||
"\024W" | |||||
"\025L" | |||||
"\026F64" | |||||
"\0272008" | |||||
"\034UFRP"); | |||||
/* If config register selection 2 does not exist, exit. */ | /* If config register selection 2 does not exist, exit. */ | ||||
if (!(cfg1 & MIPS_CONFIG_CM)) | if (!(cfg1 & MIPS_CONFIG_CM)) | ||||
return; | return; | ||||
cfg2 = mips_rd_config2(); | cfg2 = mips_rd_config2(); | ||||
/* | /* | ||||
* Config2 contains no useful information other then Config3 | * Config2 contains no useful information other then Config3 | ||||
* existence flag | * existence flag | ||||
▲ Show 20 Lines • Show All 136 Lines • Show Last 20 Lines |