mb/google/brya: Create rull variant
[coreboot2.git] / src / drivers / amd / agesa / acpi_tables.c
blobc4a4e183e811077119c7d3e38543c422809c1a90
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <northbridge/amd/agesa/state_machine.h>
4 #include <northbridge/amd/agesa/agesa_helper.h>
6 #include <AGESA.h>
8 /* Fields were removed from the structure and we cannot add them back
9 * without new builds of the binaryPI blobs.
11 #if CONFIG(NORTHBRIDGE_AMD_PI_00730F01)
13 #define HAS_ACPI_SRAT TRUE
14 #define HAS_ACPI_SLIT TRUE
15 #else
16 #define HAS_ACPI_SRAT FALSE
17 #define HAS_ACPI_SLIT FALSE
18 #endif
20 /* We will reference AmdLateParams later to copy ACPI tables. */
21 static AMD_LATE_PARAMS *AmdLateParams;
23 void agesawrapper_setlateinitptr(void *Late)
25 AmdLateParams = Late;
28 void completion_InitLate(struct sysinfo *cb, AMD_LATE_PARAMS *Late)
30 AmdLateParams = Late;
33 void *agesawrapper_getlateinitptr(int pick)
35 ASSERT(AmdLateParams != NULL);
37 switch (pick) {
38 case PICK_DMI:
39 return AmdLateParams->DmiTable;
40 case PICK_PSTATE:
41 return AmdLateParams->AcpiPState;
42 #if HAS_ACPI_SRAT
43 case PICK_SRAT:
44 return AmdLateParams->AcpiSrat;
45 #endif
46 #if HAS_ACPI_SLIT
47 case PICK_SLIT:
48 return AmdLateParams->AcpiSlit;
49 #endif
50 case PICK_WHEA_MCE:
51 return AmdLateParams->AcpiWheaMce;
52 case PICK_WHEA_CMC:
53 return AmdLateParams->AcpiWheaCmc;
54 case PICK_ALIB:
55 return AmdLateParams->AcpiAlib;
56 case PICK_IVRS:
57 return AmdLateParams->AcpiIvrs;
58 case PICK_CRAT:
59 return AmdLateParams->AcpiCrat;
60 case PICK_CDIT:
61 return AmdLateParams->AcpiCdit;
62 default:
63 return NULL;
65 return NULL;