ia64/xen-unstable

changeset 17747:4c75850a0caa

hvmloader: No need to map shared_info page into the legacy VGA MMIO
hole. We can access address 0xfffff000 from 32-bit protected mode.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed May 28 10:02:00 2008 +0100 (2008-05-28)
parents 3613160e4fd1
children 542897539045
files tools/firmware/hvmloader/util.c
line diff
     1.1 --- a/tools/firmware/hvmloader/util.c	Wed May 28 09:31:49 2008 +0100
     1.2 +++ b/tools/firmware/hvmloader/util.c	Wed May 28 10:02:00 2008 +0100
     1.3 @@ -609,7 +609,7 @@ int get_apic_mode(void)
     1.4  uint16_t get_cpu_mhz(void)
     1.5  {
     1.6      struct xen_add_to_physmap xatp;
     1.7 -    struct shared_info *shared_info = (struct shared_info *)0xa0000;
     1.8 +    struct shared_info *shared_info = (struct shared_info *)0xfffff000;
     1.9      struct vcpu_time_info *info = &shared_info->vcpu_info[0].time;
    1.10      uint64_t cpu_khz;
    1.11      uint32_t tsc_to_nsec_mul, version;
    1.12 @@ -619,7 +619,7 @@ uint16_t get_cpu_mhz(void)
    1.13      if ( cpu_mhz != 0 )
    1.14          return cpu_mhz;
    1.15  
    1.16 -    /* Map shared-info page to 0xa0000 (i.e., overlap VGA hole). */
    1.17 +    /* Map shared-info page. */
    1.18      xatp.domid = DOMID_SELF;
    1.19      xatp.space = XENMAPSPACE_shared_info;
    1.20      xatp.idx   = 0;
    1.21 @@ -644,14 +644,6 @@ uint16_t get_cpu_mhz(void)
    1.22      else
    1.23          cpu_khz = cpu_khz >> tsc_shift;
    1.24  
    1.25 -    /* Get the VGA MMIO hole back by remapping shared info to scratch. */
    1.26 -    xatp.domid = DOMID_SELF;
    1.27 -    xatp.space = XENMAPSPACE_shared_info;
    1.28 -    xatp.idx   = 0;
    1.29 -    xatp.gpfn  = 0xfffff; /* scratch pfn */
    1.30 -    if ( hypercall_memory_op(XENMEM_add_to_physmap, &xatp) != 0 )
    1.31 -        BUG();
    1.32 -
    1.33      cpu_mhz = (uint16_t)(((uint32_t)cpu_khz + 500) / 1000);
    1.34      return cpu_mhz;
    1.35  }