From 8cc5fdec904352ee2e474d1b0ba6f44ba2192ce6 Mon Sep 17 00:00:00 2001 From: Marshall Dawson Date: Tue, 30 Jan 2018 15:23:48 -0700 Subject: amd/soc/common: Remove cbmem subregions in heap Revert most of 4f3f47b "amd/common: Define regions in cbmem". This puts the management of the heap space back to its traditional methodology. Subsequent patches that were to have used these subregions have been reworked. BUG=b:69614064 Change-Id: Ib3d40bcf61c50dbc481b60e7b5286f65a529b912 Signed-off-by: Marshall Dawson Reviewed-on: https://review.coreboot.org/23516 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth Reviewed-by: Aaron Durbin --- .../common/block/include/amdblocks/BiosCallOuts.h | 8 -------- .../amd/common/block/include/amdblocks/s3_resume.h | 21 --------------------- src/soc/amd/common/block/pi/heapmanager.c | 5 +---- 3 files changed, 1 insertion(+), 33 deletions(-) delete mode 100644 src/soc/amd/common/block/include/amdblocks/s3_resume.h diff --git a/src/soc/amd/common/block/include/amdblocks/BiosCallOuts.h b/src/soc/amd/common/block/include/amdblocks/BiosCallOuts.h index 8a9474eb0d..e061c63463 100644 --- a/src/soc/amd/common/block/include/amdblocks/BiosCallOuts.h +++ b/src/soc/amd/common/block/include/amdblocks/BiosCallOuts.h @@ -18,18 +18,10 @@ #define __CALLOUTS_AMD_AGESA_H__ #include -#include #define BIOS_HEAP_SIZE 0x30000 #define BSP_STACK_BASE_ADDR 0x30000 -struct cbmem_usage { - uint8_t heap_base[BIOS_HEAP_SIZE]; -#if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME) - uint8_t s3_vol_data[S3_VOLATILE_SIZE]; -#endif -}; - typedef struct _BIOS_HEAP_MANAGER { UINT32 StartOfAllocatedNodes; UINT32 StartOfFreedNodes; diff --git a/src/soc/amd/common/block/include/amdblocks/s3_resume.h b/src/soc/amd/common/block/include/amdblocks/s3_resume.h deleted file mode 100644 index 567b0a8c40..0000000000 --- a/src/soc/amd/common/block/include/amdblocks/s3_resume.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * This file is part of the coreboot project. - * - * Copyright (C) 2017 Advanced Micro Devices, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - -#ifndef __AMD_S3_RESUME_H__ -#define __AMD_S3_RESUME_H__ - -#define S3_VOLATILE_SIZE 0x6000 - -#endif /* __AMD_S3_RESUME_H__ */ diff --git a/src/soc/amd/common/block/pi/heapmanager.c b/src/soc/amd/common/block/pi/heapmanager.c index 6b47ec3ac0..79c8403f3e 100644 --- a/src/soc/amd/common/block/pi/heapmanager.c +++ b/src/soc/amd/common/block/pi/heapmanager.c @@ -21,10 +21,7 @@ void *agesa_heap_base(void) { - struct cbmem_usage *heap; - heap = (struct cbmem_usage *)cbmem_add(CBMEM_ID_RESUME_SCRATCH, - sizeof(struct cbmem_usage)); - return &heap->heap_base; + return cbmem_add(CBMEM_ID_RESUME_SCRATCH, BIOS_HEAP_SIZE); } static void EmptyHeap(int unused) -- cgit v1.2.3