summaryrefslogtreecommitdiff
path: root/src/drivers/amd/agesa
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2022-11-01 23:33:45 +0100
committerArthur Heymans <arthur@aheymans.xyz>2022-11-07 13:58:48 +0000
commit81a4fefce223ba358310aec2d988484202c176e2 (patch)
tree95e0e888113359a0942a4e6464348b7773aa94d4 /src/drivers/amd/agesa
parent0f12381083fdfc7bb3e6f3b2ac5cd6247506c543 (diff)
cpu/amd/agesa: Remove leftover code
Now that all agesa CPUs are removed this code is unused. Change-Id: If0c082bbdb09457e3876962fa75725add11cb67c Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69118 Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/drivers/amd/agesa')
-rw-r--r--src/drivers/amd/agesa/Makefile.inc3
-rw-r--r--src/drivers/amd/agesa/acpi_tables.c3
-rw-r--r--src/drivers/amd/agesa/state_machine.c27
3 files changed, 8 insertions, 25 deletions
diff --git a/src/drivers/amd/agesa/Makefile.inc b/src/drivers/amd/agesa/Makefile.inc
index 6d80c4c6c3..fbbf044907 100644
--- a/src/drivers/amd/agesa/Makefile.inc
+++ b/src/drivers/amd/agesa/Makefile.inc
@@ -21,7 +21,4 @@ ramstage-y += eventlog.c
ramstage-y += heapmanager.c
ramstage-y += acpi_tables.c
-romstage-$(CONFIG_CPU_AMD_AGESA) += oem_s3.c
-ramstage-$(CONFIG_CPU_AMD_AGESA) += oem_s3.c s3_mtrr.c
-
endif
diff --git a/src/drivers/amd/agesa/acpi_tables.c b/src/drivers/amd/agesa/acpi_tables.c
index 1c09d3f546..c4a4e183e8 100644
--- a/src/drivers/amd/agesa/acpi_tables.c
+++ b/src/drivers/amd/agesa/acpi_tables.c
@@ -8,8 +8,7 @@
/* Fields were removed from the structure and we cannot add them back
* without new builds of the binaryPI blobs.
*/
-#if !CONFIG(CPU_AMD_AGESA_BINARY_PI) || \
- CONFIG(NORTHBRIDGE_AMD_PI_00730F01)
+#if CONFIG(NORTHBRIDGE_AMD_PI_00730F01)
#define HAS_ACPI_SRAT TRUE
#define HAS_ACPI_SLIT TRUE
diff --git a/src/drivers/amd/agesa/state_machine.c b/src/drivers/amd/agesa/state_machine.c
index 2ff4d441b7..b819dff50b 100644
--- a/src/drivers/amd/agesa/state_machine.c
+++ b/src/drivers/amd/agesa/state_machine.c
@@ -14,10 +14,6 @@
#include <AMD.h>
-#if CONFIG(CPU_AMD_AGESA_OPENSOURCE)
-#include "Dispatcher.h"
-#endif
-
#if ENV_RAMINIT
#include <PlatformMemoryConfiguration.h>
CONST PSO_ENTRY ROMDATA DefaultPlatformMemoryConfiguration[] = {PSO_END};
@@ -25,7 +21,6 @@ CONST PSO_ENTRY ROMDATA DefaultPlatformMemoryConfiguration[] = {PSO_END};
static void agesa_locate_image(AMD_CONFIG_PARAMS *StdHeader)
{
-#if CONFIG(CPU_AMD_AGESA_BINARY_PI)
const char ModuleIdentifier[] = AGESA_ID;
const void *agesa, *image;
size_t file_size;
@@ -37,7 +32,6 @@ static void agesa_locate_image(AMD_CONFIG_PARAMS *StdHeader)
image = LibAmdLocateImage(agesa, agesa + file_size, 4096,
ModuleIdentifier);
StdHeader->ImageBasePtr = (void *)image;
-#endif
}
void agesa_set_interface(struct sysinfo *cb)
@@ -46,15 +40,13 @@ void agesa_set_interface(struct sysinfo *cb)
cb->StdHeader.CalloutPtr = GetBiosCallout;
- if (CONFIG(CPU_AMD_AGESA_BINARY_PI)) {
- agesa_locate_image(&cb->StdHeader);
- AMD_IMAGE_HEADER *image =
- (void *)(uintptr_t)cb->StdHeader.ImageBasePtr;
- ASSERT(image);
- AMD_MODULE_HEADER *module =
- (void *)(uintptr_t)image->ModuleInfoOffset;
- ASSERT(module && module->ModuleDispatcher);
- }
+ agesa_locate_image(&cb->StdHeader);
+ AMD_IMAGE_HEADER *image =
+ (void *)(uintptr_t)cb->StdHeader.ImageBasePtr;
+ ASSERT(image);
+ AMD_MODULE_HEADER *module =
+ (void *)(uintptr_t)image->ModuleInfoOffset;
+ ASSERT(module && module->ModuleDispatcher);
}
AGESA_STATUS module_dispatch(AGESA_STRUCT_NAME func,
@@ -62,14 +54,9 @@ AGESA_STATUS module_dispatch(AGESA_STRUCT_NAME func,
{
MODULE_ENTRY dispatcher;
-#if CONFIG(CPU_AMD_AGESA_OPENSOURCE)
- dispatcher = AmdAgesaDispatcher;
-#endif
-#if CONFIG(CPU_AMD_AGESA_BINARY_PI)
AMD_IMAGE_HEADER *image = (void *)(uintptr_t)StdHeader->ImageBasePtr;
AMD_MODULE_HEADER *module = (void *)(uintptr_t)image->ModuleInfoOffset;
dispatcher = module->ModuleDispatcher;
-#endif
StdHeader->Func = func;
return dispatcher(StdHeader);