Re: [PATCH v4 08/15] acpi/ghes: make the GHES record generation more generic
From: Igor Mammedov
Date: Tue Dec 03 2024 - 06:42:44 EST
On Fri, 22 Nov 2024 10:11:25 +0100
Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx> wrote:
> Split the code into separate functions to allow using the
> common CPER filling code by different error sources.
>
> The generic code was moved to ghes_record_cper_errors(),
> and ghes_gen_err_data_uncorrectable_recoverable() now contains
> only a logic to fill the Generic Error Data part of the record,
> as described at:
>
> ACPI 6.2: 18.3.2.7.1 Generic Error Data
>
> The remaining code to generate a memory error now belongs to
> acpi_ghes_record_errors() function.
>
> A further patch will give it a better name.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>
> ---
[...]
> - return ret;
> + read_ack_register = cpu_to_le64(0);
> + /*
> + * Clear the Read Ack Register, OSPM will write it to 1 when
^^^^^^^^^^^^^ typo?
> + * it acknowledges this error.
> + */
> + cpu_physical_memory_write(read_ack_register_addr,
> + &read_ack_register, sizeof(uint64_t));
> +
> + /* Write the generic error data entry into guest memory */
> + cpu_physical_memory_write(error_block_addr, cper, len);
> +
> + return;
> +}
[...]