Remove padding from memory region constituent.
This was removed from the SPCI spec at some point. This means that the
addresses are no longer 64-bit aligned.
Bug: 132420445
Change-Id: Ic6759041243fcfd77c51e0d12e7441518406b1fd
diff --git a/vmlib/spci.c b/vmlib/spci.c
index c6f745a..59c36e4 100644
--- a/vmlib/spci.c
+++ b/vmlib/spci.c
@@ -63,20 +63,19 @@
memory_region->attributes[0].memory_attributes = attributes;
/*
- * Constituent offset must be aligned to a 64-bit boundary so that
- * 64-bit addresses can be copied without alignment faults.
+ * Constituent offset must be aligned to a 32-bit boundary so that
+ * 32-bit values can be copied without alignment faults.
*/
memory_region->constituent_offset = align_up(
sizeof(struct spci_memory_region) +
memory_region->attribute_count *
sizeof(struct spci_memory_region_attributes),
- 8);
+ 4);
region_constituents =
spci_memory_region_get_constituents(memory_region);
for (index = 0; index < constituent_count; index++) {
region_constituents[index] = constituents[index];
- region_constituents[index].reserved = 0;
memory_region->page_count += constituents[index].page_count;
}