aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2011-06-01 16:47:27 +0100
committerIan Campbell <ian.campbell@citrix.com>2011-06-01 16:47:27 +0100
commite31a6b18898b71a9c30644a883a0ee82a5fd1949 (patch)
treeac1af8773d104605c191751276cf04883bc73559 /tools
parentc25fb1ae7b81da62d93afe8044c359d7372962d6 (diff)
downloadxen-e31a6b18898b71a9c30644a883a0ee82a5fd1949.tar.gz
xen-e31a6b18898b71a9c30644a883a0ee82a5fd1949.tar.bz2
xen-e31a6b18898b71a9c30644a883a0ee82a5fd1949.zip
hvmloader: return MPFPS from create_mp_tables()
This is the hook which the mptables hang off, so it is useful to know. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/firmware/hvmloader/mp_tables.c19
-rw-r--r--tools/firmware/hvmloader/util.h2
2 files changed, 11 insertions, 10 deletions
diff --git a/tools/firmware/hvmloader/mp_tables.c b/tools/firmware/hvmloader/mp_tables.c
index 668e8dd95e..b4e16ee3e4 100644
--- a/tools/firmware/hvmloader/mp_tables.c
+++ b/tools/firmware/hvmloader/mp_tables.c
@@ -260,17 +260,21 @@ static void fill_mpfps(struct mp_floating_pointer_struct *mpfps, uint32_t mpct)
}
/* create_mp_tables - creates MP tables for the guest based upon config data */
-void create_mp_tables(void *mp_table_base)
+unsigned long create_mp_tables(void *_mpfps)
{
char *p;
int vcpu_nr, i, length;
+ void *base;
struct mp_io_intr_entry *mpiie;
+ struct mp_floating_pointer_struct *mpfps = _mpfps;
vcpu_nr = hvm_info->nr_vcpus;
printf("Creating MP tables ...\n");
- p = mp_table_base + sizeof(struct mp_config_table);
+ base = &mpfps[1];
+
+ p = base + sizeof(struct mp_config_table);
for ( i = 0; i < vcpu_nr; i++ )
{
@@ -308,14 +312,11 @@ void create_mp_tables(void *mp_table_base)
p += sizeof(*mpiie);
}
- length = p - (char *)mp_table_base;
+ length = p - (char *)base;
- /* find the next 16-byte boundary to place the mp floating pointer */
- while ( (unsigned long)p & 0xF )
- p++;
+ fill_mp_config_table((struct mp_config_table *)base, length);
- fill_mpfps((struct mp_floating_pointer_struct *)p,
- (uint32_t)mp_table_base);
+ fill_mpfps(mpfps, (uint32_t)base);
- fill_mp_config_table((struct mp_config_table *)mp_table_base, length);
+ return (unsigned long)mpfps;
}
diff --git a/tools/firmware/hvmloader/util.h b/tools/firmware/hvmloader/util.h
index a9bf47b46e..2f790db1aa 100644
--- a/tools/firmware/hvmloader/util.h
+++ b/tools/firmware/hvmloader/util.h
@@ -191,7 +191,7 @@ uint32_t rombios_highbios_setup(void);
/* Miscellaneous. */
void cacheattr_init(void);
-void create_mp_tables(void *table);
+unsigned long create_mp_tables(void *table);
int hvm_write_smbios_tables(unsigned long scratch,
unsigned long smbios_start,
unsigned long smbios_end);