cpufunc.c (242b24828472137ec4411826b86e753d49bd2c39) cpufunc.c (59249a516a69e3a4055393f0975cdd8a848f5ce8)
1/* $NetBSD: cpufunc.c,v 1.65 2003/11/05 12:53:15 scw Exp $ */
2
3/*-
4 * arm9 support code Copyright (C) 2001 ARM Ltd
5 * Copyright (c) 1997 Mark Brinicombe.
6 * Copyright (c) 1997 Causality Limited
7 * All rights reserved.
8 *

--- 471 unchanged lines hidden (view full) ---

480
481/* Additional cache information local to this file. Log2 of some of the
482 above numbers. */
483static int arm_dcache_l2_nsets;
484static int arm_dcache_l2_assoc;
485static int arm_dcache_l2_linesize;
486
487static void
1/* $NetBSD: cpufunc.c,v 1.65 2003/11/05 12:53:15 scw Exp $ */
2
3/*-
4 * arm9 support code Copyright (C) 2001 ARM Ltd
5 * Copyright (c) 1997 Mark Brinicombe.
6 * Copyright (c) 1997 Causality Limited
7 * All rights reserved.
8 *

--- 471 unchanged lines hidden (view full) ---

480
481/* Additional cache information local to this file. Log2 of some of the
482 above numbers. */
483static int arm_dcache_l2_nsets;
484static int arm_dcache_l2_assoc;
485static int arm_dcache_l2_linesize;
486
487static void
488get_cachetype_cp15()
488get_cachetype_cp15(void)
489{
490 u_int ctype, isize, dsize, cpuid;
491 u_int clevel, csize, i, sel;
492 u_int multiplier;
493 u_char type;
494
495 __asm __volatile("mrc p15, 0, %0, c0, c0, 1"
496 : "=r" (ctype));

--- 98 unchanged lines hidden (view full) ---

595}
596#endif /* ARM9 || XSCALE */
597
598/*
599 * Cannot panic here as we may not have a console yet ...
600 */
601
602int
489{
490 u_int ctype, isize, dsize, cpuid;
491 u_int clevel, csize, i, sel;
492 u_int multiplier;
493 u_char type;
494
495 __asm __volatile("mrc p15, 0, %0, c0, c0, 1"
496 : "=r" (ctype));

--- 98 unchanged lines hidden (view full) ---

595}
596#endif /* ARM9 || XSCALE */
597
598/*
599 * Cannot panic here as we may not have a console yet ...
600 */
601
602int
603set_cpufuncs()
603set_cpufuncs(void)
604{
605 cputype = cpu_ident();
606 cputype &= CPU_ID_CPU_MASK;
607
608#ifdef CPU_ARM9
609 if (((cputype & CPU_ID_IMPLEMENTOR_MASK) == CPU_ID_ARM_LTD ||
610 (cputype & CPU_ID_IMPLEMENTOR_MASK) == CPU_ID_TI) &&
611 (cputype & 0x0000f000) == 0x00009000) {

--- 408 unchanged lines hidden ---
604{
605 cputype = cpu_ident();
606 cputype &= CPU_ID_CPU_MASK;
607
608#ifdef CPU_ARM9
609 if (((cputype & CPU_ID_IMPLEMENTOR_MASK) == CPU_ID_ARM_LTD ||
610 (cputype & CPU_ID_IMPLEMENTOR_MASK) == CPU_ID_TI) &&
611 (cputype & 0x0000f000) == 0x00009000) {

--- 408 unchanged lines hidden ---