Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/sys Add definitions so that the i386 cpuctl can issue IO...
details: https://anonhg.NetBSD.org/src/rev/98f08e9e3033
branches: trunk
changeset: 783714:98f08e9e3033
user: dsl <dsl%NetBSD.org@localhost>
date: Sat Jan 05 16:36:38 2013 +0000
description:
Add definitions so that the i386 cpuctl can issue IOC_CPU_UCODE_GET_VERSION
on amd64 kernels.
XXX This ioctl is horrid - writes into an unsized userspace buffer.
diffstat:
sys/sys/cpuio.h | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diffs (37 lines):
diff -r dd834f1c0e2f -r 98f08e9e3033 sys/sys/cpuio.h
--- a/sys/sys/cpuio.h Sat Jan 05 16:34:43 2013 +0000
+++ b/sys/sys/cpuio.h Sat Jan 05 16:36:38 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpuio.h,v 1.8 2012/08/29 17:13:22 drochner Exp $ */
+/* $NetBSD: cpuio.h,v 1.9 2013/01/05 16:36:38 dsl Exp $ */
/*-
* Copyright (c) 2007, 2009, 2012 The NetBSD Foundation, Inc.
@@ -69,6 +69,19 @@
void *data; /* OUT: CPU ID data */
};
+#define IOC_CPU_UCODE_GET_VERSION _IOWR('c', 6, struct cpu_ucode_version)
+
+#ifdef __i386__
+/* In order to read the info from an amd64 kernel we need ... */
+struct cpu_ucode_version_64 {
+ int loader_version; /* IN: md version number */
+ int pad1;
+ void *data; /* OUT: CPU ID data */
+ int must_be_zero;
+};
+#define IOC_CPU_UCODE_GET_VERSION_64 _IOWR('c', 6, struct cpu_ucode_version_64)
+#endif
+
struct cpu_ucode {
int loader_version; /* md version number */
int cpu_nr; /* CPU index or special value below */
@@ -77,7 +90,6 @@
char fwname[PATH_MAX];
};
-#define IOC_CPU_UCODE_GET_VERSION _IOWR('c', 6, struct cpu_ucode_version)
#define IOC_CPU_UCODE_APPLY _IOW('c', 7, struct cpu_ucode)
#endif /* !_SYS_CPUIO_H_ */
Home |
Main Index |
Thread Index |
Old Index