soc/amd/cezanne,soc/intel/common: rework CPPC table generation

Make use of the newly introduced ACPI macros for CPPC table generation
that currently exists of a bunch of confusing assignments of structs
that only get partially filled.

Test: dumped SSDT before and after do not differ.

Change-Id: I844d191b1134b98e409240ede71e2751e51e2159
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57888
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Lance Zhao
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
Michael Niewöhner
2021-10-05 21:42:57 +02:00
committed by Felix Held
parent 9cae17d028
commit f72c7b154d
3 changed files with 58 additions and 317 deletions

View File

@@ -130,7 +130,7 @@ typedef struct acpi_gen_regaddr {
/* Macros for common resource types */
#define ACPI_REG_MSR(address, offset, width) \
{ \
(acpi_addr_t){ \
.space_id = ACPI_ADDRESS_SPACE_FIXED, \
.access_size = ACPI_ACCESS_SIZE_QWORD_ACCESS, \
.addrl = address, \
@@ -138,7 +138,7 @@ typedef struct acpi_gen_regaddr {
.bit_width = width, \
}
#define ACPI_REG_UNSUPPORTED {0}
#define ACPI_REG_UNSUPPORTED (acpi_addr_t){0}
/* Common ACPI HIDs */
#define ACPI_HID_FDC "PNP0700"