lynxpoint: fix mem corruption during ssdt2 gen

The ssdt2 generation code was calling acpigen_patch_len().
However, none of the entries had AML object lengths that
needed patching. That resulted in the following message:

ASSERTION FAILED: file 'src/arch/x86/boot/acpigen.c',  line 52

Additionally, this caused an errant write to a memory address
whose value was in the variable ltop. This was the 0 address.

BUG=chrome-os-partner:18635
BRANCH=none
TEST=Built and booted. Noted no more error message.

Change-Id: I44abf5a4e4225220575aee6b5c9bb6b0be093a28
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/56299
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@google.com>
This commit is contained in:
Aaron Durbin 2013-05-22 15:28:20 -05:00 committed by ChromeBot
commit d5fcda55b2

View file

@ -88,7 +88,6 @@ void acpi_create_serialio_ssdt(acpi_header_t *ssdt)
/* Fill the SSDT with an entry for each SerialIO device */
for (id = 0; id < 8; id++)
len += acpi_create_serialio_ssdt_entry(id, gnvs);
acpigen_patch_len(len-1);
/* (Re)calculate length and checksum. */
current = (unsigned long)acpigen_get_current();