diff options
Diffstat (limited to 'xorg-server/hw/xfree86/os-support/solaris')
8 files changed, 502 insertions, 502 deletions
diff --git a/xorg-server/hw/xfree86/os-support/solaris/solaris-amd64.S b/xorg-server/hw/xfree86/os-support/solaris/solaris-amd64.S index 94ffa40e7..a371f9b66 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/solaris-amd64.S +++ b/xorg-server/hw/xfree86/os-support/solaris/solaris-amd64.S @@ -1,67 +1,67 @@ -/ Copyright 2005 Sun Microsystems, Inc. All rights reserved. -/ -/ Permission is hereby granted, free of charge, to any person obtaining a -/ copy of this software and associated documentation files (the "Software"), -/ to deal in the Software without restriction, including without limitation -/ the rights to use, copy, modify, merge, publish, distribute, sublicense, -/ and/or sell copies of the Software, and to permit persons to whom the -/ Software is furnished to do so, subject to the following conditions: -/ -/ The above copyright notice and this permission notice (including the next -/ paragraph) shall be included in all copies or substantial portions of the -/ Software. -/ -/ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -/ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -/ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -/ DEALINGS IN THE SOFTWARE. - -#ifdef INLINE_ASM -#define FUNCTION_START(f,n) .inline f,n -#define FUNCTION_END(f) .end -#else -#define _ASM -#include <sys/asm_linkage.h> -#define FUNCTION_START(f,n) ENTRY(f) -#define FUNCTION_END(f) ret; SET_SIZE(f) -#endif - - FUNCTION_START(inb,4) - movq %rdi, %rdx - xorq %rax, %rax - inb (%dx) - FUNCTION_END(inb) - - FUNCTION_START(inw,4) - movq %rdi, %rdx - xorq %rax, %rax - inw (%dx) - FUNCTION_END(inw) - - FUNCTION_START(inl,4) - movq %rdi, %rdx - xorq %rax, %rax - inl (%dx) - FUNCTION_END(inl) - - FUNCTION_START(outb,8) - movq %rdi, %rdx - movq %rsi, %rax - outb (%dx) - FUNCTION_END(outb) - - FUNCTION_START(outw,8) - movq %rdi, %rdx - movq %rsi, %rax - outw (%dx) - FUNCTION_END(outw) - - FUNCTION_START(outl,8) - movq %rdi, %rdx - movq %rsi, %rax - outl (%dx) - FUNCTION_END(outl) - +/ Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+/
+/ Permission is hereby granted, free of charge, to any person obtaining a
+/ copy of this software and associated documentation files (the "Software"),
+/ to deal in the Software without restriction, including without limitation
+/ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+/ and/or sell copies of the Software, and to permit persons to whom the
+/ Software is furnished to do so, subject to the following conditions:
+/
+/ The above copyright notice and this permission notice (including the next
+/ paragraph) shall be included in all copies or substantial portions of the
+/ Software.
+/
+/ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+/ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+/ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+/ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+/ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+/ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+/ DEALINGS IN THE SOFTWARE.
+
+#ifdef INLINE_ASM
+#define FUNCTION_START(f,n) .inline f,n
+#define FUNCTION_END(f) .end
+#else
+#define _ASM
+#include <sys/asm_linkage.h>
+#define FUNCTION_START(f,n) ENTRY(f)
+#define FUNCTION_END(f) ret; SET_SIZE(f)
+#endif
+
+ FUNCTION_START(inb,4)
+ movq %rdi, %rdx
+ xorq %rax, %rax
+ inb (%dx)
+ FUNCTION_END(inb)
+
+ FUNCTION_START(inw,4)
+ movq %rdi, %rdx
+ xorq %rax, %rax
+ inw (%dx)
+ FUNCTION_END(inw)
+
+ FUNCTION_START(inl,4)
+ movq %rdi, %rdx
+ xorq %rax, %rax
+ inl (%dx)
+ FUNCTION_END(inl)
+
+ FUNCTION_START(outb,8)
+ movq %rdi, %rdx
+ movq %rsi, %rax
+ outb (%dx)
+ FUNCTION_END(outb)
+
+ FUNCTION_START(outw,8)
+ movq %rdi, %rdx
+ movq %rsi, %rax
+ outw (%dx)
+ FUNCTION_END(outw)
+
+ FUNCTION_START(outl,8)
+ movq %rdi, %rdx
+ movq %rsi, %rax
+ outl (%dx)
+ FUNCTION_END(outl)
+
diff --git a/xorg-server/hw/xfree86/os-support/solaris/solaris-ia32.S b/xorg-server/hw/xfree86/os-support/solaris/solaris-ia32.S index 4dadf7ffd..0068b06e4 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/solaris-ia32.S +++ b/xorg-server/hw/xfree86/os-support/solaris/solaris-ia32.S @@ -1,67 +1,67 @@ -/ Copyright 2004 Sun Microsystems, Inc. All rights reserved. -/ -/ Permission is hereby granted, free of charge, to any person obtaining a -/ copy of this software and associated documentation files (the "Software"), -/ to deal in the Software without restriction, including without limitation -/ the rights to use, copy, modify, merge, publish, distribute, sublicense, -/ and/or sell copies of the Software, and to permit persons to whom the -/ Software is furnished to do so, subject to the following conditions: -/ -/ The above copyright notice and this permission notice (including the next -/ paragraph) shall be included in all copies or substantial portions of the -/ Software. -/ -/ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -/ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -/ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -/ DEALINGS IN THE SOFTWARE. - -#ifdef INLINE_ASM -#define FUNCTION_START(f,n) .inline f,n -#define FUNCTION_END(f) .end -#else -#define _ASM -#include <sys/asm_linkage.h> -#define FUNCTION_START(f,n) ENTRY(f) -#define FUNCTION_END(f) ret; SET_SIZE(f) -#endif - - FUNCTION_START(inb,4) - movl (%esp), %edx - xorl %eax, %eax - inb (%dx) - FUNCTION_END(inb) - - FUNCTION_START(inw,4) - movl (%esp), %edx - xorl %eax, %eax - inw (%dx) - FUNCTION_END(inw) - - FUNCTION_START(inl,4) - movl (%esp), %edx - xorl %eax, %eax - inl (%dx) - FUNCTION_END(inl) - - FUNCTION_START(outb,8) - movl (%esp), %edx - movl 4(%esp), %eax - outb (%dx) - FUNCTION_END(outb) - - FUNCTION_START(outw,8) - movl (%esp), %edx - movl 4(%esp), %eax - outw (%dx) - FUNCTION_END(outw) - - FUNCTION_START(outl,8) - movl (%esp), %edx - movl 4(%esp), %eax - outl (%dx) - FUNCTION_END(outl) - +/ Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
+/
+/ Permission is hereby granted, free of charge, to any person obtaining a
+/ copy of this software and associated documentation files (the "Software"),
+/ to deal in the Software without restriction, including without limitation
+/ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+/ and/or sell copies of the Software, and to permit persons to whom the
+/ Software is furnished to do so, subject to the following conditions:
+/
+/ The above copyright notice and this permission notice (including the next
+/ paragraph) shall be included in all copies or substantial portions of the
+/ Software.
+/
+/ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+/ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+/ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+/ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+/ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+/ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+/ DEALINGS IN THE SOFTWARE.
+
+#ifdef INLINE_ASM
+#define FUNCTION_START(f,n) .inline f,n
+#define FUNCTION_END(f) .end
+#else
+#define _ASM
+#include <sys/asm_linkage.h>
+#define FUNCTION_START(f,n) ENTRY(f)
+#define FUNCTION_END(f) ret; SET_SIZE(f)
+#endif
+
+ FUNCTION_START(inb,4)
+ movl (%esp), %edx
+ xorl %eax, %eax
+ inb (%dx)
+ FUNCTION_END(inb)
+
+ FUNCTION_START(inw,4)
+ movl (%esp), %edx
+ xorl %eax, %eax
+ inw (%dx)
+ FUNCTION_END(inw)
+
+ FUNCTION_START(inl,4)
+ movl (%esp), %edx
+ xorl %eax, %eax
+ inl (%dx)
+ FUNCTION_END(inl)
+
+ FUNCTION_START(outb,8)
+ movl (%esp), %edx
+ movl 4(%esp), %eax
+ outb (%dx)
+ FUNCTION_END(outb)
+
+ FUNCTION_START(outw,8)
+ movl (%esp), %edx
+ movl 4(%esp), %eax
+ outw (%dx)
+ FUNCTION_END(outw)
+
+ FUNCTION_START(outl,8)
+ movl (%esp), %edx
+ movl 4(%esp), %eax
+ outl (%dx)
+ FUNCTION_END(outl)
+
diff --git a/xorg-server/hw/xfree86/os-support/solaris/solaris-sparcv8plus.S b/xorg-server/hw/xfree86/os-support/solaris/solaris-sparcv8plus.S index 0f6d694fd..3bb8d241c 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/solaris-sparcv8plus.S +++ b/xorg-server/hw/xfree86/os-support/solaris/solaris-sparcv8plus.S @@ -1,138 +1,138 @@ -/* Copyright 2004 Sun Microsystems, Inc. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#ifdef INLINE_ASM -#define FUNCTION_START(f,n) .inline f,n -#define FUNCTION_END(f) .end -#else -#define _ASM -#include <sys/asm_linkage.h> -#define FUNCTION_START(f,n) ENTRY(f) -#define FUNCTION_END(f) retl; nop; SET_SIZE(f) -#endif - -/* Converted from common/compiler.h gcc inline format to Sun cc inline - * format by Kenjiro Tsuji - * - * The value 0x88 means ASI_PRIMARY_LITTLE. - * The store or load to/from the address space will be done - * as little-endian. In the original xrog code, the value - * is defined as the macro ASI_PL. - * - * In the original xorg code, "membar #StoreStore|#StoreLoad" - * is directly implemented as an instruction "0x8143e00a". - * - */ - - FUNCTION_START(outb, 0) - stba %o1, [%o0] 0x88 - membar #StoreStore|#StoreLoad - FUNCTION_END(outb) - - FUNCTION_START(outw, 0) - stha %o1, [%o0] 0x88 - membar #StoreStore|#StoreLoad - FUNCTION_END(outw) - - FUNCTION_START(outl, 0) - sta %o1, [%o0] 0x88 - membar #StoreStore|#StoreLoad - FUNCTION_END(outl) - - FUNCTION_START(inb, 0) - lduba [%o0] 0x88, %o0 - FUNCTION_END(inb) - - FUNCTION_START(inw, 0) - lduha [%o0] 0x88, %o0 - FUNCTION_END(inw) - - FUNCTION_START(inl, 0) - lda [%o0] 0x88, %o0 - FUNCTION_END(inl) - - FUNCTION_START(xf86ReadMmio8, 0) - lduba [%o0 + %o1] 0x88, %o0 - FUNCTION_END(xf86ReadMmio8) - - FUNCTION_START(xf86ReadMmio16Be, 0) - lduh [%o0 + %o1], %o0 - FUNCTION_END(xf86ReadMmio16Be) - - FUNCTION_START(xf86ReadMmio16Le, 0) - lduha [%o0 + %o1] 0x88, %o0 - FUNCTION_END(xf86ReadMmio16Le) - - FUNCTION_START(xf86ReadMmio32Be, 0) - ld [%o0 + %o1], %o0 - FUNCTION_END(xf86ReadMmio32Be) - - FUNCTION_START(xf86ReadMmio32Le, 0) - lda [%o0 + %o1] 0x88, %o0 - FUNCTION_END(xf86ReadMmio32Le) - - FUNCTION_START(xf86WriteMmio8, 0) - stba %o2, [%o0 + %o1] 0x88 - membar #StoreStore|#StoreLoad - FUNCTION_END(xf86WriteMmio8) - - FUNCTION_START(xf86WriteMmio16Be, 0) - sth %o2, [%o0 + %o1] - membar #StoreStore|#StoreLoad - FUNCTION_END(xf86WriteMmio16Be) - - FUNCTION_START(xf86WriteMmio16Le, 0) - stha %o2, [%o0 + %o1] 0x88 - membar #StoreStore|#StoreLoad - FUNCTION_END(xf86WriteMmio16Le) - - FUNCTION_START(xf86WriteMmio32Be, 0) - st %o2, [%o0 + %o1] - membar #StoreStore|#StoreLoad - FUNCTION_END(xf86WriteMmio32Be) - - FUNCTION_START(xf86WriteMmio32Le, 0) - sta %o2, [%o0 + %o1] 0x88 - membar #StoreStore|#StoreLoad - FUNCTION_END(xf86WriteMmio32Le) - - FUNCTION_START(xf86WriteMmio8NB, 0) - add %o0, %o1, %o0 - stba %o2, [%o0] 0x88 - FUNCTION_END(xf86WriteMmio8NB) - - FUNCTION_START(xf86WriteMmio16BeNB, 0) - sth %o2, [%o0 + %o1] - FUNCTION_END(xf86WriteMmio16BeNB) - - FUNCTION_START(xf86WriteMmio16LeNB, 0) - stha %o2, [%o0 + %o1] 0x88 - FUNCTION_END(xf86WriteMmio16LeNB) - - FUNCTION_START(xf86WriteMmio32BeNB, 0) - st %o2, [%o0 + %o1] - FUNCTION_END(xf86WriteMmio32BeNB) - - FUNCTION_START(xf86WriteMmio32LeNB, 0) - sta %o2, [%o0 + %o1] 0x88 - FUNCTION_END(xf86WriteMmio32LeNB) - +/* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifdef INLINE_ASM
+#define FUNCTION_START(f,n) .inline f,n
+#define FUNCTION_END(f) .end
+#else
+#define _ASM
+#include <sys/asm_linkage.h>
+#define FUNCTION_START(f,n) ENTRY(f)
+#define FUNCTION_END(f) retl; nop; SET_SIZE(f)
+#endif
+
+/* Converted from common/compiler.h gcc inline format to Sun cc inline
+ * format by Kenjiro Tsuji
+ *
+ * The value 0x88 means ASI_PRIMARY_LITTLE.
+ * The store or load to/from the address space will be done
+ * as little-endian. In the original xrog code, the value
+ * is defined as the macro ASI_PL.
+ *
+ * In the original xorg code, "membar #StoreStore|#StoreLoad"
+ * is directly implemented as an instruction "0x8143e00a".
+ *
+ */
+
+ FUNCTION_START(outb, 0)
+ stba %o1, [%o0] 0x88
+ membar #StoreStore|#StoreLoad
+ FUNCTION_END(outb)
+
+ FUNCTION_START(outw, 0)
+ stha %o1, [%o0] 0x88
+ membar #StoreStore|#StoreLoad
+ FUNCTION_END(outw)
+
+ FUNCTION_START(outl, 0)
+ sta %o1, [%o0] 0x88
+ membar #StoreStore|#StoreLoad
+ FUNCTION_END(outl)
+
+ FUNCTION_START(inb, 0)
+ lduba [%o0] 0x88, %o0
+ FUNCTION_END(inb)
+
+ FUNCTION_START(inw, 0)
+ lduha [%o0] 0x88, %o0
+ FUNCTION_END(inw)
+
+ FUNCTION_START(inl, 0)
+ lda [%o0] 0x88, %o0
+ FUNCTION_END(inl)
+
+ FUNCTION_START(xf86ReadMmio8, 0)
+ lduba [%o0 + %o1] 0x88, %o0
+ FUNCTION_END(xf86ReadMmio8)
+
+ FUNCTION_START(xf86ReadMmio16Be, 0)
+ lduh [%o0 + %o1], %o0
+ FUNCTION_END(xf86ReadMmio16Be)
+
+ FUNCTION_START(xf86ReadMmio16Le, 0)
+ lduha [%o0 + %o1] 0x88, %o0
+ FUNCTION_END(xf86ReadMmio16Le)
+
+ FUNCTION_START(xf86ReadMmio32Be, 0)
+ ld [%o0 + %o1], %o0
+ FUNCTION_END(xf86ReadMmio32Be)
+
+ FUNCTION_START(xf86ReadMmio32Le, 0)
+ lda [%o0 + %o1] 0x88, %o0
+ FUNCTION_END(xf86ReadMmio32Le)
+
+ FUNCTION_START(xf86WriteMmio8, 0)
+ stba %o2, [%o0 + %o1] 0x88
+ membar #StoreStore|#StoreLoad
+ FUNCTION_END(xf86WriteMmio8)
+
+ FUNCTION_START(xf86WriteMmio16Be, 0)
+ sth %o2, [%o0 + %o1]
+ membar #StoreStore|#StoreLoad
+ FUNCTION_END(xf86WriteMmio16Be)
+
+ FUNCTION_START(xf86WriteMmio16Le, 0)
+ stha %o2, [%o0 + %o1] 0x88
+ membar #StoreStore|#StoreLoad
+ FUNCTION_END(xf86WriteMmio16Le)
+
+ FUNCTION_START(xf86WriteMmio32Be, 0)
+ st %o2, [%o0 + %o1]
+ membar #StoreStore|#StoreLoad
+ FUNCTION_END(xf86WriteMmio32Be)
+
+ FUNCTION_START(xf86WriteMmio32Le, 0)
+ sta %o2, [%o0 + %o1] 0x88
+ membar #StoreStore|#StoreLoad
+ FUNCTION_END(xf86WriteMmio32Le)
+
+ FUNCTION_START(xf86WriteMmio8NB, 0)
+ add %o0, %o1, %o0
+ stba %o2, [%o0] 0x88
+ FUNCTION_END(xf86WriteMmio8NB)
+
+ FUNCTION_START(xf86WriteMmio16BeNB, 0)
+ sth %o2, [%o0 + %o1]
+ FUNCTION_END(xf86WriteMmio16BeNB)
+
+ FUNCTION_START(xf86WriteMmio16LeNB, 0)
+ stha %o2, [%o0 + %o1] 0x88
+ FUNCTION_END(xf86WriteMmio16LeNB)
+
+ FUNCTION_START(xf86WriteMmio32BeNB, 0)
+ st %o2, [%o0 + %o1]
+ FUNCTION_END(xf86WriteMmio32BeNB)
+
+ FUNCTION_START(xf86WriteMmio32LeNB, 0)
+ sta %o2, [%o0 + %o1] 0x88
+ FUNCTION_END(xf86WriteMmio32LeNB)
+
diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_VTsw.c b/xorg-server/hw/xfree86/os-support/solaris/sun_VTsw.c index e297f8c49..d145ac77b 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/sun_VTsw.c +++ b/xorg-server/hw/xfree86/os-support/solaris/sun_VTsw.c @@ -1,5 +1,5 @@ /*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_agp.c b/xorg-server/hw/xfree86/os-support/solaris/sun_agp.c index 99c3abde5..8c5c45843 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/sun_agp.c +++ b/xorg-server/hw/xfree86/os-support/solaris/sun_agp.c @@ -6,7 +6,7 @@ * Copyright © 2000 VA Linux Systems, Inc.
* Copyright © 2001 The XFree86 Project, Inc.
*/
-/* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+/* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c b/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c index 23e14f17e..7a5128ffb 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c +++ b/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c @@ -1,226 +1,226 @@ -/* Based on hw/xfree86/os-support/bsd/bsd_apm.c which bore no explicit - * copyright notice, so is covered by the following notice: - * - * Copyright (C) 1994-2003 The XFree86 Project, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of the XFree86 Project shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from the - * XFree86 Project. - */ - -/* Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include <xorg-config.h> -#endif - -#include <X11/X.h> -#include "os.h" -#include "xf86.h" -#include "xf86Priv.h" -#define XF86_OS_PRIVS -#include "xf86_OSproc.h" -#include "xf86_OSlib.h" - -#ifndef PLEASE_FIX_THIS -#define APM_STANDBY_REQ 0xa01 -#define APM_SUSPEND_REQ 0xa02 -#define APM_NORMAL_RESUME 0xa03 -#define APM_CRIT_RESUME 0xa04 -#define APM_BATTERY_LOW 0xa05 -#define APM_POWER_CHANGE 0xa06 -#define APM_UPDATE_TIME 0xa07 -#define APM_CRIT_SUSPEND_REQ 0xa08 -#define APM_USER_STANDBY_REQ 0xa09 -#define APM_USER_SUSPEND_REQ 0xa0a -#define APM_SYS_STANDBY_RESUME 0xa0b -#define APM_IOC_NEXTEVENT 0xa0c -#define APM_IOC_RESUME 0xa0d -#define APM_IOC_SUSPEND 0xa0e -#define APM_IOC_STANDBY 0xa0f -#endif - -typedef struct apm_event_info -{ - int type; -} apm_event_info; - -/* - This may be replaced with a better device name - very soon... -*/ -#define APM_DEVICE "/dev/srn" -#define APM_DEVICE1 "/dev/apm" - -static pointer APMihPtr = NULL; -static void sunCloseAPM(void); - -static struct { - u_int apmBsd; - pmEvent xf86; -} sunToXF86Array [] = { - { APM_STANDBY_REQ, XF86_APM_SYS_STANDBY }, - { APM_SUSPEND_REQ, XF86_APM_SYS_SUSPEND }, - { APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME }, - { APM_CRIT_RESUME, XF86_APM_CRITICAL_RESUME }, - { APM_BATTERY_LOW, XF86_APM_LOW_BATTERY }, - { APM_POWER_CHANGE, XF86_APM_POWER_STATUS_CHANGE }, - { APM_UPDATE_TIME, XF86_APM_UPDATE_TIME }, - { APM_CRIT_SUSPEND_REQ, XF86_APM_CRITICAL_SUSPEND }, - { APM_USER_STANDBY_REQ, XF86_APM_USER_STANDBY }, - { APM_USER_SUSPEND_REQ, XF86_APM_USER_SUSPEND }, - { APM_SYS_STANDBY_RESUME, XF86_APM_STANDBY_RESUME }, -#ifdef APM_CAPABILITY_CHANGE - { APM_CAPABILITY_CHANGE, XF86_APM_CAPABILITY_CHANGED }, -#endif -}; - -#define numApmEvents (sizeof(sunToXF86Array) / sizeof(sunToXF86Array[0])) - -static pmEvent -sunToXF86(int type) -{ - int i; - - for (i = 0; i < numApmEvents; i++) { - if (type == sunToXF86Array[i].apmBsd) { - return sunToXF86Array[i].xf86; - } - } - return XF86_APM_UNKNOWN; -} - -/* - * APM events can be requested direclty from /dev/apm - */ -static int -sunPMGetEventFromOS(int fd, pmEvent *events, int num) -{ - struct apm_event_info sunEvent; - int i; - - for (i = 0; i < num; i++) { - - if (ioctl(fd, APM_IOC_NEXTEVENT, &sunEvent) < 0) { - if (errno != EAGAIN) { - xf86Msg(X_WARNING, "sunPMGetEventFromOS: APM_IOC_NEXTEVENT" - " %s\n", strerror(errno)); - } - break; - } - events[i] = sunToXF86(sunEvent.type); - } - xf86Msg(X_WARNING, "Got some events\n"); - return i; -} - -static pmWait -sunPMConfirmEventToOs(int fd, pmEvent event) -{ - switch (event) { -/* XXX: NOT CURRENTLY RETURNED FROM OS */ - case XF86_APM_SYS_STANDBY: - case XF86_APM_USER_STANDBY: - if (ioctl( fd, APM_IOC_STANDBY, NULL ) == 0) - return PM_WAIT; /* should we stop the Xserver in standby, too? */ - else - return PM_NONE; - case XF86_APM_SYS_SUSPEND: - case XF86_APM_CRITICAL_SUSPEND: - case XF86_APM_USER_SUSPEND: - xf86Msg(X_WARNING, "Got SUSPENDED\n"); - if (ioctl( fd, APM_IOC_SUSPEND, NULL ) == 0) - return PM_CONTINUE; - else { - xf86Msg(X_WARNING, "sunPMConfirmEventToOs: APM_IOC_SUSPEND" - " %s\n", strerror(errno)); - return PM_FAILED; - } - case XF86_APM_STANDBY_RESUME: - case XF86_APM_NORMAL_RESUME: - case XF86_APM_CRITICAL_RESUME: - case XF86_APM_STANDBY_FAILED: - case XF86_APM_SUSPEND_FAILED: - xf86Msg(X_WARNING, "Got RESUME\n"); - if (ioctl( fd, APM_IOC_RESUME, NULL ) == 0) - return PM_CONTINUE; - else { - xf86Msg(X_WARNING, "sunPMConfirmEventToOs: APM_IOC_RESUME" - " %s\n", strerror(errno)); - return PM_FAILED; - } - default: - return PM_NONE; - } -} - -PMClose -xf86OSPMOpen(void) -{ - int fd; - - if (APMihPtr || !xf86Info.pmFlag) { - return NULL; - } - - if ((fd = open(APM_DEVICE, O_RDWR)) == -1) { - if ((fd = open(APM_DEVICE1, O_RDWR)) == -1) { - return NULL; - } - } - xf86PMGetEventFromOs = sunPMGetEventFromOS; - xf86PMConfirmEventToOs = sunPMConfirmEventToOs; - APMihPtr = xf86AddGeneralHandler(fd, xf86HandlePMEvents, NULL); - return sunCloseAPM; -} - -static void -sunCloseAPM(void) -{ - int fd; - - if (APMihPtr) { - fd = xf86RemoveGeneralHandler(APMihPtr); - close(fd); - APMihPtr = NULL; - } -} +/* Based on hw/xfree86/os-support/bsd/bsd_apm.c which bore no explicit
+ * copyright notice, so is covered by the following notice:
+ *
+ * Copyright (C) 1994-2003 The XFree86 Project, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the XFree86 Project shall
+ * not be used in advertising or otherwise to promote the sale, use or other
+ * dealings in this Software without prior written authorization from the
+ * XFree86 Project.
+ */
+
+/* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include <X11/X.h>
+#include "os.h"
+#include "xf86.h"
+#include "xf86Priv.h"
+#define XF86_OS_PRIVS
+#include "xf86_OSproc.h"
+#include "xf86_OSlib.h"
+
+#ifndef PLEASE_FIX_THIS
+#define APM_STANDBY_REQ 0xa01
+#define APM_SUSPEND_REQ 0xa02
+#define APM_NORMAL_RESUME 0xa03
+#define APM_CRIT_RESUME 0xa04
+#define APM_BATTERY_LOW 0xa05
+#define APM_POWER_CHANGE 0xa06
+#define APM_UPDATE_TIME 0xa07
+#define APM_CRIT_SUSPEND_REQ 0xa08
+#define APM_USER_STANDBY_REQ 0xa09
+#define APM_USER_SUSPEND_REQ 0xa0a
+#define APM_SYS_STANDBY_RESUME 0xa0b
+#define APM_IOC_NEXTEVENT 0xa0c
+#define APM_IOC_RESUME 0xa0d
+#define APM_IOC_SUSPEND 0xa0e
+#define APM_IOC_STANDBY 0xa0f
+#endif
+
+typedef struct apm_event_info
+{
+ int type;
+} apm_event_info;
+
+/*
+ This may be replaced with a better device name
+ very soon...
+*/
+#define APM_DEVICE "/dev/srn"
+#define APM_DEVICE1 "/dev/apm"
+
+static pointer APMihPtr = NULL;
+static void sunCloseAPM(void);
+
+static struct {
+ u_int apmBsd;
+ pmEvent xf86;
+} sunToXF86Array [] = {
+ { APM_STANDBY_REQ, XF86_APM_SYS_STANDBY },
+ { APM_SUSPEND_REQ, XF86_APM_SYS_SUSPEND },
+ { APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME },
+ { APM_CRIT_RESUME, XF86_APM_CRITICAL_RESUME },
+ { APM_BATTERY_LOW, XF86_APM_LOW_BATTERY },
+ { APM_POWER_CHANGE, XF86_APM_POWER_STATUS_CHANGE },
+ { APM_UPDATE_TIME, XF86_APM_UPDATE_TIME },
+ { APM_CRIT_SUSPEND_REQ, XF86_APM_CRITICAL_SUSPEND },
+ { APM_USER_STANDBY_REQ, XF86_APM_USER_STANDBY },
+ { APM_USER_SUSPEND_REQ, XF86_APM_USER_SUSPEND },
+ { APM_SYS_STANDBY_RESUME, XF86_APM_STANDBY_RESUME },
+#ifdef APM_CAPABILITY_CHANGE
+ { APM_CAPABILITY_CHANGE, XF86_APM_CAPABILITY_CHANGED },
+#endif
+};
+
+#define numApmEvents (sizeof(sunToXF86Array) / sizeof(sunToXF86Array[0]))
+
+static pmEvent
+sunToXF86(int type)
+{
+ int i;
+
+ for (i = 0; i < numApmEvents; i++) {
+ if (type == sunToXF86Array[i].apmBsd) {
+ return sunToXF86Array[i].xf86;
+ }
+ }
+ return XF86_APM_UNKNOWN;
+}
+
+/*
+ * APM events can be requested direclty from /dev/apm
+ */
+static int
+sunPMGetEventFromOS(int fd, pmEvent *events, int num)
+{
+ struct apm_event_info sunEvent;
+ int i;
+
+ for (i = 0; i < num; i++) {
+
+ if (ioctl(fd, APM_IOC_NEXTEVENT, &sunEvent) < 0) {
+ if (errno != EAGAIN) {
+ xf86Msg(X_WARNING, "sunPMGetEventFromOS: APM_IOC_NEXTEVENT"
+ " %s\n", strerror(errno));
+ }
+ break;
+ }
+ events[i] = sunToXF86(sunEvent.type);
+ }
+ xf86Msg(X_WARNING, "Got some events\n");
+ return i;
+}
+
+static pmWait
+sunPMConfirmEventToOs(int fd, pmEvent event)
+{
+ switch (event) {
+/* XXX: NOT CURRENTLY RETURNED FROM OS */
+ case XF86_APM_SYS_STANDBY:
+ case XF86_APM_USER_STANDBY:
+ if (ioctl( fd, APM_IOC_STANDBY, NULL ) == 0)
+ return PM_WAIT; /* should we stop the Xserver in standby, too? */
+ else
+ return PM_NONE;
+ case XF86_APM_SYS_SUSPEND:
+ case XF86_APM_CRITICAL_SUSPEND:
+ case XF86_APM_USER_SUSPEND:
+ xf86Msg(X_WARNING, "Got SUSPENDED\n");
+ if (ioctl( fd, APM_IOC_SUSPEND, NULL ) == 0)
+ return PM_CONTINUE;
+ else {
+ xf86Msg(X_WARNING, "sunPMConfirmEventToOs: APM_IOC_SUSPEND"
+ " %s\n", strerror(errno));
+ return PM_FAILED;
+ }
+ case XF86_APM_STANDBY_RESUME:
+ case XF86_APM_NORMAL_RESUME:
+ case XF86_APM_CRITICAL_RESUME:
+ case XF86_APM_STANDBY_FAILED:
+ case XF86_APM_SUSPEND_FAILED:
+ xf86Msg(X_WARNING, "Got RESUME\n");
+ if (ioctl( fd, APM_IOC_RESUME, NULL ) == 0)
+ return PM_CONTINUE;
+ else {
+ xf86Msg(X_WARNING, "sunPMConfirmEventToOs: APM_IOC_RESUME"
+ " %s\n", strerror(errno));
+ return PM_FAILED;
+ }
+ default:
+ return PM_NONE;
+ }
+}
+
+PMClose
+xf86OSPMOpen(void)
+{
+ int fd;
+
+ if (APMihPtr || !xf86Info.pmFlag) {
+ return NULL;
+ }
+
+ if ((fd = open(APM_DEVICE, O_RDWR)) == -1) {
+ if ((fd = open(APM_DEVICE1, O_RDWR)) == -1) {
+ return NULL;
+ }
+ }
+ xf86PMGetEventFromOs = sunPMGetEventFromOS;
+ xf86PMConfirmEventToOs = sunPMConfirmEventToOs;
+ APMihPtr = xf86AddGeneralHandler(fd, xf86HandlePMEvents, NULL);
+ return sunCloseAPM;
+}
+
+static void
+sunCloseAPM(void)
+{
+ int fd;
+
+ if (APMihPtr) {
+ fd = xf86RemoveGeneralHandler(APMihPtr);
+ close(fd);
+ APMihPtr = NULL;
+ }
+}
diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_bell.c b/xorg-server/hw/xfree86/os-support/solaris/sun_bell.c index e064c9733..8cd4de25b 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/sun_bell.c +++ b/xorg-server/hw/xfree86/os-support/solaris/sun_bell.c @@ -1,4 +1,4 @@ -/* Copyright 2004-2005 Sun Microsystems, Inc. All rights reserved.
+/* Copyright (c) 2004-2005, Oracle and/or its affiliates. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_vid.c b/xorg-server/hw/xfree86/os-support/solaris/sun_vid.c index 1991289fd..b7b7c0ed7 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/sun_vid.c +++ b/xorg-server/hw/xfree86/os-support/solaris/sun_vid.c @@ -22,7 +22,7 @@ * OF THIS SOFTWARE.
*
*/
-/* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+/* Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
|