|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] minios: setup fpu and sse in mini-os
# HG changeset patch
# User Matthew Fioravante <matthew.fioravante@xxxxxxxxxx>
# Date 1349703391 -3600
# Node ID c9f621893a05e3e447ba6770f8ae912721712569
# Parent 865626fc700457613e9049d9c19bf25b43bfa019
minios: setup fpu and sse in mini-os
This patch adds floating point and sse support to mini-os by
initializing the floating point unit and the see unit during
domain boot up.
Signed-off-by: Matthew Fioravante <matthew.fioravante@xxxxxxxxxx>
Acked-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
diff -r 865626fc7004 -r c9f621893a05 extras/mini-os/arch/x86/setup.c
--- a/extras/mini-os/arch/x86/setup.c Mon Oct 08 14:36:31 2012 +0100
+++ b/extras/mini-os/arch/x86/setup.c Mon Oct 08 14:36:31 2012 +0100
@@ -74,9 +74,28 @@ shared_info_t *map_shared_info(unsigned
return (shared_info_t *)shared_info;
}
+static inline void fpu_init(void) {
+ asm volatile("fninit");
+}
+
+#ifdef __SSE__
+static inline void sse_init(void) {
+ unsigned long status = 0x1f80;
+ asm volatile("ldmxcsr %0" : : "m" (status));
+}
+#else
+#define sse_init()
+#endif
+
void
arch_init(start_info_t *si)
{
+ /*Initialize floating point unit */
+ fpu_init();
+
+ /* Initialize SSE */
+ sse_init();
+
/* Copy the start_info struct to a globally-accessible area. */
/* WARN: don't do printk before here, it uses information from
shared_info. Use xprintk instead. */
@@ -99,6 +118,7 @@ arch_init(start_info_t *si)
(unsigned long)failsafe_callback, 0);
#endif
+
}
void
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |