From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E5F7C5234 for ; Thu, 23 Jan 2025 10:02:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737626544; cv=none; b=O5VNMwNSz9suBl2RzT/6wv52vgFh8oFiWABqsA884n88U6/fuzU385vgVHv/2H1pkAJ1FOfHKzKmsW/fkGlRCm3mGliFd+t2g8+UDY4FR9CxB+14Q3UHNBOHObMS75UlPHMBEHG4xoDW/K3r1dh655qYuEBMRz4K/N7uJYH/7uY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737626544; c=relaxed/simple; bh=L0rI13b1uIbygdnGMg3jmdtIfRBlRC8KGruQqDcMyKM=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=PPLd0E8ZY8SVwKY02ItNHwEnXzCvCWYzfofWBRfErwKlHk1OoxMmly2ULRzWF/iJ4GLo6TUxb2v7+w4+ETAvREuYOMYplWFWaPcKhyBF0Bcg2rufRDXEpholXQl1sdG+rl/yfJdZQK+B6NvhbjQ/27RTuDFk1fdABZUDGGU3Zeo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4YdxJk5yGhz6M4Ng; Thu, 23 Jan 2025 18:00:22 +0800 (CST) Received: from frapeml500008.china.huawei.com (unknown [7.182.85.71]) by mail.maildlp.com (Postfix) with ESMTPS id BDFF4140393; Thu, 23 Jan 2025 18:02:19 +0800 (CST) Received: from localhost (10.203.177.66) by frapeml500008.china.huawei.com (7.182.85.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 23 Jan 2025 11:02:19 +0100 Date: Thu, 23 Jan 2025 10:02:17 +0000 From: Jonathan Cameron To: Mauro Carvalho Chehab CC: Igor Mammedov , "Michael S . Tsirkin" , Shiju Jose , , , Ani Sinha , Dongjiu Geng , Subject: Re: [PATCH 02/11] acpi/ghes: add a firmware file with HEST address Message-ID: <20250123100217.00007373@huawei.com> In-Reply-To: References: X-Mailer: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml100004.china.huawei.com (7.191.162.219) To frapeml500008.china.huawei.com (7.182.85.71) On Wed, 22 Jan 2025 16:46:19 +0100 Mauro Carvalho Chehab wrote: > Store HEST table address at GPA, placing its content at > hest_addr_le variable. > > Signed-off-by: Mauro Carvalho Chehab > Reviewed-by: Jonathan Cameron > A few trivial things inline. Jonathan > --- > > Change from v8: > - hest_addr_lr is now pointing to the error source size and data. > > Signed-off-by: Mauro Carvalho Chehab Bonus. I guess you really like this patch :) > --- > hw/acpi/ghes.c | 17 ++++++++++++++++- > include/hw/acpi/ghes.h | 1 + > 2 files changed, 17 insertions(+), 1 deletion(-) > > diff --git a/hw/acpi/ghes.c b/hw/acpi/ghes.c > index 3f519ccab90d..34e3364d3fd8 100644 > --- a/hw/acpi/ghes.c > +++ b/hw/acpi/ghes.c > @@ -30,6 +30,7 @@ > > #define ACPI_HW_ERROR_FW_CFG_FILE "etc/hardware_errors" > #define ACPI_HW_ERROR_ADDR_FW_CFG_FILE "etc/hardware_errors_addr" > +#define ACPI_HEST_ADDR_FW_CFG_FILE "etc/acpi_table_hest_addr" > > /* The max size in bytes for one error block */ > #define ACPI_GHES_MAX_RAW_DATA_LENGTH (1 * KiB) > @@ -261,7 +262,7 @@ static void build_ghes_error_table(GArray *hardware_errors, BIOSLinker *linker, > } > > /* > - * tell firmware to write hardware_errors GPA into > + * Tell firmware to write hardware_errors GPA into Sneaky tidy up. No problem with it in general but adding noise here, so if there are others in the series maybe gather them up in a cleanup patch. > * hardware_errors_addr fw_cfg, once the former has been initialized. > */ > bios_linker_loader_write_pointer(linker, ACPI_HW_ERROR_ADDR_FW_CFG_FILE, 0, > @@ -355,6 +356,8 @@ void acpi_build_hest(GArray *table_data, GArray *hardware_errors, > > acpi_table_begin(&table, table_data); > > + int hest_offset = table_data->len; Local style looks to be traditional C with definitions at top. Maybe define hest_offset up a few lines and just set it here? > + > /* Error Source Count */ > build_append_int_noprefix(table_data, num_sources, 4); > for (i = 0; i < num_sources; i++) { > @@ -362,6 +365,15 @@ void acpi_build_hest(GArray *table_data, GArray *hardware_errors, > } > > acpi_table_end(linker, &table); > + > + /* > + * tell firmware to write into GPA the address of HEST via fw_cfg, Given the tidy up above, fix this one to have a capital T, or was this where you meant to change it? > + * once initialized. > + */ > + bios_linker_loader_write_pointer(linker, > + ACPI_HEST_ADDR_FW_CFG_FILE, 0, Could wrap less and stay under 80 chars as both lines above add up to 70 something > + sizeof(uint64_t), > + ACPI_BUILD_TABLE_FILE, hest_offset); > }