Subject: printing out the PRID in cpu_identify
To: None <port-mips@netbsd.org>
From: Chris G. Demetriou <cgd@sibyte.com>
List: port-mips
Date: 06/13/2000 10:19:01
What do people think of doing something like the patch below, at least
temporarily.  I'd like to start collecting more complete data on the
PRIDs various cpus report (esp. the 16 reserved bits, to make sure
they're 0).


cgd
===================================================================
Index: mips_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/mips/mips/mips_machdep.c,v
retrieving revision 1.88
diff -c -r1.88 mips_machdep.c
*** mips_machdep.c	2000/06/09 06:07:02	1.88
--- mips_machdep.c	2000/06/13 17:17:29
***************
*** 421,427 ****
  #endif /* MIPS3 */
  
  	default:
! 		printf("CPU type (%d) not supported\n", cpu_id.cpu.cp_imp);
  		cpu_reboot(RB_HALT, NULL);
  	}
  
--- 421,427 ----
  #endif /* MIPS3 */
  
  	default:
! 		printf("CPU type (0x%x) not supported\n", cpu_id.cpuprid);
  		cpu_reboot(RB_HALT, NULL);
  	}
  
***************
*** 544,552 ****
  		fpuname = "built-in FPU";
  
  	if (cpuname != NULL)
! 		printf(cpuname);
  	else
! 		printf("unknown CPU type (0x%x)", cpu_id.cpu.cp_imp);
  	printf(" Rev. %d.%d", cpu_id.cpu.cp_majrev, cpu_id.cpu.cp_minrev);
  
  	if (fpuname != NULL)
--- 544,552 ----
  		fpuname = "built-in FPU";
  
  	if (cpuname != NULL)
! 		printf("%s (0x%x)", cpuname, cpu_id.cpuprid);
  	else
! 		printf("unknown CPU type (0x%x)", cpu_id.cpuprid);
  	printf(" Rev. %d.%d", cpu_id.cpu.cp_majrev, cpu_id.cpu.cp_minrev);
  
  	if (fpuname != NULL)