ia64/xen-unstable

changeset 15622:0d291a7c8c1f

[host s3] Retrieve necessary sleep information from plain-text ACPI
tables (FADT/FACS), and keep one hypercall remained for sleep
notification.

Signed-off-by: Ke Yu <ke.yu@intel.com>
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Thu Jul 19 12:53:32 2007 +0100 (2007-07-19)
parents f191aa8ac8ea
children 858b9bc8d0e6
files xen/arch/x86/acpi/boot.c xen/arch/x86/acpi/power.c xen/arch/x86/acpi/suspend.c xen/arch/x86/platform_hypercall.c xen/drivers/acpi/tables.c xen/include/asm-x86/acpi.h xen/include/public/platform.h xen/include/xen/acpi.h
line diff
     1.1 --- a/xen/arch/x86/acpi/boot.c	Thu Jul 19 10:59:05 2007 +0100
     1.2 +++ b/xen/arch/x86/acpi/boot.c	Thu Jul 19 12:53:32 2007 +0100
     1.3 @@ -369,6 +369,95 @@ static int __init acpi_parse_hpet(unsign
     1.4  extern u32 pmtmr_ioport;
     1.5  #endif
     1.6  
     1.7 +#ifdef CONFIG_ACPI_SLEEP
     1.8 +/* Get pm1x_cnt and pm1x_evt information for ACPI sleep */
     1.9 +static int __init
    1.10 +acpi_fadt_parse_sleep_info(struct fadt_descriptor_rev2 *fadt)
    1.11 +{
    1.12 +	struct facs_descriptor_rev2 *facs = NULL;
    1.13 +	uint64_t facs_pa;
    1.14 +
    1.15 +	if (fadt->revision >= FADT2_REVISION_ID) {
    1.16 +		/* Sanity check on FADT Rev. 2 */
    1.17 +		if ((fadt->xpm1a_cnt_blk.address_space_id !=
    1.18 +		     ACPI_ADR_SPACE_SYSTEM_IO) ||
    1.19 +		    (fadt->xpm1b_cnt_blk.address_space_id !=
    1.20 +		     ACPI_ADR_SPACE_SYSTEM_IO) ||
    1.21 +		    (fadt->xpm1a_evt_blk.address_space_id !=
    1.22 +		     ACPI_ADR_SPACE_SYSTEM_IO) ||
    1.23 +		    (fadt->xpm1b_evt_blk.address_space_id !=
    1.24 +		     ACPI_ADR_SPACE_SYSTEM_IO))
    1.25 +			goto bad; 
    1.26 +
    1.27 +		acpi_sinfo.pm1a_cnt = (uint16_t)fadt->xpm1a_cnt_blk.address;
    1.28 +		acpi_sinfo.pm1b_cnt = (uint16_t)fadt->xpm1b_cnt_blk.address;
    1.29 +		acpi_sinfo.pm1a_evt = (uint16_t)fadt->xpm1a_evt_blk.address;
    1.30 +		acpi_sinfo.pm1b_evt = (uint16_t)fadt->xpm1b_evt_blk.address;
    1.31 +	}
    1.32 +
    1.33 +	if (!acpi_sinfo.pm1a_cnt)
    1.34 +		acpi_sinfo.pm1a_cnt = (uint16_t)fadt->V1_pm1a_cnt_blk;
    1.35 +	if (!acpi_sinfo.pm1b_cnt)
    1.36 +		acpi_sinfo.pm1b_cnt = (uint16_t)fadt->V1_pm1b_cnt_blk;
    1.37 +	if (!acpi_sinfo.pm1a_evt)
    1.38 +		acpi_sinfo.pm1a_evt = (uint16_t)fadt->V1_pm1a_evt_blk;
    1.39 +	if (!acpi_sinfo.pm1b_evt)
    1.40 +		acpi_sinfo.pm1b_evt = (uint16_t)fadt->V1_pm1b_evt_blk;
    1.41 +
    1.42 +	/* Now FACS... */
    1.43 +	if (fadt->revision >= FADT2_REVISION_ID)
    1.44 +		facs_pa = fadt->xfirmware_ctrl;
    1.45 +	else
    1.46 +		facs_pa = (uint64_t)fadt->V1_firmware_ctrl;
    1.47 +
    1.48 +	facs = (struct facs_descriptor_rev2 *)
    1.49 +		__acpi_map_table(facs_pa, sizeof(struct facs_descriptor_rev2));
    1.50 +	if (!facs)
    1.51 +		goto bad;
    1.52 +
    1.53 +	if (strncmp(facs->signature, "FACS", 4)) {
    1.54 +		printk(KERN_ERR PREFIX "Invalid FACS signature %s\n",
    1.55 +			facs->signature);
    1.56 +		goto bad;
    1.57 +	}
    1.58 +
    1.59 +	if (facs->length < 24) {
    1.60 +		printk(KERN_ERR PREFIX "Invalid FACS table length: 0x%x",
    1.61 +			facs->length);
    1.62 +		goto bad;
    1.63 +	}
    1.64 +
    1.65 +	if (facs->length < 64)
    1.66 +		printk(KERN_WARNING PREFIX
    1.67 +			"FACS is shorter than ACPI spec allow: 0x%x",
    1.68 +			facs->length);
    1.69 +
    1.70 +	if ((acpi_rsdp_rev < 2) ||
    1.71 +	    (facs->length < 32)) {
    1.72 +		acpi_sinfo.wakeup_vector = facs_pa + 
    1.73 +			offsetof(struct facs_descriptor_rev2,
    1.74 +				 firmware_waking_vector);
    1.75 +		acpi_sinfo.vector_width = 32;
    1.76 +	} else {
    1.77 +		acpi_sinfo.wakeup_vector = facs_pa +
    1.78 +			offsetof(struct facs_descriptor_rev2,
    1.79 +				 xfirmware_waking_vector);
    1.80 +		acpi_sinfo.vector_width = 64;
    1.81 +	}
    1.82 +
    1.83 +	printk (KERN_INFO PREFIX
    1.84 +		"ACPI SLEEP INFO: pm1x_cnt[%x,%x], pm1x_evt[%x,%x]\n"
    1.85 +		"                 wakeup_vec[%"PRIx64"], vec_size[%x]\n",
    1.86 +		acpi_sinfo.pm1a_cnt, acpi_sinfo.pm1b_cnt,
    1.87 +		acpi_sinfo.pm1a_evt, acpi_sinfo.pm1b_cnt,
    1.88 +		acpi_sinfo.wakeup_vector, acpi_sinfo.vector_width);
    1.89 +	return 0;
    1.90 +bad:
    1.91 +	memset(&acpi_sinfo, 0, sizeof(acpi_sinfo));
    1.92 +	return 0;
    1.93 +}
    1.94 +#endif
    1.95 +
    1.96  static int __init acpi_parse_fadt(unsigned long phys, unsigned long size)
    1.97  {
    1.98  	struct fadt_descriptor_rev2 *fadt = NULL;
    1.99 @@ -413,6 +502,10 @@ static int __init acpi_parse_fadt(unsign
   1.100  		printk(KERN_INFO PREFIX "PM-Timer IO Port: %#x\n",
   1.101  		       pmtmr_ioport);
   1.102  #endif
   1.103 +
   1.104 +#ifdef CONFIG_ACPI_SLEEP
   1.105 +	acpi_fadt_parse_sleep_info(fadt);
   1.106 +#endif
   1.107  	return 0;
   1.108  }
   1.109  
     2.1 --- a/xen/arch/x86/acpi/power.c	Thu Jul 19 10:59:05 2007 +0100
     2.2 +++ b/xen/arch/x86/acpi/power.c	Thu Jul 19 12:53:32 2007 +0100
     2.3 @@ -28,20 +28,15 @@
     2.4  
     2.5  #define pmprintk(_l, _f, _a...) printk(_l "<PM>" _f, ## _a )
     2.6  
     2.7 -u8 sleep_states[ACPI_S_STATE_COUNT];
     2.8 -DEFINE_SPINLOCK(pm_lock);
     2.9 +static char opt_acpi_sleep[20];
    2.10 +string_param("acpi_sleep", opt_acpi_sleep);
    2.11  
    2.12 -struct acpi_sleep_info {
    2.13 -    uint16_t pm1a_cnt;
    2.14 -    uint16_t pm1b_cnt;
    2.15 -    uint16_t pm1a_evt;
    2.16 -    uint16_t pm1b_evt;
    2.17 -    uint16_t pm1a_cnt_val;
    2.18 -    uint16_t pm1b_cnt_val;
    2.19 -    uint32_t sleep_state;
    2.20 -} acpi_sinfo;
    2.21 +static u8 sleep_states[ACPI_S_STATE_COUNT];
    2.22 +static DEFINE_SPINLOCK(pm_lock);
    2.23  
    2.24 -extern void do_suspend_lowlevel(void);
    2.25 +struct acpi_sleep_info acpi_sinfo;
    2.26 +
    2.27 +void do_suspend_lowlevel(void);
    2.28  
    2.29  static char *acpi_states[ACPI_S_STATE_COUNT] =
    2.30  {
    2.31 @@ -50,10 +45,6 @@ static char *acpi_states[ACPI_S_STATE_CO
    2.32      [ACPI_STATE_S4] = "disk",
    2.33  };
    2.34  
    2.35 -unsigned long acpi_video_flags;
    2.36 -unsigned long saved_videomode;
    2.37 -
    2.38 -/* XXX: Add suspend failure recover later */
    2.39  static int device_power_down(void)
    2.40  {
    2.41      console_suspend();
    2.42 @@ -100,8 +91,27 @@ static void thaw_domains(void)
    2.43              domain_unpause(d);
    2.44  }
    2.45  
    2.46 +static void acpi_sleep_prepare(u32 state)
    2.47 +{
    2.48 +    void *wakeup_vector_va;
    2.49 +
    2.50 +    if ( state != ACPI_STATE_S3 )
    2.51 +        return;
    2.52 +
    2.53 +    wakeup_vector_va = __acpi_map_table(
    2.54 +        acpi_sinfo.wakeup_vector, sizeof(uint64_t));
    2.55 +    if (acpi_sinfo.vector_width == 32)
    2.56 +        *(uint32_t *)wakeup_vector_va =
    2.57 +            (uint32_t)bootsym_phys(wakeup_start);
    2.58 +    else
    2.59 +        *(uint64_t *)wakeup_vector_va =
    2.60 +            (uint64_t)bootsym_phys(wakeup_start);
    2.61 +}
    2.62 +
    2.63 +static void acpi_sleep_post(u32 state) {}
    2.64 +
    2.65  /* Main interface to do xen specific suspend/resume */
    2.66 -int enter_state(u32 state)
    2.67 +static int enter_state(u32 state)
    2.68  {
    2.69      unsigned long flags;
    2.70      int error;
    2.71 @@ -123,6 +133,8 @@ int enter_state(u32 state)
    2.72      pmprintk(XENLOG_INFO, "PM: Preparing system for %s sleep\n",
    2.73          acpi_states[state]);
    2.74  
    2.75 +    acpi_sleep_prepare(state);
    2.76 +
    2.77      local_irq_save(flags);
    2.78  
    2.79      if ((error = device_power_down()))
    2.80 @@ -152,6 +164,8 @@ int enter_state(u32 state)
    2.81   Done:
    2.82      local_irq_restore(flags);
    2.83  
    2.84 +    acpi_sleep_post(state);
    2.85 +
    2.86      if ( !hvm_cpu_up() )
    2.87          BUG();
    2.88  
    2.89 @@ -161,30 +175,6 @@ int enter_state(u32 state)
    2.90  }
    2.91  
    2.92  /*
    2.93 - * Xen just requires address of pm1x_cnt, and ACPI interpreter
    2.94 - * is still kept in dom0. Address of xen wakeup stub will be
    2.95 - * returned, and then dom0 writes that address to FACS.
    2.96 - */
    2.97 -int set_acpi_sleep_info(struct xenpf_set_acpi_sleep *info)
    2.98 -{
    2.99 -    if (acpi_sinfo.pm1a_cnt)
   2.100 -        pmprintk(XENLOG_WARNING, "Multiple setting on acpi sleep info\n");
   2.101 -
   2.102 -    acpi_sinfo.pm1a_cnt = info->pm1a_cnt_port;
   2.103 -    acpi_sinfo.pm1b_cnt = info->pm1b_cnt_port;
   2.104 -    acpi_sinfo.pm1a_evt = info->pm1a_evt_port;
   2.105 -    acpi_sinfo.pm1b_evt = info->pm1b_evt_port;
   2.106 -    info->xen_waking_vec = (uint64_t)bootsym_phys(wakeup_start);
   2.107 -
   2.108 -    pmprintk(XENLOG_INFO, "pm1a[%x],pm1b[%x],pm1a_e[%x],pm1b_e[%x]"
   2.109 -                       "wake[%"PRIx64"]",
   2.110 -                       acpi_sinfo.pm1a_cnt, acpi_sinfo.pm1b_cnt,
   2.111 -                       acpi_sinfo.pm1a_evt, acpi_sinfo.pm1b_evt,
   2.112 -                       info->xen_waking_vec);
   2.113 -    return 0;
   2.114 -}
   2.115 -
   2.116 -/*
   2.117   * Dom0 issues this hypercall in place of writing pm1a_cnt. Xen then
   2.118   * takes over the control and put the system into sleep state really.
   2.119   * Also video flags and mode are passed here, in case user may use
   2.120 @@ -197,20 +187,23 @@ int set_acpi_sleep_info(struct xenpf_set
   2.121   */
   2.122  int acpi_enter_sleep(struct xenpf_enter_acpi_sleep *sleep)
   2.123  {
   2.124 -    if (!IS_PRIV(current->domain) || !acpi_sinfo.pm1a_cnt)
   2.125 +    if ( !IS_PRIV(current->domain) || !acpi_sinfo.pm1a_cnt )
   2.126          return -EPERM;
   2.127  
   2.128      /* Sanity check */
   2.129 -    if (acpi_sinfo.pm1b_cnt_val &&
   2.130 -        ((sleep->pm1a_cnt_val ^ sleep->pm1b_cnt_val) &
   2.131 -        ACPI_BITMASK_SLEEP_ENABLE))
   2.132 +    if ( acpi_sinfo.pm1b_cnt_val &&
   2.133 +         ((sleep->pm1a_cnt_val ^ sleep->pm1b_cnt_val) &
   2.134 +          ACPI_BITMASK_SLEEP_ENABLE) )
   2.135      {
   2.136          pmprintk(XENLOG_ERR, "Mismatched pm1a/pm1b setting\n");
   2.137          return -EINVAL;
   2.138      }
   2.139  
   2.140 +    if ( sleep->flags )
   2.141 +        return -EINVAL;
   2.142 +
   2.143      /* Write #1 */
   2.144 -    if (!(sleep->pm1a_cnt_val & ACPI_BITMASK_SLEEP_ENABLE))
   2.145 +    if ( !(sleep->pm1a_cnt_val & ACPI_BITMASK_SLEEP_ENABLE) )
   2.146      {
   2.147          outw((u16)sleep->pm1a_cnt_val, acpi_sinfo.pm1a_cnt);
   2.148          if (acpi_sinfo.pm1b_cnt)
   2.149 @@ -222,8 +215,6 @@ int acpi_enter_sleep(struct xenpf_enter_
   2.150      acpi_sinfo.pm1a_cnt_val = sleep->pm1a_cnt_val;
   2.151      acpi_sinfo.pm1b_cnt_val = sleep->pm1b_cnt_val;
   2.152      acpi_sinfo.sleep_state = sleep->sleep_state;
   2.153 -    acpi_video_flags = sleep->video_flags;
   2.154 -    saved_videomode = sleep->video_mode;
   2.155  
   2.156      return enter_state(acpi_sinfo.sleep_state);
   2.157  }
   2.158 @@ -247,7 +238,7 @@ acpi_status asmlinkage acpi_enter_sleep_
   2.159      outw((u16)acpi_sinfo.pm1a_cnt_val, acpi_sinfo.pm1a_cnt);
   2.160      if (acpi_sinfo.pm1b_cnt)
   2.161          outw((u16)acpi_sinfo.pm1b_cnt_val, acpi_sinfo.pm1b_cnt);
   2.162 -    
   2.163 +
   2.164      /* Wait until we enter sleep state, and spin until we wake */
   2.165      while (!acpi_get_wake_status());
   2.166      return_ACPI_STATUS(AE_OK);
   2.167 @@ -255,12 +246,24 @@ acpi_status asmlinkage acpi_enter_sleep_
   2.168  
   2.169  static int __init acpi_sleep_init(void)
   2.170  {
   2.171 -    int i = 0; 
   2.172 +    int i;
   2.173 +    char *p = opt_acpi_sleep;
   2.174 +
   2.175 +    while ( (p != NULL) && (*p != '\0') )
   2.176 +    {
   2.177 +        if ( !strncmp(p, "s3_bios", 7) )
   2.178 +            acpi_video_flags |= 1;
   2.179 +        if ( !strncmp(p, "s3_mode", 7) )
   2.180 +            acpi_video_flags |= 2;
   2.181 +        p = strchr(p, ',');
   2.182 +        if ( p != NULL )
   2.183 +            p += strspn(p, ", \t");
   2.184 +    }
   2.185  
   2.186      pmprintk(XENLOG_INFO, "ACPI (supports");
   2.187 -    for (i = 0; i < ACPI_S_STATE_COUNT; i++)
   2.188 +    for ( i = 0; i < ACPI_S_STATE_COUNT; i++ )
   2.189      {
   2.190 -        if (i == ACPI_STATE_S3)
   2.191 +        if ( i == ACPI_STATE_S3 )
   2.192          {
   2.193              sleep_states[i] = 1;
   2.194              printk(" S%d", i);
   2.195 @@ -269,6 +272,7 @@ static int __init acpi_sleep_init(void)
   2.196              sleep_states[i] = 0;
   2.197      }
   2.198      printk(")\n");
   2.199 +
   2.200      return 0;
   2.201  }
   2.202  __initcall(acpi_sleep_init);
     3.1 --- a/xen/arch/x86/acpi/suspend.c	Thu Jul 19 10:59:05 2007 +0100
     3.2 +++ b/xen/arch/x86/acpi/suspend.c	Thu Jul 19 12:53:32 2007 +0100
     3.3 @@ -35,9 +35,6 @@ void save_rest_processor_state(void)
     3.4      rdmsrl(MSR_CSTAR, saved_cstar);
     3.5      rdmsrl(MSR_LSTAR, saved_lstar);
     3.6  #endif
     3.7 -
     3.8 -    bootsym(video_flags) = acpi_video_flags;
     3.9 -    bootsym(video_mode) = saved_videomode;
    3.10  }
    3.11  
    3.12  #define loaddebug(_v,_reg) \
     4.1 --- a/xen/arch/x86/platform_hypercall.c	Thu Jul 19 10:59:05 2007 +0100
     4.2 +++ b/xen/arch/x86/platform_hypercall.c	Thu Jul 19 12:53:32 2007 +0100
     4.3 @@ -248,21 +248,9 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe
     4.4          }
     4.5          break;
     4.6  
     4.7 -#if 0
     4.8 -    case XENPF_set_acpi_sleep:
     4.9 -    {
    4.10 -        ret = set_acpi_sleep_info(&op->u.set_acpi_sleep);
    4.11 -        if (!ret && copy_to_guest(u_xenpf_op, op, 1))
    4.12 -            ret = -EFAULT;
    4.13 -    }
    4.14 -    break;
    4.15 -
    4.16      case XENPF_enter_acpi_sleep:
    4.17 -    {
    4.18          ret = acpi_enter_sleep(&op->u.enter_acpi_sleep);
    4.19 -    }
    4.20 -    break;
    4.21 -#endif
    4.22 +        break;
    4.23  
    4.24      default:
    4.25          ret = -ENOSYS;
     5.1 --- a/xen/drivers/acpi/tables.c	Thu Jul 19 10:59:05 2007 +0100
     5.2 +++ b/xen/drivers/acpi/tables.c	Thu Jul 19 12:53:32 2007 +0100
     5.3 @@ -73,6 +73,7 @@ struct acpi_table_sdt {
     5.4  
     5.5  static unsigned long sdt_pa;	/* Physical Address */
     5.6  static unsigned long sdt_count;	/* Table count */
     5.7 +unsigned char acpi_rsdp_rev;
     5.8  
     5.9  static struct acpi_table_sdt sdt_entry[ACPI_MAX_TABLES] __initdata;
    5.10  
    5.11 @@ -598,6 +599,8 @@ int __init acpi_table_init(void)
    5.12  	       "RSDP (v%3.3d %6.6s                                ) @ 0x%p\n",
    5.13  	       rsdp->revision, rsdp->oem_id, (void *)rsdp_phys);
    5.14  
    5.15 +	acpi_rsdp_rev = rsdp->revision;
    5.16 +
    5.17  	if (rsdp->revision < 2)
    5.18  		result =
    5.19  		    acpi_table_compute_checksum(rsdp,
     6.1 --- a/xen/include/asm-x86/acpi.h	Thu Jul 19 10:59:05 2007 +0100
     6.2 +++ b/xen/include/asm-x86/acpi.h	Thu Jul 19 12:53:32 2007 +0100
     6.3 @@ -173,15 +173,25 @@ extern unsigned long acpi_wakeup_address
     6.4  /* early initialization routine */
     6.5  extern void acpi_reserve_bootmem(void);
     6.6  
     6.7 -extern unsigned long acpi_video_flags;
     6.8 -extern unsigned long saved_videomode;
     6.9 -struct xenpf_set_acpi_sleep;
    6.10 +extern struct acpi_sleep_info acpi_sinfo;
    6.11 +#define acpi_video_flags bootsym(video_flags)
    6.12  struct xenpf_enter_acpi_sleep;
    6.13 -extern int set_acpi_sleep_info(struct xenpf_set_acpi_sleep *info);
    6.14  extern int acpi_enter_sleep(struct xenpf_enter_acpi_sleep *sleep);
    6.15  extern int acpi_enter_state(u32 state);
    6.16  
    6.17 -#endif /*CONFIG_ACPI_SLEEP*/
    6.18 +struct acpi_sleep_info {
    6.19 +    uint16_t pm1a_cnt;
    6.20 +    uint16_t pm1b_cnt;
    6.21 +    uint16_t pm1a_evt;
    6.22 +    uint16_t pm1b_evt;
    6.23 +    uint16_t pm1a_cnt_val;
    6.24 +    uint16_t pm1b_cnt_val;
    6.25 +    uint32_t sleep_state;
    6.26 +    uint64_t wakeup_vector;
    6.27 +    uint32_t vector_width;
    6.28 +};
    6.29 +
    6.30 +#endif /* CONFIG_ACPI_SLEEP */
    6.31  
    6.32  extern u8 x86_acpiid_to_apicid[];
    6.33  #define MAX_LOCAL_APIC 256
     7.1 --- a/xen/include/public/platform.h	Thu Jul 19 10:59:05 2007 +0100
     7.2 +++ b/xen/include/public/platform.h	Thu Jul 19 12:53:32 2007 +0100
     7.3 @@ -153,27 +153,13 @@ struct xenpf_firmware_info {
     7.4  typedef struct xenpf_firmware_info xenpf_firmware_info_t;
     7.5  DEFINE_XEN_GUEST_HANDLE(xenpf_firmware_info_t);
     7.6  
     7.7 -#define XENPF_set_acpi_sleep      51
     7.8 -struct xenpf_set_acpi_sleep {
     7.9 -    /* IN variables. */
    7.10 -    uint16_t pm1a_cnt_port;
    7.11 -    uint16_t pm1b_cnt_port;
    7.12 -    uint16_t pm1a_evt_port;
    7.13 -    uint16_t pm1b_evt_port;
    7.14 -    /* OUT variables */
    7.15 -    uint64_t xen_waking_vec;   /* Tell dom0 to set FACS waking vector */
    7.16 -};
    7.17 -typedef struct xenpf_set_acpi_sleep xenpf_set_acpi_sleep_t;
    7.18 -DEFINE_XEN_GUEST_HANDLE(xenpf_set_acpi_sleep_t);
    7.19 -
    7.20 -#define XENPF_enter_acpi_sleep    52
    7.21 +#define XENPF_enter_acpi_sleep    51
    7.22  struct xenpf_enter_acpi_sleep {
    7.23      /* IN variables */
    7.24 -    uint16_t pm1a_cnt_val;
    7.25 -    uint16_t pm1b_cnt_val;
    7.26 -    uint32_t sleep_state;       /* Which state to enter */
    7.27 -    uint32_t video_flags;       /* S3_bios or s3_mode */
    7.28 -    uint32_t video_mode;        /* Mode setting for s3_mode */
    7.29 +    uint16_t pm1a_cnt_val;      /* PM1a control value. */
    7.30 +    uint16_t pm1b_cnt_val;      /* PM1b control value. */
    7.31 +    uint32_t sleep_state;       /* Which state to enter (Sn). */
    7.32 +    uint32_t flags;             /* Must be zero. */
    7.33  };
    7.34  typedef struct xenpf_enter_acpi_sleep xenpf_enter_acpi_sleep_t;
    7.35  DEFINE_XEN_GUEST_HANDLE(xenpf_enter_acpi_sleep_t);
    7.36 @@ -189,7 +175,6 @@ struct xen_platform_op {
    7.37          struct xenpf_microcode_update  microcode;
    7.38          struct xenpf_platform_quirk    platform_quirk;
    7.39          struct xenpf_firmware_info     firmware_info;
    7.40 -        struct xenpf_set_acpi_sleep    set_acpi_sleep;
    7.41          struct xenpf_enter_acpi_sleep  enter_acpi_sleep;
    7.42          uint8_t                        pad[128];
    7.43      } u;
     8.1 --- a/xen/include/xen/acpi.h	Thu Jul 19 10:59:05 2007 +0100
     8.2 +++ b/xen/include/xen/acpi.h	Thu Jul 19 12:53:32 2007 +0100
     8.3 @@ -534,5 +534,6 @@ static inline int acpi_get_pxm(acpi_hand
     8.4  #endif
     8.5  
     8.6  extern int pnpacpi_disabled;
     8.7 +extern unsigned char acpi_rsdp_rev;
     8.8  
     8.9  #endif /*_LINUX_ACPI_H*/