arch/parisc/kernel/hardware.c

Source file repositories/reference/linux-study-clean/arch/parisc/kernel/hardware.c

File Facts

System
Linux kernel
Corpus path
arch/parisc/kernel/hardware.c
Extension
.c
Size
77470 bytes
Lines
1375
Domain
Architecture Layer
Bucket
arch/parisc
Inferred role
Architecture Layer: implementation source
Status
source implementation candidate

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

switch (id->sversion) {
				case 0x0D: return "MUX port";
				case 0x0E: return "RS-232 port";
			}
			break;
			
		case HPHW_MEMORY:
			return "Memory";
			
	}
	
	return "unknown device";
}


/* Interpret hversion (ret[0]) from PDC_MODEL(4)/PDC_MODEL_INFO(0) */
enum cpu_type __init
parisc_get_cpu_type(unsigned long hversion)
{
	struct hp_cpu_type_mask *ptr;
	unsigned short model = ((unsigned short) (hversion)) >> 4;

	for (ptr = hp_cpu_type_mask_list; 0 != ptr->mask; ptr++) {
		if (ptr->model == (model & ptr->mask))
			return ptr->cpu;
	}
	panic("could not identify CPU type\n");

	return pcx;	/* not reached: */
}

Annotation

Implementation Notes