[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-3.4-testing] minios: Clean up and remove Linux remnants from x86_64.S
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1244109251 -3600 # Node ID 549956f395d444f2a4cdac3830ed2abf750069fa # Parent be44729000d345b41be1741492619e89f35eb69b minios: Clean up and remove Linux remnants from x86_64.S Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx> xen-unstable changeset: 19711:2e522b843a21 xen-unstable date: Wed Jun 03 18:27:05 2009 +0100 minios: Introduce BSD license COPYING file Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> xen-unstable changeset: 19712:7a215fae6f1f xen-unstable date: Thu Jun 04 10:35:03 2009 +0100 --- COPYING | 13 ++- extras/mini-os/COPYING | 23 ++++++ extras/mini-os/arch/x86/x86_64.S | 131 +++++---------------------------------- 3 files changed, 50 insertions(+), 117 deletions(-) diff -r be44729000d3 -r 549956f395d4 COPYING --- a/COPYING Thu Jun 04 10:53:21 2009 +0100 +++ b/COPYING Thu Jun 04 10:54:11 2009 +0100 @@ -17,12 +17,13 @@ GPL when distributed separately or inclu GPL when distributed separately or included in software packages outside this repository. Instead we specify a much more relaxed BSD-style license. Affected files include the Xen interface headers -(xen/include/public/COPYING), and various drivers, support functions -and header files within the Linux source trees on -http://xenbits.xensource.com/linux-2.6.X-xen.hg. In all such cases, -license terms are stated at the top of the file or in a COPYING file -in the same directory. Note that _any_ file that is modified and then -distributed within a Linux kernel is still subject to the GNU GPL. +(xen/include/public/COPYING), MiniOS (extras/mini-os) and various +drivers, support functions and header files within the Linux source +trees on http://xenbits.xensource.com/linux-2.6.X-xen.hg. +In all such cases, license terms are stated at the top of the file or in +a COPYING file in the same directory. Note that _any_ file that is +modified and then distributed within a Linux kernel is still subject to +the GNU GPL. -- Keir Fraser (on behalf of the Xen team) diff -r be44729000d3 -r 549956f395d4 extras/mini-os/COPYING --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extras/mini-os/COPYING Thu Jun 04 10:54:11 2009 +0100 @@ -0,0 +1,23 @@ +Copyright (c) 2009 Citrix Systems, Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + diff -r be44729000d3 -r 549956f395d4 extras/mini-os/arch/x86/x86_64.S --- a/extras/mini-os/arch/x86/x86_64.S Thu Jun 04 10:53:21 2009 +0100 +++ b/extras/mini-os/arch/x86/x86_64.S Thu Jun 04 10:54:11 2009 +0100 @@ -46,88 +46,21 @@ NMI_MASK = 0x80000000 #define ORIG_RAX 120 /* + error_code */ #define EFLAGS 144 -#define REST_SKIP 6*8 -.macro SAVE_REST - subq $REST_SKIP,%rsp -# CFI_ADJUST_CFA_OFFSET REST_SKIP - movq %rbx,5*8(%rsp) -# CFI_REL_OFFSET rbx,5*8 - movq %rbp,4*8(%rsp) -# CFI_REL_OFFSET rbp,4*8 - movq %r12,3*8(%rsp) -# CFI_REL_OFFSET r12,3*8 - movq %r13,2*8(%rsp) -# CFI_REL_OFFSET r13,2*8 - movq %r14,1*8(%rsp) -# CFI_REL_OFFSET r14,1*8 - movq %r15,(%rsp) -# CFI_REL_OFFSET r15,0*8 -.endm - - -.macro RESTORE_REST - movq (%rsp),%r15 -# CFI_RESTORE r15 - movq 1*8(%rsp),%r14 -# CFI_RESTORE r14 - movq 2*8(%rsp),%r13 -# CFI_RESTORE r13 - movq 3*8(%rsp),%r12 -# CFI_RESTORE r12 - movq 4*8(%rsp),%rbp -# CFI_RESTORE rbp - movq 5*8(%rsp),%rbx -# CFI_RESTORE rbx - addq $REST_SKIP,%rsp -# CFI_ADJUST_CFA_OFFSET -(REST_SKIP) -.endm - - -#define ARG_SKIP 9*8 -.macro RESTORE_ARGS skiprax=0,addskip=0,skiprcx=0,skipr11=0,skipr8910=0,skiprdx=0 - .if \skipr11 - .else +.macro RESTORE_ALL movq (%rsp),%r11 -# CFI_RESTORE r11 - .endif - .if \skipr8910 - .else movq 1*8(%rsp),%r10 -# CFI_RESTORE r10 movq 2*8(%rsp),%r9 -# CFI_RESTORE r9 movq 3*8(%rsp),%r8 -# CFI_RESTORE r8 - .endif - .if \skiprax - .else movq 4*8(%rsp),%rax -# CFI_RESTORE rax - .endif - .if \skiprcx - .else movq 5*8(%rsp),%rcx -# CFI_RESTORE rcx - .endif - .if \skiprdx - .else movq 6*8(%rsp),%rdx -# CFI_RESTORE rdx - .endif movq 7*8(%rsp),%rsi -# CFI_RESTORE rsi movq 8*8(%rsp),%rdi -# CFI_RESTORE rdi - .if ARG_SKIP+\addskip > 0 - addq $ARG_SKIP+\addskip,%rsp -# CFI_ADJUST_CFA_OFFSET -(ARG_SKIP+\addskip) - .endif + addq $9*8+8,%rsp .endm .macro HYPERVISOR_IRET flag -# testb $3,1*8(%rsp) /* Don't need to do that in Mini-os, as */ -# jnz 2f /* there is no userspace? */ testl $NMI_MASK,2*8(%rsp) jnz 2f @@ -150,44 +83,25 @@ 2: /* Slow iret via hypervisor. */ * and the exception handler in %rax. */ ENTRY(error_entry) -# _frame RDI /* rdi slot contains rax, oldrax contains error code */ cld subq $14*8,%rsp -# CFI_ADJUST_CFA_OFFSET (14*8) movq %rsi,13*8(%rsp) -# CFI_REL_OFFSET rsi,RSI movq 14*8(%rsp),%rsi /* load rax from rdi slot */ movq %rdx,12*8(%rsp) -# CFI_REL_OFFSET rdx,RDX movq %rcx,11*8(%rsp) -# CFI_REL_OFFSET rcx,RCX movq %rsi,10*8(%rsp) /* store rax */ -# CFI_REL_OFFSET rax,RAX movq %r8, 9*8(%rsp) -# CFI_REL_OFFSET r8,R8 movq %r9, 8*8(%rsp) -# CFI_REL_OFFSET r9,R9 movq %r10,7*8(%rsp) -# CFI_REL_OFFSET r10,R10 movq %r11,6*8(%rsp) -# CFI_REL_OFFSET r11,R11 movq %rbx,5*8(%rsp) -# CFI_REL_OFFSET rbx,RBX movq %rbp,4*8(%rsp) -# CFI_REL_OFFSET rbp,RBP movq %r12,3*8(%rsp) -# CFI_REL_OFFSET r12,R12 movq %r13,2*8(%rsp) -# CFI_REL_OFFSET r13,R13 movq %r14,1*8(%rsp) -# CFI_REL_OFFSET r14,R14 movq %r15,(%rsp) -# CFI_REL_OFFSET r15,R15 -#if 0 - cmpl $__KERNEL_CS,CS(%rsp) - je error_kernelspace -#endif + error_call_handler: movq %rdi, RDI(%rsp) movq %rsp,%rdi @@ -197,29 +111,22 @@ error_call_handler: jmp error_exit .macro zeroentry sym -# INTR_FRAME movq (%rsp),%rcx movq 8(%rsp),%r11 addq $0x10,%rsp /* skip rcx and r11 */ pushq $0 /* push error code/oldrax */ -# CFI_ADJUST_CFA_OFFSET 8 pushq %rax /* push real oldrax to the rdi slot */ -# CFI_ADJUST_CFA_OFFSET 8 leaq \sym(%rip),%rax jmp error_entry -# CFI_ENDPROC .endm .macro errorentry sym -# XCPT_FRAME movq (%rsp),%rcx movq 8(%rsp),%r11 addq $0x10,%rsp /* rsp points to the error code */ pushq %rax -# CFI_ADJUST_CFA_OFFSET 8 leaq \sym(%rip),%rax jmp error_entry -# CFI_ENDPROC .endm #define XEN_GET_VCPU_INFO(reg) movq HYPERVISOR_shared_info,reg @@ -253,7 +160,6 @@ 11: movq %gs:8,%rax decl %gs:0 jmp error_exit -# ALIGN restore_all_enable_events: XEN_UNBLOCK_EVENTS(%rsi) # %rsi is already set up... @@ -261,12 +167,18 @@ scrit: /**** START OF CRITICAL REGION ** XEN_TEST_PENDING(%rsi) jnz 14f # process more events if necessary... XEN_PUT_VCPU_INFO(%rsi) - RESTORE_ARGS 0,8,0 + RESTORE_ALL HYPERVISOR_IRET 0 14: XEN_LOCKED_BLOCK_EVENTS(%rsi) XEN_PUT_VCPU_INFO(%rsi) - SAVE_REST + subq $6*8,%rsp + movq %rbx,5*8(%rsp) + movq %rbp,4*8(%rsp) + movq %r12,3*8(%rsp) + movq %r13,2*8(%rsp) + movq %r14,1*8(%rsp) + movq %r15,(%rsp) movq %rsp,%rdi # set the argument again jmp 11b ecrit: /**** END OF CRITICAL REGION ****/ @@ -274,7 +186,7 @@ ecrit: /**** END OF CRITICAL REGION *** retint_kernel: retint_restore_args: - movl EFLAGS-REST_SKIP(%rsp), %eax + movl EFLAGS-6*8(%rsp), %eax shr $9, %eax # EAX[0] == IRET_EFLAGS.IF XEN_GET_VCPU_INFO(%rsi) andb evtchn_upcall_mask(%rsi),%al @@ -282,13 +194,18 @@ retint_restore_args: jnz restore_all_enable_events # != 0 => enable event delivery XEN_PUT_VCPU_INFO(%rsi) - RESTORE_ARGS 0,8,0 + RESTORE_ALL HYPERVISOR_IRET 0 error_exit: - RESTORE_REST -/* cli */ + movq (%rsp),%r15 + movq 1*8(%rsp),%r14 + movq 2*8(%rsp),%r13 + movq 3*8(%rsp),%r12 + movq 4*8(%rsp),%rbp + movq 5*8(%rsp),%rbx + addq $6*8,%rsp XEN_BLOCK_EVENTS(%rsi) jmp retint_kernel @@ -313,17 +230,11 @@ ENTRY(device_not_available) ENTRY(debug) -# INTR_FRAME -# CFI_ADJUST_CFA_OFFSET 8 */ zeroentry do_debug -# CFI_ENDPROC ENTRY(int3) -# INTR_FRAME -# CFI_ADJUST_CFA_OFFSET 8 */ zeroentry do_int3 -# CFI_ENDPROC ENTRY(overflow) zeroentry do_overflow @@ -351,9 +262,7 @@ ENTRY(segment_not_present) /* runs on exception stack */ ENTRY(stack_segment) -# XCPT_FRAME errorentry do_stack_segment -# CFI_ENDPROC ENTRY(general_protection) _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |