From 87df26731eef23c44aa8d9ad92a7ed89d6fbd2ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Sat, 23 Sep 2017 14:36:16 +0300 Subject: AGESA: Remove heap allocations from OemCustomize.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We can simply declare these structures const. Change-Id: I637c60cc2f83e682bd5e415b674f6e27c705ac91 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/21631 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/mainboard/biostar/am1ml/OemCustomize.c | 40 +----------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) (limited to 'src/mainboard/biostar/am1ml') diff --git a/src/mainboard/biostar/am1ml/OemCustomize.c b/src/mainboard/biostar/am1ml/OemCustomize.c index dc5219cd17..80528c3ff5 100644 --- a/src/mainboard/biostar/am1ml/OemCustomize.c +++ b/src/mainboard/biostar/am1ml/OemCustomize.c @@ -14,13 +14,10 @@ */ #include "AGESA.h" -#include "amdlib.h" -#include "heapManager.h" #include #include - static const PCIe_PORT_DESCRIPTOR PortList[] = { { 0, @@ -113,44 +110,9 @@ void board_BeforeInitReset(struct sysinfo *cb, AMD_RESET_PARAMS *Reset) FchReset->IdeEnable = 0; } -/*---------------------------------------------------------------------------------------*/ -/** - * OemCustomizeInitEarly - * - * Description: - * This is the stub function will call the host environment through the binary block - * interface (call-out port) to provide a user hook opportunity - * - * Parameters: - * @param[in] *InitEarly - * - * @retval VOID - * - **/ -/*---------------------------------------------------------------------------------------*/ - void board_BeforeInitEarly(struct sysinfo *cb, AMD_EARLY_PARAMS *InitEarly) { - AGESA_STATUS Status; - PCIe_COMPLEX_DESCRIPTOR *PcieComplexListPtr; - - ALLOCATE_HEAP_PARAMS AllocHeapParams; - - /* GNB PCIe topology Porting */ - - /* */ - /* Allocate buffer for PCIe_COMPLEX_DESCRIPTOR , PCIe_PORT_DESCRIPTOR and PCIe_DDI_DESCRIPTOR */ - /* */ - AllocHeapParams.RequestedBufferSize = sizeof(PcieComplex); - - AllocHeapParams.BufferHandle = AMD_MEM_MISC_HANDLES_START; - AllocHeapParams.Persist = HEAP_LOCAL_CACHE; - Status = HeapAllocateBuffer (&AllocHeapParams, &InitEarly->StdHeader); - ASSERT(Status == AGESA_SUCCESS); - - PcieComplexListPtr = (PCIe_COMPLEX_DESCRIPTOR *) AllocHeapParams.BufferPtr; - LibAmdMemCopy (PcieComplexListPtr, &PcieComplex, sizeof(PcieComplex), &InitEarly->StdHeader); - InitEarly->GnbConfig.PcieComplexList = PcieComplexListPtr; + InitEarly->GnbConfig.PcieComplexList = &PcieComplex; } /*---------------------------------------------------------------------------------------- -- cgit v1.2.3