1
/* -*- Mode:ASM; c-basic-offset:4; tab-width:4; indent-tabs-mode:nil -*- */
3
* vmx_vsa.c: Call PAL virtualization services.
4
* Copyright (c) 2005, Intel Corporation.
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.
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
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.
19
* Arun Sharma <arun.sharma@intel.com>
20
* Xuefei Xu (Anthony Xu) (Anthony.xu@intel.com)
23
#include <asm/asmmacro.h>
29
* extern UINT64 ia64_call_vsa(UINT64 proc,UINT64 arg1, UINT64 arg2,
30
* UINT64 arg3, UINT64 arg4, UINT64 arg5,
31
* UINT64 arg6, UINT64 arg7);
33
* XXX: The currently defined services use only 4 args at the max. The
34
* rest are not consumed.
36
GLOBAL_ENTRY(ia64_call_vsa)
45
alloc pfssave=ar.pfs,4,4,0,0
47
movl entry=@gprel(__vsa_base)
49
mov r25=in1 // copy arguments
55
tbit.nz p6,p0=psrsave,14 // IA64_PSR_I
56
tbit.nz p7,p0=psrsave,13 // IA64_PSR_IC
58
ld8 entry=[entry] // read entry point
60
add hostret=2f-1b,hostret // calculate return address
67
br.cond.sptk b6 // call the service
69
// Architectural sequence for enabling interrupts if necessary