[coreboot-gerrit] Patch set updated for coreboot: d6e1174 acpigen: Use implicit length patching in acpigen.c
Vladimir Serbinenko (phcoder@gmail.com)
gerrit at coreboot.org
Sat Nov 22 16:16:12 CET 2014
Vladimir Serbinenko (phcoder at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7364
-gerrit
commit d6e1174c87fbcdff55d4d33b281241e8182e1ebe
Author: Vladimir Serbinenko <phcoder at gmail.com>
Date: Sun Nov 9 03:32:58 2014 +0100
acpigen: Use implicit length patching in acpigen.c
Change-Id: I0aa333911edabd5c9f844a2171dfa9fafe7de785
Signed-off-by: Vladimir Serbinenko <phcoder at gmail.com>
---
src/arch/x86/boot/acpigen.c | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/src/arch/x86/boot/acpigen.c b/src/arch/x86/boot/acpigen.c
index cc9f9ab..8e7ce46 100644
--- a/src/arch/x86/boot/acpigen.c
+++ b/src/arch/x86/boot/acpigen.c
@@ -391,7 +391,7 @@ int acpigen_write_empty_PTC(void)
len += acpigen_write_resourcetemplate_footer();
len += rlen;
- acpigen_patch_len(len - 1);
+ acpigen_pop_len();
return len + nlen;
}
@@ -440,7 +440,7 @@ int acpigen_write_PPC(u8 nr)
len += acpigen_write_byte(nr);
/* add all single bytes */
len += 1;
- acpigen_patch_len(len - 1);
+ acpigen_pop_len();
return len;
}
@@ -465,7 +465,7 @@ int acpigen_write_PPC_NVS(void)
len += acpigen_emit_namestring("PPCM");
/* add all single bytes */
len += 1;
- acpigen_patch_len(len - 1);
+ acpigen_pop_len();
return len;
}
@@ -483,7 +483,7 @@ int acpigen_write_TPC(const char *gnvs_tpc_limit)
len = acpigen_write_method("_TPC", 0);
len += acpigen_emit_byte(0xa4); /* ReturnOp */
len += acpigen_emit_namestring(gnvs_tpc_limit);
- acpigen_patch_len(len - 1);
+ acpigen_pop_len();
return len;
}
@@ -499,7 +499,7 @@ int acpigen_write_PSS_package(u32 coreFreq, u32 power, u32 transLat,
len += acpigen_write_dword(control);
len += acpigen_write_dword(status);
// pkglen without the len opcode
- acpigen_patch_len(len - 1);
+ acpigen_pop_len();
printk(BIOS_DEBUG, "PSS: %uMHz power %u control 0x%x status 0x%x\n",
coreFreq, power, control, status);
@@ -518,9 +518,9 @@ int acpigen_write_PSD_package(u32 domain, u32 numprocs, PSD_coord coordtype)
len += acpigen_write_dword(domain);
len += acpigen_write_dword(coordtype);
len += acpigen_write_dword(numprocs);
- acpigen_patch_len(len - 1);
+ acpigen_pop_len();
len += lenp;
- acpigen_patch_len(len - 1);
+ acpigen_pop_len();
return len + lenh;
}
@@ -540,7 +540,7 @@ int acpigen_write_CST_package_entry(acpi_cstate_t *cstate)
len += acpigen_write_dword(cstate->ctype);
len += acpigen_write_dword(cstate->latency);
len += acpigen_write_dword(cstate->power);
- acpigen_patch_len(len - 1);
+ acpigen_pop_len();
return len;
}
@@ -555,7 +555,7 @@ int acpigen_write_CST_package(acpi_cstate_t *cstate, int nentries)
len += acpigen_write_CST_package_entry(cstate + i);
len += lenp;
- acpigen_patch_len(len - 1);
+ acpigen_pop_len();
return len + lenh;
}
@@ -582,12 +582,12 @@ int acpigen_write_TSS_package(int entries, acpi_tstate_t *tstate_list)
len += acpigen_write_dword(tstate->latency);
len += acpigen_write_dword(tstate->control);
len += acpigen_write_dword(tstate->status);
- acpigen_patch_len(len - 1);
+ acpigen_pop_len();
tstate++;
plen += len;
}
- acpigen_patch_len(plen - 1);
+ acpigen_pop_len();
return plen + nlen;
}
@@ -602,9 +602,9 @@ int acpigen_write_TSD_package(u32 domain, u32 numprocs, PSD_coord coordtype)
len += acpigen_write_dword(domain);
len += acpigen_write_dword(coordtype);
len += acpigen_write_dword(numprocs);
- acpigen_patch_len(len - 1);
+ acpigen_pop_len();
len += lenp;
- acpigen_patch_len(len - 1);
+ acpigen_pop_len();
return len + lenh;
}
@@ -732,7 +732,7 @@ int acpigen_write_resourcetemplate_footer(void)
p[0] = len & 0xff;
p[1] = (len >> 8) & 0xff;
/* patch len field */
- acpigen_patch_len(len-1);
+ acpigen_pop_len();
return 2;
}
@@ -787,7 +787,7 @@ int acpigen_write_mainboard_resources(const char *scope, const char *name)
len = acpigen_write_scope(scope);
len += acpigen_write_name(name);
len += acpigen_write_mainboard_resource_template();
- acpigen_patch_len(len - 1);
+ acpigen_pop_len();
return len;
}
More information about the coreboot-gerrit
mailing list