[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 12/17] libxl/arm: Add a helper to calculate the ACPI table checksum



Hi Shannon,

On 23/06/16 04:16, Shannon Zhao wrote:
From: Shannon Zhao <shannon.zhao@xxxxxxxxxx>

Signed-off-by: Shannon Zhao <shannon.zhao@xxxxxxxxxx>
---
  tools/libxl/libxl_arm_acpi.c | 15 +++++++++++++++
  1 file changed, 15 insertions(+)

diff --git a/tools/libxl/libxl_arm_acpi.c b/tools/libxl/libxl_arm_acpi.c
index 45fc354..d8779af 100644
--- a/tools/libxl/libxl_arm_acpi.c
+++ b/tools/libxl/libxl_arm_acpi.c
@@ -270,6 +270,21 @@ static void make_acpi_dsdt(libxl__gc *gc, struct 
xc_dom_image *dom)
      dom->acpitable_size += ROUNDUP(acpitables[DSDT].size, 3);
  }

+static void calculate_checksum(void *table, uint32_t checksum_offset,
+                               uint32_t length)

This will break compilation and therefore bisection as nobody is using this function. Please make sure that all the patch can build one by one.

+{
+    uint8_t *p, sum = 0;
+
+    p = table;
+    p[checksum_offset] = 0;
+
+    while ( length-- )
+        sum = sum + *p++;
+
+    p = table;
+    p[checksum_offset] = -sum;
+}
+
  int libxl__prepare_acpi(libxl__gc *gc, libxl_domain_build_info *info,
                          libxl__domain_build_state *state,
                          struct xc_dom_image *dom)


Regards,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.