soc/amd/common/block: Fix guards for PSP transfer buffer

The transfer buffer is only required when using
VBOOT_STARTS_BEFORE_BOOTBLOCK.

The VBOOT workbuffer is only required when VBOOT_STARTS_BEFORE_BOOTBLOCK
or VBOOT_STARTS_IN_BOOTBLOCK.

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I444bede3f2b716e1900e7621453351d7fddadaa3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/50403
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
This commit is contained in:
Raul E Rangel 2021-02-05 10:24:22 -07:00 committed by Martin Roth
parent 1deca23f0a
commit d86db1ca8e
2 changed files with 6 additions and 4 deletions

View File

@ -1,10 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-only */ /* SPDX-License-Identifier: GPL-2.0-only */
#if CONFIG(VBOOT) #if CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK)
ALIGN_COUNTER(64) ALIGN_COUNTER(64)
_transfer_buffer = .; _transfer_buffer = .;
REGION(transfer_info, ., TRANSFER_INFO_SIZE, 4) REGION(transfer_info, ., TRANSFER_INFO_SIZE, 4)
#endif
#if CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK) || CONFIG(VBOOT_STARTS_IN_BOOTBLOCK)
ALIGN_COUNTER(64) ALIGN_COUNTER(64)
VBOOT2_WORK(., VB2_FIRMWARE_WORKBUF_RECOMMENDED_SIZE) VBOOT2_WORK(., VB2_FIRMWARE_WORKBUF_RECOMMENDED_SIZE)
#endif #endif
@ -15,6 +17,6 @@
CBFS_MCACHE(., CONFIG_CBFS_MCACHE_SIZE) CBFS_MCACHE(., CONFIG_CBFS_MCACHE_SIZE)
FMAP_CACHE(., FMAP_SIZE) FMAP_CACHE(., FMAP_SIZE)
#if CONFIG(VBOOT) #if CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK)
_etransfer_buffer = .; _etransfer_buffer = .;
#endif #endif

View File

@ -78,13 +78,13 @@ SECTIONS
EARLYRAM_STACK(., CONFIG_EARLYRAM_BSP_STACK_SIZE) EARLYRAM_STACK(., CONFIG_EARLYRAM_BSP_STACK_SIZE)
REGION(apob, CONFIG_PSP_APOB_DRAM_ADDRESS, 64K, 1) REGION(apob, CONFIG_PSP_APOB_DRAM_ADDRESS, 64K, 1)
#if CONFIG(VBOOT) #if CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK)
PSP_SHAREDMEM_DRAM_START(CONFIG_PSP_SHAREDMEM_BASE) PSP_SHAREDMEM_DRAM_START(CONFIG_PSP_SHAREDMEM_BASE)
#endif #endif
#include "memlayout_transfer_buffer.inc" #include "memlayout_transfer_buffer.inc"
#if CONFIG(VBOOT) #if CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK)
PSP_SHAREDMEM_DRAM_END(CONFIG_PSP_SHAREDMEM_BASE + CONFIG_PSP_SHAREDMEM_SIZE) PSP_SHAREDMEM_DRAM_END(CONFIG_PSP_SHAREDMEM_BASE + CONFIG_PSP_SHAREDMEM_SIZE)
#endif #endif
_ = ASSERT(BOOTBLOCK_END == ((BOOTBLOCK_END + 0xFFFF) & 0xFFFF0000), "Bootblock end must be 16 bit aligned"); _ = ASSERT(BOOTBLOCK_END == ((BOOTBLOCK_END + 0xFFFF) & 0xFFFF0000), "Bootblock end must be 16 bit aligned");