~ressu/+junk/xen-ubuntu

« back to all changes in this revision

Viewing changes to xen/arch/ia64/vmx/vmx_vsa.S

  • Committer: sami at haahtinen
  • Author(s): Bastian Blank
  • Date: 2010-09-03 15:14:28 UTC
  • Revision ID: sami@haahtinen.name-20100903151428-f88eg54n2fdnak41
Tags: upstream-4.0.1
ImportĀ upstreamĀ versionĀ 4.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*-  Mode:ASM; c-basic-offset:4; tab-width:4; indent-tabs-mode:nil -*- */
 
2
/*
 
3
 * vmx_vsa.c: Call PAL virtualization services.
 
4
 * Copyright (c) 2005, Intel Corporation.
 
5
 *
 
6
 * This program is free software; you can redistribute it and/or modify it
 
7
 * under the terms and conditions of the GNU General Public License,
 
8
 * version 2, as published by the Free Software Foundation.
 
9
 *
 
10
 * This program is distributed in the hope it will be useful, but WITHOUT
 
11
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
12
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 
13
 * more details.
 
14
 *
 
15
 * You should have received a copy of the GNU General Public License along with
 
16
 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
 
17
 * Place - Suite 330, Boston, MA 02111-1307 USA.
 
18
 *
 
19
 *  Arun Sharma <arun.sharma@intel.com>
 
20
 *  Xuefei Xu (Anthony Xu) (Anthony.xu@intel.com)
 
21
 */
 
22
 
 
23
#include <asm/asmmacro.h>
 
24
 
 
25
 
 
26
    .text
 
27
 
 
28
/*
 
29
 * extern UINT64 ia64_call_vsa(UINT64 proc,UINT64 arg1, UINT64 arg2,
 
30
 *                  UINT64 arg3, UINT64 arg4, UINT64 arg5,
 
31
 *                  UINT64 arg6, UINT64 arg7);
 
32
 *
 
33
 * XXX: The currently defined services use only 4 args at the max. The
 
34
 *  rest are not consumed.
 
35
 */
 
36
GLOBAL_ENTRY(ia64_call_vsa)
 
37
    .regstk 4,4,0,0
 
38
 
 
39
rpsave  =   loc0
 
40
pfssave =   loc1
 
41
psrsave =   loc2
 
42
entry   =   loc3
 
43
hostret =   r24
 
44
 
 
45
    alloc   pfssave=ar.pfs,4,4,0,0
 
46
    mov rpsave=rp
 
47
    movl    entry=@gprel(__vsa_base)
 
48
1:  mov hostret=ip
 
49
    mov r25=in1         // copy arguments
 
50
    mov r26=in2
 
51
    mov r27=in3
 
52
    mov psrsave=psr
 
53
    ;;
 
54
    add entry=entry,gp
 
55
    tbit.nz p6,p0=psrsave,14    // IA64_PSR_I
 
56
    tbit.nz p7,p0=psrsave,13    // IA64_PSR_IC
 
57
    ;;
 
58
    ld8 entry=[entry]       // read entry point
 
59
    ;;
 
60
    add hostret=2f-1b,hostret   // calculate return address
 
61
    add entry=entry,in0
 
62
    ;;
 
63
    rsm psr.i | psr.ic
 
64
    ;;
 
65
    srlz.d
 
66
    mov b6=entry
 
67
    br.cond.sptk b6         // call the service
 
68
2:
 
69
    // Architectural sequence for enabling interrupts if necessary
 
70
(p7)    ssm psr.ic
 
71
    ;;
 
72
(p7)    srlz.d
 
73
    ;;
 
74
(p6)    ssm psr.i
 
75
    ;;
 
76
    mov rp=rpsave
 
77
    mov ar.pfs=pfssave
 
78
    mov r8=r31
 
79
    ;;
 
80
    srlz.d
 
81
    br.ret.sptk rp
 
82
 
 
83
END(ia64_call_vsa)
 
84