From 575eb73951a42f1b481b436c4cc156ab333c1a15 Mon Sep 17 00:00:00 2001 From: Jeff Li Date: Fri, 9 Jun 2023 15:49:12 +0800 Subject: [PATCH] soc/intel/xeon_sp: Fix HEST table length "current" points to the start of HEST table, so "next - current" already includes the size of its header, no need for increment here. This issue was found on SPR-SP platform. The length of HEST table is now correct with this patch. Change-Id: I6ff1e8e24612b7356772d582ff9a7e53863419db Signed-off-by: Jeff Li Signed-off-by: Ziang Wang Reviewed-on: https://review.coreboot.org/c/coreboot/+/75738 Reviewed-by: Nico Huber Reviewed-by: Lean Sheng Tan Tested-by: build bot (Jenkins) Reviewed-by: Eric Lai --- src/soc/intel/xeon_sp/ras/hest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/soc/intel/xeon_sp/ras/hest.c b/src/soc/intel/xeon_sp/ras/hest.c index 9eb54d9559..2da720a744 100644 --- a/src/soc/intel/xeon_sp/ras/hest.c +++ b/src/soc/intel/xeon_sp/ras/hest.c @@ -65,7 +65,7 @@ static unsigned long acpi_fill_hest(acpi_hest_t *hest) next = hest + 1; next += acpi_hest_add_ghes(next); hest->error_source_count += 1; - header->length += next - current; + header->length = next - current; return header->length; }