cpu.c revision 1.1
11.1Swdk/* $NetBSD: cpu.c,v 1.1 2000/08/12 22:58:52 wdk Exp $ */ 21.1Swdk 31.1Swdk/* 41.1Swdk * Copyright (c) 1994, 1995 Carnegie-Mellon University. 51.1Swdk * All rights reserved. 61.1Swdk * 71.1Swdk * Author: Chris G. Demetriou 81.1Swdk * 91.1Swdk * Permission to use, copy, modify and distribute this software and 101.1Swdk * its documentation is hereby granted, provided that both the copyright 111.1Swdk * notice and this permission notice appear in all copies of the 121.1Swdk * software, derivative works or modified versions, and any portions 131.1Swdk * thereof, and that both notices appear in supporting documentation. 141.1Swdk * 151.1Swdk * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 161.1Swdk * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 171.1Swdk * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 181.1Swdk * 191.1Swdk * Carnegie Mellon requests users of this software to return to 201.1Swdk * 211.1Swdk * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 221.1Swdk * School of Computer Science 231.1Swdk * Carnegie Mellon University 241.1Swdk * Pittsburgh PA 15213-3890 251.1Swdk * 261.1Swdk * any improvements or extensions that they make and grant Carnegie the 271.1Swdk * rights to redistribute these changes. 281.1Swdk */ 291.1Swdk 301.1Swdk#include <sys/param.h> 311.1Swdk#include <sys/device.h> 321.1Swdk#include <sys/systm.h> 331.1Swdk 341.1Swdk#include <machine/cpu.h> 351.1Swdk#include <machine/autoconf.h> 361.1Swdk 371.1Swdk/* Definition of the driver for autoconfig. */ 381.1Swdkstatic int cpumatch(struct device *, struct cfdata *, void *); 391.1Swdkstatic void cpuattach(struct device *, struct device *, void *); 401.1Swdk 411.1Swdkstruct cfattach cpu_ca = { 421.1Swdk sizeof(struct device), cpumatch, cpuattach 431.1Swdk}; 441.1Swdk 451.1Swdkextern struct cfdriver cpu_cd; 461.1Swdk 471.1Swdkextern void cpu_identify __P((void)); 481.1Swdk 491.1Swdkstatic int 501.1Swdkcpumatch(parent, cfdata, aux) 511.1Swdk struct device *parent; 521.1Swdk struct cfdata *cfdata; 531.1Swdk void *aux; 541.1Swdk{ 551.1Swdk struct confargs *ca = aux; 561.1Swdk 571.1Swdk /* make sure that we're looking for a CPU. */ 581.1Swdk if (strcmp(ca->ca_name, cpu_cd.cd_name) != 0) { 591.1Swdk return 0; 601.1Swdk } 611.1Swdk return 1; 621.1Swdk} 631.1Swdk 641.1Swdkstatic void 651.1Swdkcpuattach(parent, dev, aux) 661.1Swdk struct device *parent; 671.1Swdk struct device *dev; 681.1Swdk void *aux; 691.1Swdk{ 701.1Swdk 711.1Swdk printf(": "); 721.1Swdk 731.1Swdk cpu_identify(); 741.1Swdk} 75