Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/ia64/ia64 Call snprintb() for cpu features register.
details: https://anonhg.NetBSD.org/src/rev/48fc8ba8e25e
branches: trunk
changeset: 785002:48fc8ba8e25e
user: kiyohara <kiyohara%NetBSD.org@localhost>
date: Sun Feb 17 06:46:23 2013 +0000
description:
Call snprintb() for cpu features register.
diffstat:
sys/arch/ia64/ia64/cpu.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diffs (40 lines):
diff -r 3acf7a31aa3e -r 48fc8ba8e25e sys/arch/ia64/ia64/cpu.c
--- a/sys/arch/ia64/ia64/cpu.c Sun Feb 17 04:36:07 2013 +0000
+++ b/sys/arch/ia64/ia64/cpu.c Sun Feb 17 06:46:23 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.10 2011/10/01 15:59:27 chs Exp $ */
+/* $NetBSD: cpu.c,v 1.11 2013/02/17 06:46:23 kiyohara Exp $ */
/*
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.10 2011/10/01 15:59:27 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.11 2013/02/17 06:46:23 kiyohara Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -118,6 +118,7 @@
const char *family_name, *model_name;
uint64_t features, tmp;
int number, revision, model, family, archrev;
+ char bitbuf[32];
extern uint64_t processor_frequency;
/*
@@ -179,5 +180,12 @@
aprint_normal("%s)\n", family_name);
aprint_normal_dev(sc->sc_dev, "Origin \"%s\", Revision %d\n",
(char *)vendor, revision);
- aprint_normal_dev(sc->sc_dev, "Features 0x%x\n", (uint32_t)features);
+
+#define IA64_FEATURES_BITMASK "\177\020" \
+ "b\0LB\0" /* 'brl' instruction is implemented */ \
+ "b\1SD\0" /* Processor implements sportaneous deferral */ \
+ "b\2AO\0" /* Processor implements 16-byte atomic operations */ \
+ "\0"
+ snprintb(bitbuf, sizeof(bitbuf), IA64_FEATURES_BITMASK, features);
+ aprint_normal_dev(sc->sc_dev, "Features %s\n", bitbuf);
}
Home |
Main Index |
Thread Index |
Old Index