ia64/xen-unstable

changeset 8903:60aa296ccf4c

[IA64] Provides right frequency ratio and base for VTi domain

This patch handles the pal_freq_ratio and pal_freq_base request breaked
to Xen by GFW for VTi domain. and it fixed the wrong frequency ratio
and base of VTi domian. So,i with this patch, VTi domian can get the
right time ,itc,cpu frequency, freqency base and other kernel params rely
on right frequency_ratio.

Signed-off-by: Zhang xiantao <xiantao.zhang@intel.com>
Signed-off-by: Yu Ke <ke.yu@intel.com>
author awilliam@xenbuild.aw
date Thu Feb 23 15:40:18 2006 -0700 (2006-02-23)
parents 111af742e414
children 4f03ac87d31b
files xen/arch/ia64/vmx/pal_emul.c
line diff
     1.1 --- a/xen/arch/ia64/vmx/pal_emul.c	Sat Feb 18 21:25:31 2006 -0700
     1.2 +++ b/xen/arch/ia64/vmx/pal_emul.c	Thu Feb 23 15:40:18 2006 -0700
     1.3 @@ -19,6 +19,7 @@
     1.4   */
     1.5  
     1.6  #include <asm/vmx_vcpu.h>
     1.7 +#include <asm/pal.h>
     1.8  
     1.9  static void
    1.10  get_pal_parameters (VCPU *vcpu, UINT64 *gr29,
    1.11 @@ -180,10 +181,18 @@ pal_fixed_addr(VCPU *vcpu){
    1.12  
    1.13  static struct ia64_pal_retval
    1.14  pal_freq_base(VCPU *vcpu){
    1.15 +    struct ia64_pal_retval result;
    1.16 +
    1.17 +    PAL_CALL(result,PAL_FREQ_BASE, 0, 0, 0);
    1.18 +    return result;
    1.19  }
    1.20  
    1.21  static struct ia64_pal_retval
    1.22  pal_freq_ratios(VCPU *vcpu){
    1.23 +    struct ia64_pal_retval result;
    1.24 +
    1.25 +    PAL_CALL(result,PAL_FREQ_RATIOS, 0, 0, 0);
    1.26 +    return result;
    1.27  }
    1.28  
    1.29  static struct ia64_pal_retval
    1.30 @@ -266,11 +275,19 @@ pal_emul( VCPU *vcpu) {
    1.31  		case PAL_CACHE_WRITE:
    1.32  			result = pal_cache_write (vcpu);
    1.33  			break;
    1.34 -			
    1.35 +
    1.36  		case PAL_PLATFORM_ADDR:
    1.37  			result = pal_platform_addr (vcpu);
    1.38  			break;
    1.39  
    1.40 +		case PAL_FREQ_RATIOS:
    1.41 +			result = pal_freq_ratios (vcpu);
    1.42 +			break;
    1.43 +
    1.44 +		case PAL_FREQ_BASE:
    1.45 +			result = pal_freq_base (vcpu);
    1.46 +			break;
    1.47 +
    1.48  		default:
    1.49  			panic("pal_emul(): guest call unsupported pal" );
    1.50    }