direct-io.hg

changeset 15110:eabda101b0c5

[IA64] Implemented PAL_FIXED_ADDR

The Intel GFW still calls this, so we might as well implemented it.
Based on patch from Anthony and Wing, adds additional cleanups and
toning down of some of the error messages.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author Alex Williamson <alex.williamson@hp.com>
date Tue May 08 13:12:52 2007 -0600 (2007-05-08)
parents c4755f856627
children d431761a032a
files xen/arch/ia64/xen/fw_emul.c
line diff
     1.1 --- a/xen/arch/ia64/xen/fw_emul.c	Tue May 08 10:51:05 2007 -0600
     1.2 +++ b/xen/arch/ia64/xen/fw_emul.c	Tue May 08 13:12:52 2007 -0600
     1.3 @@ -512,12 +512,13 @@ xen_pal_emulator(unsigned long index, u6
     1.4  				(struct pal_freq_ratio *) &r11);
     1.5  		break;
     1.6  	    case PAL_PTCE_INFO:
     1.7 -		{
     1.8 -			// return hard-coded xen-specific values because ptc.e
     1.9 -			// is emulated on xen to always flush everything
    1.10 -			// these values result in only one ptc.e instruction
    1.11 -			status = 0; r9 = 0; r10 = (1L << 32) | 1L; r11 = 0;
    1.12 -		}
    1.13 +		/*
    1.14 +		 * return hard-coded xen-specific values because ptc.e
    1.15 +		 * is emulated on xen to always flush everything
    1.16 +		 * these values result in only one ptc.e instruction
    1.17 +		 */
    1.18 +		status = PAL_STATUS_SUCCESS;
    1.19 +		r10 = (1L << 32) | 1L;
    1.20  		break;
    1.21  	    case PAL_VERSION:
    1.22  		status = ia64_pal_version(
    1.23 @@ -620,14 +621,11 @@ xen_pal_emulator(unsigned long index, u6
    1.24  			/* Only support PAGE_SIZE tc.  */
    1.25  			r10 = PAGE_SIZE;
    1.26  			status = PAL_STATUS_SUCCESS;
    1.27 -		}
    1.28 -	        else
    1.29 +		} else
    1.30  			status = PAL_STATUS_EINVAL;
    1.31  		break;
    1.32  	    case PAL_RSE_INFO:
    1.33 -		status = ia64_pal_rse_info(
    1.34 -				&r9,
    1.35 -				(pal_hints_u_t *) &r10);
    1.36 +		status = ia64_pal_rse_info(&r9, (pal_hints_u_t *)&r10);
    1.37  		break;
    1.38  	    case PAL_REGISTER_INFO:
    1.39  		status = ia64_pal_register_info(in1, &r9, &r10);
    1.40 @@ -699,13 +697,14 @@ xen_pal_emulator(unsigned long index, u6
    1.41  		{
    1.42  			pal_cache_config_info_t ci;
    1.43  			status = ia64_pal_cache_config_info(in1,in2,&ci);
    1.44 -			if (status != 0) break;
    1.45 +			if (status != 0)
    1.46 +				break;
    1.47  			r9 = ci.pcci_info_1.pcci1_data;
    1.48  			r10 = ci.pcci_info_2.pcci2_data;
    1.49  		}
    1.50  		break;
    1.51  	    case PAL_VM_TR_READ:	/* FIXME: vcpu_get_tr?? */
    1.52 -		printk("PAL_VM_TR_READ NOT IMPLEMENTED, IGNORED!\n");
    1.53 +		printk("%s: PAL_VM_TR_READ unimplmented, ignored\n", __func__);
    1.54  		break;
    1.55  	    case PAL_HALT_INFO:
    1.56  	        {
    1.57 @@ -744,12 +743,15 @@ xen_pal_emulator(unsigned long index, u6
    1.58  		if (VMX_DOMAIN(current))
    1.59  			status = PAL_STATUS_SUCCESS;
    1.60  		break;
    1.61 +	    case PAL_FIXED_ADDR:
    1.62 +		status = PAL_STATUS_SUCCESS;
    1.63 +		r9 = current->vcpu_id;
    1.64 +		break;
    1.65  	    case PAL_LOGICAL_TO_PHYSICAL:
    1.66  		/* Optional, no need to complain about being unimplemented */
    1.67  		break;
    1.68  	    default:
    1.69 -		printk("xen_pal_emulator: UNIMPLEMENTED PAL CALL %lu!!!!\n",
    1.70 -				index);
    1.71 +		printk("%s: Unimplemented PAL Call %lu\n", __func__, index);
    1.72  		break;
    1.73  	}
    1.74  	return ((struct ia64_pal_retval) {status, r9, r10, r11});