WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 10 of 15] hvmloader: return MPFPS from create_mp_tabl

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 10 of 15] hvmloader: return MPFPS from create_mp_tables()
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Wed, 1 Jun 2011 10:40:05 +0100
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Wed, 01 Jun 2011 02:56:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1306921195@xxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1306921195@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.6.4
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1306917433 -3600
# Node ID 361304106d85f61cdeffd5805c46520feac19e89
# Parent  99820702549e428fd961b160afa1dae75bc7010d
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@xxxxxxxxxx>

diff -r 99820702549e -r 361304106d85 tools/firmware/hvmloader/mp_tables.c
--- a/tools/firmware/hvmloader/mp_tables.c      Wed Jun 01 09:36:35 2011 +0100
+++ b/tools/firmware/hvmloader/mp_tables.c      Wed Jun 01 09:37:13 2011 +0100
@@ -260,17 +260,21 @@ static void fill_mpfps(struct mp_floatin
 }
 
 /* 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_bas
         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 -r 99820702549e -r 361304106d85 tools/firmware/hvmloader/util.h
--- a/tools/firmware/hvmloader/util.h   Wed Jun 01 09:36:35 2011 +0100
+++ b/tools/firmware/hvmloader/util.h   Wed Jun 01 09:37:13 2011 +0100
@@ -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);

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel