summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorrpaulo <rpaulo@FreeBSD.org>2009-09-26 16:37:23 +0000
committerrpaulo <rpaulo@FreeBSD.org>2009-09-26 16:37:23 +0000
commitaedd167c2c47b4c7a8ca82f05cfc995fdf0b9696 (patch)
tree36bc078730fe66e7681fc7c8e8fc81ded9b1fed3 /sys
parentb69a48a63f54bfcc1c9b1bf8a8828fbaf25e004b (diff)
downloadFreeBSD-src-aedd167c2c47b4c7a8ca82f05cfc995fdf0b9696.zip
FreeBSD-src-aedd167c2c47b4c7a8ca82f05cfc995fdf0b9696.tar.gz
Promote the cpu_class local variable to global and expose it in md_var.h
Reviewed by: freebsd-arm
Diffstat (limited to 'sys')
-rw-r--r--sys/arm/arm/identcpu.c22
-rw-r--r--sys/arm/include/md_var.h21
2 files changed, 23 insertions, 20 deletions
diff --git a/sys/arm/arm/identcpu.c b/sys/arm/arm/identcpu.c
index df67a8a..294d5a9 100644
--- a/sys/arm/arm/identcpu.c
+++ b/sys/arm/arm/identcpu.c
@@ -54,30 +54,12 @@ __FBSDID("$FreeBSD$");
#include <machine/cpu.h>
#include <machine/cpuconf.h>
+#include <machine/md_var.h>
char machine[] = "arm";
SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD,
machine, 0, "Machine class");
-enum cpu_class {
- CPU_CLASS_NONE,
- CPU_CLASS_ARM2,
- CPU_CLASS_ARM2AS,
- CPU_CLASS_ARM3,
- CPU_CLASS_ARM6,
- CPU_CLASS_ARM7,
- CPU_CLASS_ARM7TDMI,
- CPU_CLASS_ARM8,
- CPU_CLASS_ARM9TDMI,
- CPU_CLASS_ARM9ES,
- CPU_CLASS_ARM9EJS,
- CPU_CLASS_ARM10E,
- CPU_CLASS_ARM10EJ,
- CPU_CLASS_SA1,
- CPU_CLASS_XSCALE,
- CPU_CLASS_ARM11J,
- CPU_CLASS_MARVELL
-};
static const char * const generic_steppings[16] = {
"rev 0", "rev 1", "rev 2", "rev 3",
@@ -372,11 +354,11 @@ static const char * const wtnames[] = {
extern int ctrl;
+enum cpu_class cpu_class = CPU_CLASS_NONE;
void
identify_arm_cpu(void)
{
u_int cpuid;
- enum cpu_class cpu_class = CPU_CLASS_NONE;
int i;
cpuid = cpu_id();
diff --git a/sys/arm/include/md_var.h b/sys/arm/include/md_var.h
index 6d47a91..1f622e2 100644
--- a/sys/arm/include/md_var.h
+++ b/sys/arm/include/md_var.h
@@ -48,6 +48,27 @@ extern int _min_bzero_size;
#define SRC_IS_USER 0x2
#define IS_PHYSICAL 0x4
+enum cpu_class {
+ CPU_CLASS_NONE,
+ CPU_CLASS_ARM2,
+ CPU_CLASS_ARM2AS,
+ CPU_CLASS_ARM3,
+ CPU_CLASS_ARM6,
+ CPU_CLASS_ARM7,
+ CPU_CLASS_ARM7TDMI,
+ CPU_CLASS_ARM8,
+ CPU_CLASS_ARM9TDMI,
+ CPU_CLASS_ARM9ES,
+ CPU_CLASS_ARM9EJS,
+ CPU_CLASS_ARM10E,
+ CPU_CLASS_ARM10EJ,
+ CPU_CLASS_SA1,
+ CPU_CLASS_XSCALE,
+ CPU_CLASS_ARM11J,
+ CPU_CLASS_MARVELL
+};
+extern enum cpu_class cpu_class;
+
struct dumperinfo;
extern int busdma_swi_pending;
void busdma_swi(void);
OpenPOWER on IntegriCloud