Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 69476
b: refs/heads/master
c: 180005c
h: refs/heads/master
v: v3
  • Loading branch information
Catalin Marinas authored and Russell King committed Oct 12, 2007
1 parent 3819534 commit e718635
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c1f438f5eec867707022e5f33bec5e91ec12f6e7
refs/heads/master: 180005c4efb76a81fd0abcef4c2412d238eea20c
21 changes: 17 additions & 4 deletions trunk/arch/arm/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,23 @@ int cpu_architecture(void)
cpu_arch = (processor_id >> 16) & 7;
if (cpu_arch)
cpu_arch += CPU_ARCH_ARMv3;
} else {
/* the revised CPUID */
cpu_arch = ((processor_id >> 12) & 0xf) - 0xb + CPU_ARCH_ARMv6;
}
} else if ((processor_id & 0x000f0000) == 0x000f0000) {
unsigned int mmfr0;

/* Revised CPUID format. Read the Memory Model Feature
* Register 0 and check for VMSAv7 or PMSAv7 */
asm("mrc p15, 0, %0, c0, c1, 4"
: "=r" (mmfr0));
if ((mmfr0 & 0x0000000f) == 0x00000003 ||
(mmfr0 & 0x000000f0) == 0x00000030)
cpu_arch = CPU_ARCH_ARMv7;
else if ((mmfr0 & 0x0000000f) == 0x00000002 ||
(mmfr0 & 0x000000f0) == 0x00000020)
cpu_arch = CPU_ARCH_ARMv6;
else
cpu_arch = CPU_ARCH_UNKNOWN;
} else
cpu_arch = CPU_ARCH_UNKNOWN;

return cpu_arch;
}
Expand Down

0 comments on commit e718635

Please sign in to comment.