Skip to content

Commit

Permalink
soc/amd: Move psp_transfer.h out of each SOC into common
Browse files Browse the repository at this point in the history
The psp_transfer.h file was the same under all SoCs, and is really
tied to the file common/vboot/transfer.c, not the SOC.

This patch makes an include directory under vboot to put the header into
and sets it to be included for all SoCs using SOC_AMD_COMMON. This makes
the header file available to all platforms, so that new chips that don't
use the psp_verstage don't have to make a psp_transfer.h file just to
satisfy the compiler.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: I5b9f2adee3a1d4d8d32813ec0a850344b7d717b2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77303
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
  • Loading branch information
martinlroth committed Aug 26, 2023
1 parent 7687e77 commit 8fc6881
Show file tree
Hide file tree
Showing 14 changed files with 13 additions and 265 deletions.
62 changes: 0 additions & 62 deletions src/soc/amd/cezanne/include/soc/psp_transfer.h

This file was deleted.

2 changes: 1 addition & 1 deletion src/soc/amd/cezanne/smihandler.c
Expand Up @@ -13,7 +13,7 @@
#include <cpu/x86/cache.h>
#include <cpu/x86/smm.h>
#include <elog.h>
#include <soc/psp_transfer.h>
#include <psp_verstage/psp_transfer.h>
#include <soc/smi.h>
#include <soc/smu.h>
#include <soc/southbridge.h>
Expand Down
2 changes: 2 additions & 0 deletions src/soc/amd/common/Makefile.inc
Expand Up @@ -5,6 +5,8 @@ subdirs-y += fsp
subdirs-y += pi
subdirs-y += vboot

CPPFLAGS_common += -I$(src)/soc/amd/common/vboot/include

ifneq ($(V),)
OPT_DEBUG_AMDFWTOOL = --debug
endif
Expand Down
2 changes: 1 addition & 1 deletion src/soc/amd/common/block/cpu/noncar/bootblock.c
Expand Up @@ -6,8 +6,8 @@
#include <console/console.h>
#include <cpu/cpu.h>
#include <cpu/x86/tsc.h>
#include <psp_verstage/psp_transfer.h>
#include <soc/southbridge.h>
#include <soc/psp_transfer.h>
#include <stdint.h>

asmlinkage void bootblock_c_entry(uint64_t base_timestamp)
Expand Down
@@ -1,8 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-only */

#include <memlayout.h>
#include <soc/psp_transfer.h>
#include <fmap_config.h>
#include <psp_verstage/psp_transfer.h>
#include <soc/psp_verstage_addr.h>

ENTRY(_psp_vs_start)
Expand Down
2 changes: 1 addition & 1 deletion src/soc/amd/common/block/cpu/noncar/memlayout_x86.ld
Expand Up @@ -2,7 +2,7 @@

#include <memlayout.h>
#include <arch/header.ld>
#include <soc/psp_transfer.h>
#include <psp_verstage/psp_transfer.h>

#define EARLY_RESERVED_DRAM_START(addr) REGION_START(early_reserved_dram, addr)
#define EARLY_RESERVED_DRAM_END(addr) REGION_END(early_reserved_dram, addr)
Expand Down
2 changes: 1 addition & 1 deletion src/soc/amd/common/psp_verstage/include/psp_verstage.h
Expand Up @@ -7,7 +7,7 @@
#include <amdblocks/psp_efs.h>
#include <bl_uapp/bl_syscall_public.h>
#include <stdint.h>
#include <soc/psp_transfer.h>
#include <psp_verstage/psp_transfer.h>
#include <psp_post_code.h>

#define EMBEDDED_FW_SIGNATURE 0x55aa55aa
Expand Down
2 changes: 1 addition & 1 deletion src/soc/amd/common/psp_verstage/psp_verstage.c
Expand Up @@ -12,8 +12,8 @@
#include <fmap.h>
#include <fmap_config.h>
#include <pc80/mc146818rtc.h>
#include <psp_verstage/psp_transfer.h>
#include <soc/iomap.h>
#include <soc/psp_transfer.h>
#include <security/tpm/tspi.h>
#include <security/tpm/tss.h>
#include <security/vboot/vbnv.h>
Expand Down
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */

#ifndef AMD_PICASSO_PSP_TRANSFER_H
#define AMD_PICASSO_PSP_TRANSFER_H
#ifndef AMD_COMMON_PSP_TRANSFER_H
#define AMD_COMMON_PSP_TRANSFER_H

# if (CONFIG_CMOS_RECOVERY_BYTE != 0)
# define CMOS_RECOVERY_BYTE CONFIG_CMOS_RECOVERY_BYTE
Expand Down Expand Up @@ -60,4 +60,4 @@ void boot_with_psp_timestamp(uint64_t base_timestamp);

#endif

#endif /* AMD_PICASSO_PSP_TRANSFER_H */
#endif /* AMD_COMMON_PSP_TRANSFER_H */
2 changes: 1 addition & 1 deletion src/soc/amd/common/vboot/transfer_buffer.c
Expand Up @@ -4,9 +4,9 @@
#include <console/cbmem_console.h>
#include <console/console.h>
#include <pc80/mc146818rtc.h>
#include <psp_verstage/psp_transfer.h>
#include <security/vboot/vbnv.h>
#include <security/vboot/symbols.h>
#include <soc/psp_transfer.h>
#include <timestamp.h>
#include <2struct.h>

Expand Down
2 changes: 1 addition & 1 deletion src/soc/amd/common/vboot/vboot_bootblock.c
Expand Up @@ -3,7 +3,7 @@
#include <bootblock_common.h>
#include <console/console.h>
#include <cpu/x86/tsc.h>
#include <soc/psp_transfer.h>
#include <psp_verstage/psp_transfer.h>
#include <symbols.h>
#include <timestamp.h>
#include <types.h>
Expand Down
64 changes: 0 additions & 64 deletions src/soc/amd/glinda/include/soc/psp_transfer.h

This file was deleted.

64 changes: 0 additions & 64 deletions src/soc/amd/mendocino/include/soc/psp_transfer.h

This file was deleted.

64 changes: 0 additions & 64 deletions src/soc/amd/phoenix/include/soc/psp_transfer.h

This file was deleted.

0 comments on commit 8fc6881

Please sign in to comment.