From 226d7843775eb58d00f62ec882dc4803d6d7bc20 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Tue, 4 Nov 2014 21:09:23 +0100 Subject: ibexpeak, bd82x6x: Move to implicit length patching Change-Id: I43eef7f97398d7c4c3f8d9790920fa4402019dd7 Signed-off-by: Vladimir Serbinenko Reviewed-on: http://review.coreboot.org/7326 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/southbridge/intel/bd82x6x/lpc.c | 8 +++----- src/southbridge/intel/fsp_bd82x6x/lpc.c | 8 +++----- src/southbridge/intel/ibexpeak/lpc.c | 8 +++----- 3 files changed, 9 insertions(+), 15 deletions(-) (limited to 'src/southbridge') diff --git a/src/southbridge/intel/bd82x6x/lpc.c b/src/southbridge/intel/bd82x6x/lpc.c index c165ecc336..80d6284629 100644 --- a/src/southbridge/intel/bd82x6x/lpc.c +++ b/src/southbridge/intel/bd82x6x/lpc.c @@ -682,8 +682,6 @@ static void southbridge_inject_dsdt(void) opregion = igd_make_opregion(); if (gnvs) { - int scopelen; - memset(gnvs, 0, sizeof (*gnvs)); acpi_create_gnvs(gnvs); @@ -702,9 +700,9 @@ static void southbridge_inject_dsdt(void) smm_setup_structures(gnvs, NULL, NULL); /* Add it to DSDT. */ - scopelen = acpigen_write_scope("\\"); - scopelen += acpigen_write_name_dword("NVSA", (u32) gnvs); - acpigen_patch_len(scopelen - 1); + acpigen_write_scope("\\"); + acpigen_write_name_dword("NVSA", (u32) gnvs); + acpigen_pop_len(); } } diff --git a/src/southbridge/intel/fsp_bd82x6x/lpc.c b/src/southbridge/intel/fsp_bd82x6x/lpc.c index 86cce06d69..f9961f95ba 100644 --- a/src/southbridge/intel/fsp_bd82x6x/lpc.c +++ b/src/southbridge/intel/fsp_bd82x6x/lpc.c @@ -640,8 +640,6 @@ static void southbridge_inject_dsdt(void) opregion = igd_make_opregion(); if (gnvs) { - int scopelen; - memset(gnvs, 0, sizeof (*gnvs)); acpi_create_gnvs(gnvs); @@ -651,9 +649,9 @@ static void southbridge_inject_dsdt(void) smm_setup_structures(gnvs, NULL, NULL); /* Add it to DSDT. */ - scopelen = acpigen_write_scope("\\"); - scopelen += acpigen_write_name_dword("NVSA", (u32) gnvs); - acpigen_patch_len(scopelen - 1); + acpigen_write_scope("\\"); + acpigen_write_name_dword("NVSA", (u32) gnvs); + acpigen_pop_len(); } } diff --git a/src/southbridge/intel/ibexpeak/lpc.c b/src/southbridge/intel/ibexpeak/lpc.c index f0ebbc903c..c094ead557 100644 --- a/src/southbridge/intel/ibexpeak/lpc.c +++ b/src/southbridge/intel/ibexpeak/lpc.c @@ -675,8 +675,6 @@ static void southbridge_inject_dsdt(void) opregion = igd_make_opregion(); if (gnvs) { - int scopelen; - memset(gnvs, 0, sizeof (*gnvs)); acpi_create_gnvs(gnvs); @@ -686,9 +684,9 @@ static void southbridge_inject_dsdt(void) smm_setup_structures(gnvs, NULL, NULL); /* Add it to SSDT. */ - scopelen = acpigen_write_scope("\\"); - scopelen += acpigen_write_name_dword("NVSA", (u32) gnvs); - acpigen_patch_len(scopelen - 1); + acpigen_write_scope("\\"); + acpigen_write_name_dword("NVSA", (u32) gnvs); + acpigen_pop_len(); } } -- cgit v1.2.3