ia64/xen-unstable

changeset 14073:347fb33790bd

[IA64] SN2 specific SAL calls for dom0

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author awilliam@xenbuild2.aw
date Wed Feb 28 10:55:50 2007 -0700 (2007-02-28)
parents 2e2019e09e6c
children b3e19f3092b6
files xen/arch/ia64/xen/fw_emul.c
line diff
     1.1 --- a/xen/arch/ia64/xen/fw_emul.c	Wed Feb 28 10:35:48 2007 -0700
     1.2 +++ b/xen/arch/ia64/xen/fw_emul.c	Wed Feb 28 10:55:50 2007 -0700
     1.3 @@ -22,6 +22,7 @@
     1.4  #include <linux/efi.h>
     1.5  #include <asm/pal.h>
     1.6  #include <asm/sal.h>
     1.7 +#include <asm/sn/sn_sal.h>
     1.8  #include <asm/xenmca.h>
     1.9  
    1.10  #include <public/sched.h>
    1.11 @@ -131,6 +132,7 @@ sal_emulator (long index, unsigned long 
    1.12  	      unsigned long in3, unsigned long in4, unsigned long in5,
    1.13  	      unsigned long in6, unsigned long in7)
    1.14  {
    1.15 +	struct ia64_sal_retval ret_stuff;
    1.16  	unsigned long r9  = 0;
    1.17  	unsigned long r10 = 0;
    1.18  	long r11 = 0;
    1.19 @@ -375,8 +377,69 @@ sal_emulator (long index, unsigned long 
    1.20  	        if (!test_and_set_bit(_VCPUF_down, &current->vcpu_flags))
    1.21  			vcpu_sleep_nosync(current);
    1.22  		break;
    1.23 +	    case SN_SAL_GET_MASTER_NASID:
    1.24 +		status = -1;
    1.25 +		if (current->domain == dom0) {
    1.26 +			printk("*** Emulating SN_SAL_GET_MASTER_NASID ***\n");
    1.27 +			SAL_CALL_NOLOCK(ret_stuff, SN_SAL_GET_MASTER_NASID,
    1.28 +					0, 0, 0, 0, 0, 0, 0);
    1.29 +			status = ret_stuff.status;
    1.30 +			r9 = ret_stuff.v0;
    1.31 +			r10 = ret_stuff.v1;
    1.32 +			r11 = ret_stuff.v2;
    1.33 +		}
    1.34 +		break;
    1.35 +	    case SN_SAL_GET_KLCONFIG_ADDR:
    1.36 +		status = -1;
    1.37 +		if (current->domain == dom0) {
    1.38 +			printk("*** Emulating SN_SAL_GET_KLCONFIG_ADDR ***\n");
    1.39 +			SAL_CALL_NOLOCK(ret_stuff, SN_SAL_GET_KLCONFIG_ADDR,
    1.40 +					in1, 0, 0, 0, 0, 0, 0);
    1.41 +			status = ret_stuff.status;
    1.42 +			r9 = ret_stuff.v0;
    1.43 +			r10 = ret_stuff.v1;
    1.44 +			r11 = ret_stuff.v2;
    1.45 +		}
    1.46 +		break;
    1.47 +	    case SN_SAL_GET_SAPIC_INFO:
    1.48 +		status = -1;
    1.49 +		if (current->domain == dom0) {
    1.50 +			printk("*** Emulating SN_SAL_GET_SAPIC_INFO ***\n");
    1.51 +			SAL_CALL_NOLOCK(ret_stuff, SN_SAL_GET_SAPIC_INFO, in1,
    1.52 +					0, 0, 0, 0, 0, 0);
    1.53 +			status = ret_stuff.status;
    1.54 +			r9 = ret_stuff.v0;
    1.55 +			r10 = ret_stuff.v1;
    1.56 +			r11 = ret_stuff.v2;
    1.57 +		}
    1.58 +		break;
    1.59 +	    case SN_SAL_GET_SN_INFO:
    1.60 +		status = -1;
    1.61 +		if (current->domain == dom0) {
    1.62 +			printk("*** Emulating SN_SAL_GET_SN_INFO ***\n");
    1.63 +			SAL_CALL_NOLOCK(ret_stuff, SN_SAL_GET_SN_INFO, in1,
    1.64 +					0, 0, 0, 0, 0, 0);
    1.65 +			status = ret_stuff.status;
    1.66 +			r9 = ret_stuff.v0;
    1.67 +			r10 = ret_stuff.v1;
    1.68 +			r11 = ret_stuff.v2;
    1.69 +		}
    1.70 +		break;
    1.71 +	    case SN_SAL_IOIF_GET_HUBDEV_INFO:
    1.72 +		status = -1;
    1.73 +		if (current->domain == dom0) {
    1.74 +			printk("*** Emulating SN_SAL_IOIF_GET_HUBDEV_INFO ***\n");
    1.75 +			SAL_CALL_NOLOCK(ret_stuff, SN_SAL_IOIF_GET_HUBDEV_INFO,
    1.76 +					in1, in2, 0, 0, 0, 0, 0);
    1.77 +			status = ret_stuff.status;
    1.78 +			r9 = ret_stuff.v0;
    1.79 +			r10 = ret_stuff.v1;
    1.80 +			r11 = ret_stuff.v2;
    1.81 +		}
    1.82 +		break;
    1.83  	    default:
    1.84 -		printk("*** CALLED SAL_ WITH UNKNOWN INDEX.  IGNORED...\n");
    1.85 +		printk("*** CALLED SAL_ WITH UNKNOWN INDEX (%lx).  "
    1.86 +		       "IGNORED...\n", index);
    1.87  		status = -1;
    1.88  		break;
    1.89  	}