summaryrefslogtreecommitdiff
path: root/usr/src/uts/intel/asm
diff options
context:
space:
mode:
authorjohnlev <none@none>2007-09-18 15:46:43 -0700
committerjohnlev <none@none>2007-09-18 15:46:43 -0700
commit843e19887f64dde75055cf8842fc4db2171eff45 (patch)
tree4ab8a445a86736e31e88b22413d080cc29f89aa0 /usr/src/uts/intel/asm
parent3d318c665ed0c4b4170851459cc58b3386bfec9b (diff)
downloadillumos-gate-843e19887f64dde75055cf8842fc4db2171eff45.tar.gz
PSARC 2006/260 Solaris on Xen
PSARC 2007/155 IPv4 Network Configuration Enhancements for Xen Guest Domains 6424124 panic in intr_thread->av_dispatch_autovect->atomic_add_ptr 6496858 mdb could use a memory-based IO backend 6515319 workaround for 6491065 needs to be removed from elfextract.c 6518807 snv_nightly: SUNWcakr pkgck error 6551858 PSARC 2006/260 Solaris on Xen 6584697 Can't boot Xen / Solaris dom0 if root is using ZFS 6593429 usr/src/cmd/devfsadm isn't linting properly 6600359 mdb_kvm_intrframe() is unused 6600750 can remove 'u' workaround from zlib 6601465 /dev/lofictl needs to accept kernel ioctl 6604043 Erronous ASSERT in sdev_vnops.c ASSERT(VTOSDEV(vp)->sdev_attrvp); --HG-- rename : usr/src/common/util/memset.h => deleted_files/usr/src/common/util/memset.h rename : usr/src/uts/common/krtld/mapfile => deleted_files/usr/src/uts/common/krtld/mapfile rename : usr/src/uts/i86pc/boot/boot_keyboard.h => deleted_files/usr/src/uts/i86pc/boot/boot_keyboard.h rename : usr/src/uts/intel/io/i8254.c => usr/src/uts/i86pc/io/microfind.c rename : usr/src/uts/i86pc/cpunex/Makefile => usr/src/uts/intel/cpunex/Makefile rename : usr/src/uts/i86pc/io/cpunex.c => usr/src/uts/intel/io/cpunex.c
Diffstat (limited to 'usr/src/uts/intel/asm')
-rw-r--r--usr/src/uts/intel/asm/clock.h30
-rw-r--r--usr/src/uts/intel/asm/cpu.h34
-rw-r--r--usr/src/uts/intel/asm/mmu.h31
3 files changed, 61 insertions, 34 deletions
diff --git a/usr/src/uts/intel/asm/clock.h b/usr/src/uts/intel/asm/clock.h
index 6effcbc30a..bb855499ed 100644
--- a/usr/src/uts/intel/asm/clock.h
+++ b/usr/src/uts/intel/asm/clock.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -49,7 +48,9 @@ extern __inline__ void unlock_hres_lock(void)
: "cc");
}
-extern __inline__ hrtime_t tsc_read(void)
+#if defined(__xpv)
+
+extern __inline__ hrtime_t __rdtsc_insn(void)
{
#if defined(__amd64)
uint32_t lobits, hibits;
@@ -70,6 +71,25 @@ extern __inline__ hrtime_t tsc_read(void)
#endif
}
+#else /* __xpv */
+
+/*
+ * rdtsc may not exist on 32-bit, so we don't have an inline for it.
+ */
+#if defined(__amd64)
+extern __inline__ hrtime_t tsc_read(void)
+{
+ uint32_t lobits, hibits;
+
+ __asm__ __volatile__(
+ "rdtsc"
+ : "=a" (lobits), "=d" (hibits));
+ return (lobits | ((hrtime_t)hibits << 32));
+}
+#endif /* __amd64 */
+
+#endif /* __xpv */
+
#endif /* !__lint && __GNUC__ */
#ifdef __cplusplus
diff --git a/usr/src/uts/intel/asm/cpu.h b/usr/src/uts/intel/asm/cpu.h
index 63d346da74..0f285f82b1 100644
--- a/usr/src/uts/intel/asm/cpu.h
+++ b/usr/src/uts/intel/asm/cpu.h
@@ -42,6 +42,8 @@ extern __inline__ void ht_pause(void)
"pause");
}
+#if !defined(__xpv)
+
extern __inline__ void cli(void)
{
__asm__ __volatile__(
@@ -60,6 +62,8 @@ extern __inline__ void i86_halt(void)
"sti; hlt");
}
+#endif /* !__xpv */
+
#endif /* __i386 || defined(__amd64) */
#if defined(__amd64)
@@ -67,41 +71,45 @@ extern __inline__ void i86_halt(void)
extern __inline__ void __set_ds(selector_t value)
{
__asm__ __volatile__(
- "movw %0, %%ds"
- : /* no output */
- : "r" (value));
+ "movw %0, %%ds"
+ : /* no output */
+ : "r" (value));
}
extern __inline__ void __set_es(selector_t value)
{
__asm__ __volatile__(
- "movw %0, %%es"
- : /* no output */
- : "r" (value));
+ "movw %0, %%es"
+ : /* no output */
+ : "r" (value));
}
extern __inline__ void __set_fs(selector_t value)
{
__asm__ __volatile__(
- "movw %0, %%fs"
- : /* no output */
- : "r" (value));
+ "movw %0, %%fs"
+ : /* no output */
+ : "r" (value));
}
extern __inline__ void __set_gs(selector_t value)
{
__asm__ __volatile__(
- "movw %0, %%gs"
- : /* no output */
- : "r" (value));
+ "movw %0, %%gs"
+ : /* no output */
+ : "r" (value));
}
+#if !defined(__xpv)
+
extern __inline__ void __swapgs(void)
{
__asm__ __volatile__(
- "mfence; swapgs");
+ "mfence; swapgs");
}
+#endif /* !__xpv */
+
#endif /* __amd64 */
#endif /* !__lint && __GNUC__ */
diff --git a/usr/src/uts/intel/asm/mmu.h b/usr/src/uts/intel/asm/mmu.h
index c3982e5af4..68995f2f41 100644
--- a/usr/src/uts/intel/asm/mmu.h
+++ b/usr/src/uts/intel/asm/mmu.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -35,7 +34,7 @@
extern "C" {
#endif
-#if !defined(__lint) && defined(__GNUC__)
+#if defined(__GNUC__) && !defined(__xpv)
#if defined(__amd64)
@@ -44,17 +43,17 @@ extern __inline__ ulong_t getcr3(void)
uint64_t value;
__asm__ __volatile__(
- "movq %%cr3, %0"
- : "=r" (value));
+ "movq %%cr3, %0"
+ : "=r" (value));
return (value);
}
extern __inline__ void setcr3(ulong_t value)
{
__asm__ __volatile__(
- "movq %0, %%cr3"
- : /* no output */
- : "r" (value));
+ "movq %0, %%cr3"
+ : /* no output */
+ : "r" (value));
}
extern __inline__ void reload_cr3(void)
@@ -69,17 +68,17 @@ extern __inline__ ulong_t getcr3(void)
uint32_t value;
__asm__ __volatile__(
- "movl %%cr3, %0"
- : "=r" (value));
+ "movl %%cr3, %0"
+ : "=r" (value));
return (value);
}
extern __inline__ void setcr3(ulong_t value)
{
__asm__ __volatile__(
- "movl %0, %%cr3"
- : /* no output */
- : "r" (value));
+ "movl %0, %%cr3"
+ : /* no output */
+ : "r" (value));
}
extern __inline__ void reload_cr3(void)
@@ -89,7 +88,7 @@ extern __inline__ void reload_cr3(void)
#endif
-#endif /* !__lint && __GNUC__ */
+#endif /* __GNUC__ && !__xpv */
#ifdef __cplusplus
}