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-ia64-devel

[Xen-ia64-devel] [PATCH] Cleanup ACPI checksum warnings

To: xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-ia64-devel] [PATCH] Cleanup ACPI checksum warnings
From: Alex Williamson <alex.williamson@xxxxxx>
Date: Thu, 07 Aug 2008 16:23:43 -0600
Cc: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Delivery-date: Thu, 07 Aug 2008 15:23:42 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: OSLO R&D
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
On bootup, I get a couple of these:

(XEN) ACPI Warning (tbutils-0219): Incorrect checksum in table [APIC] - CE, 
should be 04 [20070126]
(XEN) ACPI Warning (tbutils-0219): Incorrect checksum in table [APIC] - CE, 
should be 04 [20070126]

I don't remember seeing them before, but they're pretty easy to fix.
The problem is we update the lsapics, causing the checksum to be wrong,
then we look for platform interrupt sources, which spits out a warning,
and finally we look for the MADT again to fix the checksum, which also
prints a warning.  If we grab a pointer to the MADT before these, we can
update the checksum after each step and avoid the warnings.

Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
--

diff -r eff5fcfa69bc xen/arch/ia64/xen/dom_fw_dom0.c
--- a/xen/arch/ia64/xen/dom_fw_dom0.c   Wed Aug 06 15:19:13 2008 +0100
+++ b/xen/arch/ia64/xen/dom_fw_dom0.c   Thu Aug 07 16:17:39 2008 -0600
@@ -101,6 +101,9 @@ acpi_update_madt_checksum(struct acpi_ta
 {
        struct acpi_table_madt *acpi_madt;
 
+       if (!table)
+               return -EINVAL;
+
        acpi_madt = (struct acpi_table_madt *)table;
        acpi_madt->header.checksum = 0;
        acpi_madt->header.checksum = -acpi_tb_checksum((u8*)acpi_madt,
@@ -170,7 +173,11 @@ static void __init acpi_table_disable(ch
 /* base is physical address of acpi table */
 static void __init touch_acpi_table(void)
 {
+       struct acpi_table_header *madt = NULL;
+
        lsapic_nbr = 0;
+
+       acpi_get_table(ACPI_SIG_MADT, 0, &madt);
 
        /*
         * Modify dom0 MADT:
@@ -179,16 +186,22 @@ static void __init touch_acpi_table(void
         *  - Hide CPEI interrupt source
         *
         * ACPI tables must be backed-up before modification!
+        *
+        * We update the checksum each time we modify to keep the
+        * ACPI CA from warning about invalid checksums.
         */
        acpi_table_parse(ACPI_SIG_MADT, acpi_backup_table);
 
        if (acpi_table_parse_madt(ACPI_MADT_LSAPIC, acpi_update_lsapic, 0) < 0)
                printk("Error parsing MADT - no LAPIC entries\n");
+
+       acpi_update_madt_checksum(madt);
+
        if (acpi_table_parse_madt(ACPI_MADT_PLAT_INT_SRC,
                                  acpi_patch_plat_int_src, 0) < 0)
                printk("Error parsing MADT - no PLAT_INT_SRC entries\n");
 
-       acpi_table_parse(ACPI_SIG_MADT, acpi_update_madt_checksum);
+       acpi_update_madt_checksum(madt);
 
        /*
         * SRAT & SLIT tables aren't useful for Dom0 until



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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-ia64-devel] [PATCH] Cleanup ACPI checksum warnings, Alex Williamson <=