Re: [PATCH v8 13/13] acpi/ghes: check if the BIOS pointers for HEST are correct
From: Mauro Carvalho Chehab
Date: Sat Aug 24 2024 - 23:49:51 EST
Em Sat, 24 Aug 2024 02:15:10 +0200
Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx> escreveu:
> Ok, we could still do something like this pseudo-code to get the
> error source offset:
>
> #define ACPI_HEST_TYPE_GHESV2 11
>
> err_struct_offset = 0;
> for (i = 0; i < source_id_count; i++) {
> /* NOTE: Other types may have different sizes */
> assert(ghes[i].type == ACPI_HEST_TYPE_GHESV2);
> if (ghes[i].source_id == source_id)
> break;
> err_struct_offset += HEST_GHES_V2_TABLE_SIZE;
> }
> assert (i < source_id_count);
This is what I ended implementing on v9.
Regards,
Mauro