4.104.114.84.95
Last change
on this file since 48694da was
48694da,
checked in by Joel Sherrill <joel.sherrill@…>, on 10/22/01 at 13:46:37
|
2001-10-22 Andy Dachs <a.dachs@…>
- Makefile.am, README, configure.ac, new_exception_processing/cpu.h,
shared/include/cpu.h, shared/include/cpuIdent.c, shared/src/cache.c:
Added mpc8260 support.
|
-
Property mode set to
100644
|
File size:
1.3 KB
|
Rev | Line | |
---|
[abd9401] | 1 | /* |
---|
| 2 | * cpuIdent.c -- Cpu identification code |
---|
| 3 | * |
---|
| 4 | * Copyright (C) 1999 Eric Valette. valette@crf.canon.fr |
---|
| 5 | * |
---|
[48694da] | 6 | * Added MPC8260 Andy Dachs <a.dachs@sstl.co.uk> |
---|
| 7 | * Surrey Satellite Technology Limited |
---|
| 8 | * |
---|
[abd9401] | 9 | * The license and distribution terms for this file may be |
---|
| 10 | * found in found in the file LICENSE in this distribution or at |
---|
| 11 | * http://www.OARcorp.com/rtems/license.html. |
---|
| 12 | * |
---|
| 13 | * $Id$ |
---|
| 14 | * |
---|
| 15 | */ |
---|
| 16 | |
---|
| 17 | #include <libcpu/spr.h> |
---|
[acddd7d2] | 18 | #include <bspIo.h> |
---|
[abd9401] | 19 | |
---|
| 20 | /* |
---|
| 21 | * Generate inline code to read Processor Version Register |
---|
| 22 | */ |
---|
| 23 | SPR_RO(PVR) |
---|
| 24 | |
---|
| 25 | ppc_cpu_id_t current_ppc_cpu = PPC_UNKNOWN; |
---|
| 26 | ppc_cpu_revision_t current_ppc_revision = 0xff; |
---|
| 27 | |
---|
| 28 | ppc_cpu_id_t get_ppc_cpu_type() |
---|
| 29 | { |
---|
[eaedd00] | 30 | unsigned int pvr = (_read_PVR() >> 16); |
---|
[abd9401] | 31 | |
---|
| 32 | current_ppc_cpu = (ppc_cpu_id_t) pvr; |
---|
| 33 | switch (pvr) { |
---|
[eaedd00] | 34 | case PPC_601: |
---|
| 35 | case PPC_603: |
---|
| 36 | case PPC_603ev: |
---|
[acddd7d2] | 37 | case PPC_604: |
---|
[eaedd00] | 38 | case PPC_750: |
---|
| 39 | case PPC_604e: |
---|
| 40 | case PPC_604r: |
---|
| 41 | case PPC_620: |
---|
| 42 | case PPC_860: |
---|
[48694da] | 43 | case PPC_8260: |
---|
[eaedd00] | 44 | current_ppc_cpu = (ppc_cpu_id_t) pvr; |
---|
| 45 | return current_ppc_cpu; |
---|
| 46 | default: |
---|
| 47 | printk("Unknown PVR value of 0x%x. Please add it to <libcpu/powerpc/shared/cpu.h>\n", pvr ); |
---|
[abd9401] | 48 | return PPC_UNKNOWN; |
---|
| 49 | } |
---|
| 50 | |
---|
| 51 | } |
---|
| 52 | ppc_cpu_revision_t get_ppc_cpu_revision() |
---|
| 53 | { |
---|
| 54 | ppc_cpu_revision_t rev = (ppc_cpu_revision_t) (_read_PVR() & 0xffff); |
---|
| 55 | current_ppc_revision = rev; |
---|
| 56 | return rev; |
---|
| 57 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.