ia64/xen-unstable

changeset 16288:41c1731c9125

[IA64] Implement some PAL procedures

This patch implements:
- PAL_PREFETCH_VISIBILITY
- PAL_MC_DRAIN
- PAL_BRAND_INFO
- PAL_GET_PSTATE
- PAL_CACHE_SHARED_INFO

These PAL procedures are necessary for Windows 2008.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
author Alex Williamson <alex.williamson@hp.com>
date Thu Nov 01 09:00:27 2007 -0600 (2007-11-01)
parents b235b68a0f4f
children 4255ca79f9d9
files xen/arch/ia64/xen/fw_emul.c
line diff
     1.1 --- a/xen/arch/ia64/xen/fw_emul.c	Thu Nov 01 08:55:01 2007 -0600
     1.2 +++ b/xen/arch/ia64/xen/fw_emul.c	Thu Nov 01 09:00:27 2007 -0600
     1.3 @@ -589,6 +589,19 @@ remote_pal_cache_flush(void *v)
     1.4  		args->status = status;
     1.5  }
     1.6  
     1.7 +static void
     1.8 +remote_pal_prefetch_visibility(void *v)
     1.9 +{
    1.10 +	s64 trans_type = (s64)v;
    1.11 +	ia64_pal_prefetch_visibility(trans_type);
    1.12 +}
    1.13 +
    1.14 +static void
    1.15 +remote_pal_mc_drain(void *v)
    1.16 +{
    1.17 +	ia64_pal_mc_drain();
    1.18 +}
    1.19 +
    1.20  struct ia64_pal_retval
    1.21  xen_pal_emulator(unsigned long index, u64 in1, u64 in2, u64 in3)
    1.22  {
    1.23 @@ -850,7 +863,35 @@ xen_pal_emulator(unsigned long index, u6
    1.24  		status = PAL_STATUS_SUCCESS;
    1.25  		r9 = current->vcpu_id;
    1.26  		break;
    1.27 +	    case PAL_PREFETCH_VISIBILITY:
    1.28 +		status = ia64_pal_prefetch_visibility(in1);
    1.29 +		if (status == 0) {
    1.30 +			/* must be performed on all remote processors 
    1.31 +			   in the coherence domain. */
    1.32 +			smp_call_function(remote_pal_prefetch_visibility,
    1.33 +					  (void *)in1, 1, 1);
    1.34 +			status = 1; /* no more necessary on remote processor */
    1.35 +		}
    1.36 +		break;
    1.37 +	    case PAL_MC_DRAIN:
    1.38 +		status = ia64_pal_mc_drain();
    1.39 +		/* FIXME: All vcpus likely call PAL_MC_DRAIN.
    1.40 +		   That causes the congestion. */
    1.41 +		smp_call_function(remote_pal_mc_drain, NULL, 1, 1);
    1.42 +		break;
    1.43 +	    case PAL_BRAND_INFO:
    1.44 +		if (in1 == 0) {
    1.45 +			char brand_info[128];
    1.46 +			status = ia64_pal_get_brand_info(brand_info);
    1.47 +			if (status == PAL_STATUS_SUCCESS)
    1.48 +				copy_to_user((void *)in2, brand_info, 128);
    1.49 +		} else {
    1.50 +			status = PAL_STATUS_EINVAL;
    1.51 +		}
    1.52 +		break;
    1.53  	    case PAL_LOGICAL_TO_PHYSICAL:
    1.54 +	    case PAL_GET_PSTATE:
    1.55 +	    case PAL_CACHE_SHARED_INFO:
    1.56  		/* Optional, no need to complain about being unimplemented */
    1.57  		break;
    1.58  	    default: