coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
acpi_tables.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
5 
6 #include <AGESA.h>
7 
8 /* Fields were removed from the structure and we cannot add them back
9  * without new builds of the binaryPI blobs.
10  */
11 #if !CONFIG(CPU_AMD_AGESA_BINARY_PI) || \
12  CONFIG(NORTHBRIDGE_AMD_PI_00730F01)
13 
14 #define HAS_ACPI_SRAT TRUE
15 #define HAS_ACPI_SLIT TRUE
16 #else
17 #define HAS_ACPI_SRAT FALSE
18 #define HAS_ACPI_SLIT FALSE
19 #endif
20 
21 /* We will reference AmdLateParams later to copy ACPI tables. */
22 static AMD_LATE_PARAMS *AmdLateParams;
23 
25 {
26  AmdLateParams = Late;
27 }
28 
29 void completion_InitLate(struct sysinfo *cb, AMD_LATE_PARAMS *Late)
30 {
31  AmdLateParams = Late;
32 }
33 
35 {
37 
38  switch (pick) {
39  case PICK_DMI:
40  return AmdLateParams->DmiTable;
41  case PICK_PSTATE:
42  return AmdLateParams->AcpiPState;
43 #if HAS_ACPI_SRAT
44  case PICK_SRAT:
45  return AmdLateParams->AcpiSrat;
46 #endif
47 #if HAS_ACPI_SLIT
48  case PICK_SLIT:
49  return AmdLateParams->AcpiSlit;
50 #endif
51  case PICK_WHEA_MCE:
52  return AmdLateParams->AcpiWheaMce;
53  case PICK_WHEA_CMC:
54  return AmdLateParams->AcpiWheaCmc;
55  case PICK_ALIB:
56  return AmdLateParams->AcpiAlib;
57  case PICK_IVRS:
58  return AmdLateParams->AcpiIvrs;
59  case PICK_CRAT:
60  return AmdLateParams->AcpiCrat;
61  case PICK_CDIT:
62  return AmdLateParams->AcpiCdit;
63  default:
64  return NULL;
65  }
66  return NULL;
67 }
@ PICK_CDIT
Definition: agesa_helper.h:19
@ PICK_PSTATE
Definition: agesa_helper.h:11
@ PICK_IVRS
Definition: agesa_helper.h:17
@ PICK_WHEA_CMC
Definition: agesa_helper.h:15
@ PICK_SRAT
Definition: agesa_helper.h:12
@ PICK_SLIT
Definition: agesa_helper.h:13
@ PICK_WHEA_MCE
Definition: agesa_helper.h:14
@ PICK_ALIB
Definition: agesa_helper.h:16
@ PICK_CRAT
Definition: agesa_helper.h:18
@ PICK_DMI
Definition: agesa_helper.h:10
#define ASSERT(x)
Definition: assert.h:44
void agesawrapper_setlateinitptr(void *Late)
Definition: acpi_tables.c:24
static AMD_LATE_PARAMS * AmdLateParams
Definition: acpi_tables.c:22
void completion_InitLate(struct sysinfo *cb, AMD_LATE_PARAMS *Late)
Definition: acpi_tables.c:29
void * agesawrapper_getlateinitptr(int pick)
Definition: acpi_tables.c:34
#define NULL
Definition: stddef.h:19