acpi: Move most of HEST ACPI table to common code

This moves most of the vendor and architecture independent code into
common ACPI code.

Change-Id: I7dca939612a5f3d8d6a148fa67bf0ce891952584
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88034
Reviewed-by: Anand Vaikar <a.vaikar2021@gmail.com>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Maximilian Brune 2025-06-10 17:43:33 +02:00 committed by Matt DeVillier
commit 4431848ee6
15 changed files with 113 additions and 167 deletions

View file

@ -1879,11 +1879,9 @@ unsigned long acpi_create_dmar_ds_ioapic_from_hw(unsigned long current,
unsigned long acpi_create_dmar_ds_msi_hpet(unsigned long current,
u8 enumeration_id,
u8 bus, u8 dev, u8 fn);
void acpi_write_hest(acpi_hest_t *hest,
unsigned long (*acpi_fill_hest)(acpi_hest_t *hest));
unsigned long acpi_create_hest_error_source(acpi_hest_t *hest,
acpi_hest_esd_t *esd, u16 type, void *data, u16 len);
unsigned long acpi_create_hest_error_source(acpi_hest_t *hest, acpi_hest_esd_t *esd, u16 type,
void *data, u16 len);
unsigned long acpi_create_lpi_desc_ncst(acpi_lpi_desc_ncst_t *lpi_desc, uint16_t uid);

View file

@ -0,0 +1,36 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Contains ACPI Platform Error Interfaces (APEI) definitions and declarations.
* These are mostly used by:
* - BERT (Boot Error Record Table) ACPI Table.
* - HEST (Hardware Error Source Table) ACPI Table.
*/
#ifndef _ACPI_APEI_H_
#define _ACPI_APEI_H_
#include <acpi/acpi.h>
/* Generic Hardware Error Source Descriptor */
typedef struct acpi_ghes_esd {
u16 type;
u16 source_id;
u16 related_src_id;
u8 flags;
u8 enabled;
u32 prealloc_erecords;
u32 max_section_per_record;
} __packed acpi_ghes_esd_t;
typedef struct ghes_record {
acpi_ghes_esd_t esd;
u32 max_raw_data_length;
acpi_addr64_t sts_addr;
acpi_hest_hen_t notify;
u32 err_sts_blk_len;
} __packed ghes_record_t;
uintptr_t acpi_soc_fill_hest(acpi_hest_t *hest, uintptr_t current, void *log_mem);
#endif