Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/69119 )
Change subject: nb/amd/agesa: Remove leftover code ......................................................................
nb/amd/agesa: Remove leftover code
This code is now unused by any platform.
Change-Id: I5464daa8cfb8231e2b19447c343fc80ab1d68ce8 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- D src/northbridge/amd/agesa/BiosCallOuts.h D src/northbridge/amd/agesa/Kconfig D src/northbridge/amd/agesa/Makefile.inc D src/northbridge/amd/agesa/agesa_helper.h D src/northbridge/amd/agesa/dimmSpd.h D src/northbridge/amd/agesa/state_machine.h 6 files changed, 12 insertions(+), 234 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/19/69119/1
diff --git a/src/northbridge/amd/agesa/BiosCallOuts.h b/src/northbridge/amd/agesa/BiosCallOuts.h deleted file mode 100644 index ca30f38..0000000 --- a/src/northbridge/amd/agesa/BiosCallOuts.h +++ /dev/null @@ -1,30 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#ifndef CALLOUTS_AMD_AGESA_H -#define CALLOUTS_AMD_AGESA_H - -#include <Porting.h> -#include <AGESA.h> - -AGESA_STATUS agesa_NoopUnsupported(UINT32 Func, UINTN Data, VOID *ConfigPtr); -AGESA_STATUS agesa_NoopSuccess(UINT32 Func, UINTN Data, VOID *ConfigPtr); -AGESA_STATUS agesa_EmptyIdsInitData(UINT32 Func, UINTN Data, VOID *ConfigPtr); -AGESA_STATUS agesa_Reset(UINT32 Func, UINTN Data, VOID *ConfigPtr); -AGESA_STATUS agesa_RunFuncOnAp(UINT32 Func, UINTN Data, VOID *ConfigPtr); -AGESA_STATUS agesa_GfxGetVbiosImage(UINT32 Func, UINTN FchData, VOID *ConfigPrt); - -AGESA_STATUS agesa_ReadSpd(UINT32 Func, UINTN Data, VOID *ConfigPtr); -AGESA_STATUS agesa_ReadSpd_from_cbfs(UINT32 Func, UINTN Data, VOID *ConfigPtr); - -AGESA_STATUS HeapManagerCallout(UINT32 Func, UINTN Data, VOID *ConfigPtr); -AGESA_STATUS GetBiosCallout(UINT32 Func, UINTN Data, VOID *ConfigPtr); - -typedef struct { - UINT32 CalloutName; - CALLOUT_ENTRY CalloutPtr; -} BIOS_CALLOUT_STRUCT; - -extern const BIOS_CALLOUT_STRUCT BiosCallouts[]; -extern const int BiosCalloutsLen; - -#endif /* CALLOUTS_AMD_AGESA_H */ diff --git a/src/northbridge/amd/agesa/Kconfig b/src/northbridge/amd/agesa/Kconfig deleted file mode 100644 index 6f6e3d63..0000000 --- a/src/northbridge/amd/agesa/Kconfig +++ /dev/null @@ -1,35 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -config NORTHBRIDGE_AMD_AGESA - bool - default CPU_AMD_AGESA - -if NORTHBRIDGE_AMD_AGESA - -config BOTTOMIO_POSITION - hex "Bottom of 32-bit IO space" - default 0x80000000 - help - If PCI peripherals with big BARs are connected to the system - the bottom of the IO must be decreased to allocate such devices. - - Declare the beginning of the 128MB-aligned MMIO region. This - option is useful when PCI peripherals requesting large address - ranges are present, for example, graphic cards. - -config CONSOLE_VGA_MULTI - bool - default n - -config S3_VGA_ROM_RUN - bool - default n - -source "src/northbridge/amd/agesa/*/Kconfig" - -# TODO: Reservation for heap seems excessive -config HEAP_SIZE - hex - default 0xc0000 - -endif # NORTHBRIDGE_AMD_AGESA diff --git a/src/northbridge/amd/agesa/Makefile.inc b/src/northbridge/amd/agesa/Makefile.inc deleted file mode 100644 index ca9096c..0000000 --- a/src/northbridge/amd/agesa/Makefile.inc +++ /dev/null @@ -1,9 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -ifeq ($(CONFIG_NORTHBRIDGE_AMD_AGESA),y) - -subdirs-$(CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY14) += family14 -subdirs-$(CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY15_TN) += family15tn -subdirs-$(CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY16_KB) += family16kb - -endif diff --git a/src/northbridge/amd/agesa/agesa_helper.h b/src/northbridge/amd/agesa/agesa_helper.h deleted file mode 100644 index 8b62ae9..0000000 --- a/src/northbridge/amd/agesa/agesa_helper.h +++ /dev/null @@ -1,44 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#ifndef _AGESA_HELPER_H_ -#define _AGESA_HELPER_H_ - -#include <stddef.h> -#include <arch/romstage.h> - -enum { - PICK_DMI, /* DMI Interface */ - PICK_PSTATE, /* Acpi Pstate SSDT Table */ - PICK_SRAT, /* SRAT Table */ - PICK_SLIT, /* SLIT Table */ - PICK_WHEA_MCE, /* WHEA MCE table */ - PICK_WHEA_CMC, /* WHEA CMV table */ - PICK_ALIB, /* SACPI SSDT table with ALIB implementation */ - PICK_IVRS, /* IOMMU ACPI IVRS(I/O Virtualization Reporting Structure) table */ - PICK_CRAT, /* Component Resource Affinity Table table */ - PICK_CDIT, /* Component Locality Distance Information table */ -}; - -void agesawrapper_setlateinitptr(void *Late); -void *agesawrapper_getlateinitptr(int pick); - -void amd_initcpuio(void); -void amd_initenv(void); - -void *GetHeapBase(void); -void EmptyHeap(void); - -#define BSP_STACK_BASE_ADDR 0x30000 - -/* This covers node 0 only. */ -#define HIGH_ROMSTAGE_STACK_SIZE (0x48000 - BSP_STACK_BASE_ADDR) - -#define HIGH_MEMORY_SCRATCH 0x30000 - -void fixup_cbmem_to_UC(int s3resume); - -void restore_mtrr(void); -void backup_mtrr(void); -const void *OemS3Saved_MTRR_Storage(void); - -#endif /* _AGESA_HELPER_H_ */ diff --git a/src/northbridge/amd/agesa/dimmSpd.h b/src/northbridge/amd/agesa/dimmSpd.h deleted file mode 100644 index 578df0d..0000000 --- a/src/northbridge/amd/agesa/dimmSpd.h +++ /dev/null @@ -1,13 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#ifndef _DIMMSPD_H_ -#define _DIMMSPD_H_ - -AGESA_STATUS -AmdMemoryReadSPD(IN UINT32 Func, IN UINTN Data, IN OUT AGESA_READ_SPD_PARAMS *SpdData); - -int hudson_readSpd(int spdAddress, char *buf, size_t len); - -int smbus_readSpd(int spdAddress, char *buf, size_t len); - -#endif diff --git a/src/northbridge/amd/agesa/state_machine.h b/src/northbridge/amd/agesa/state_machine.h deleted file mode 100644 index d88c459..0000000 --- a/src/northbridge/amd/agesa/state_machine.h +++ /dev/null @@ -1,103 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#ifndef _STATE_MACHINE_H_ -#define _STATE_MACHINE_H_ - -#include <stdint.h> -#include <AGESA.h> -#include <AMD.h> - -/* eventlog */ -void agesawrapper_trace(AGESA_STATUS ret, AMD_CONFIG_PARAMS *StdHeader, const char *func); -AGESA_STATUS agesawrapper_amdreadeventlog(UINT8 HeapStatus); - -/* For suspend-to-ram support. */ - -#if !CONFIG(CPU_AMD_PI) -/* TODO: With binaryPI we need different interface. */ -AGESA_STATUS OemInitResume(AMD_S3_PARAMS *dataBlock); -AGESA_STATUS OemS3LateRestore(AMD_S3_PARAMS *dataBlock); -AGESA_STATUS OemS3Save(AMD_S3_PARAMS *dataBlock); -#endif - -/* For FCH */ -AGESA_STATUS fchs3earlyrestore(AMD_CONFIG_PARAMS *StdHeader); -AGESA_STATUS fchs3laterestore(AMD_CONFIG_PARAMS *StdHeader); - -struct sysinfo -{ - AMD_CONFIG_PARAMS StdHeader; - - int s3resume; -}; - -void board_BeforeAgesa(struct sysinfo *cb); - -void agesa_set_interface(struct sysinfo *cb); - -struct agesa_state { - u8 apic_id; - - AGESA_STRUCT_NAME func; - const char *function_name; - uint32_t ts_entry_id; - uint32_t ts_exit_id; -}; - -void agesa_state_on_entry(struct agesa_state *task, AGESA_STRUCT_NAME func); -void agesa_state_on_exit(struct agesa_state *task, - AMD_CONFIG_PARAMS *StdHeader); -int agesa_execute_state(struct sysinfo *cb, AGESA_STRUCT_NAME func); - -/* AGESA dispatchers */ - -AGESA_STATUS module_dispatch(AGESA_STRUCT_NAME func, AMD_CONFIG_PARAMS *StdHeader); - -void platform_BeforeInitReset(struct sysinfo *cb, AMD_RESET_PARAMS *Reset); -void board_BeforeInitReset(struct sysinfo *cb, AMD_RESET_PARAMS *Reset); - -void platform_BeforeInitEarly(struct sysinfo *cb, AMD_EARLY_PARAMS *Early); -void board_BeforeInitEarly(struct sysinfo *cb, AMD_EARLY_PARAMS *Early); - -/* Normal boot */ -void platform_BeforeInitPost(struct sysinfo *cb, AMD_POST_PARAMS *Post); -void board_BeforeInitPost(struct sysinfo *cb, AMD_POST_PARAMS *Post); -void platform_AfterInitPost(struct sysinfo *cb, AMD_POST_PARAMS *Post); - -void platform_BeforeInitEnv(struct sysinfo *cb, AMD_ENV_PARAMS *Env); -void board_BeforeInitEnv(struct sysinfo *cb, AMD_ENV_PARAMS *Env); -void platform_AfterInitEnv(struct sysinfo *cb, AMD_ENV_PARAMS *Env); - -void platform_BeforeInitMid(struct sysinfo *cb, AMD_MID_PARAMS *Mid); -void board_BeforeInitMid(struct sysinfo *cb, AMD_MID_PARAMS *Mid); - -void platform_BeforeInitLate(struct sysinfo *cb, AMD_LATE_PARAMS *Late); -void board_BeforeInitLate(struct sysinfo *cb, AMD_LATE_PARAMS *Late); -void platform_AfterInitLate(struct sysinfo *cb, AMD_LATE_PARAMS *Late); -void completion_InitLate(struct sysinfo *cb, AMD_LATE_PARAMS *Late); - -/* S3 Resume */ -void platform_BeforeInitResume(struct sysinfo *cb, AMD_RESUME_PARAMS *Resume); -void platform_AfterInitResume(struct sysinfo *cb, AMD_RESUME_PARAMS *Resume); - -void platform_BeforeS3LateRestore(struct sysinfo *cb, AMD_S3LATE_PARAMS *S3Late); -void platform_AfterS3LateRestore(struct sysinfo *cb, AMD_S3LATE_PARAMS *S3Late); - -void platform_AfterS3Save(struct sysinfo *cb, AMD_S3SAVE_PARAMS *S3Save); - -/* FCH callouts, not used with CIMx. */ -#define HAS_AGESA_FCH_OEM_CALLOUT \ - CONFIG(SOUTHBRIDGE_AMD_AGESA_HUDSON) || \ - CONFIG(SOUTHBRIDGE_AMD_AGESA_YANGTZE) || \ - CONFIG(SOUTHBRIDGE_AMD_PI_AVALON) || \ - CONFIG(SOUTHBRIDGE_AMD_PI_KERN) - -#if HAS_AGESA_FCH_OEM_CALLOUT -/* FIXME: Structures included here were supposed to be private to AGESA. */ -#include <FchCommonCfg.h> -void agesa_fch_oem_config(uintptr_t Data, AMD_CONFIG_PARAMS *StdHeader); -void board_FCH_InitReset(struct sysinfo *cb, FCH_RESET_DATA_BLOCK *FchReset); -void board_FCH_InitEnv(struct sysinfo *cb, FCH_DATA_BLOCK *FchEnv); -#endif - -#endif /* _STATE_MACHINE_H_ */