[coreboot-gerrit] Change in coreboot[master]: soc/amd/common: Convert GetHeapBase to void pointer

Marshall Dawson (Code Review) gerrit at coreboot.org
Tue Sep 19 03:19:44 CEST 2017


Marshall Dawson has uploaded this change for review. ( https://review.coreboot.org/21593


Change subject: soc/amd/common: Convert GetHeapBase to void pointer
......................................................................

soc/amd/common: Convert GetHeapBase to void pointer

Change the type of value returned by GetHeapBase().  This should be
innocuous, and will allow a subsequent patch to be simpler.

Change-Id: Id4a024d000a514ea9a44f9dfc2caffae9ff01789
Signed-off-by: Marshall Dawson <marshalldawson3rd at gmail.com>
---
M src/soc/amd/common/BiosCallOuts.h
M src/soc/amd/common/heapmanager.c
2 files changed, 8 insertions(+), 8 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/93/21593/1

diff --git a/src/soc/amd/common/BiosCallOuts.h b/src/soc/amd/common/BiosCallOuts.h
index 4456466..00ce745 100644
--- a/src/soc/amd/common/BiosCallOuts.h
+++ b/src/soc/amd/common/BiosCallOuts.h
@@ -35,7 +35,7 @@
 	UINT32 NextNodeOffset;
 } BIOS_BUFFER_NODE;
 
-UINT32 GetHeapBase(AMD_CONFIG_PARAMS *StdHeader);
+void *GetHeapBase(AMD_CONFIG_PARAMS *StdHeader);
 void EmptyHeap(void);
 
 AGESA_STATUS agesa_AllocateBuffer(UINT32 Func, UINTN Data, VOID *ConfigPtr);
diff --git a/src/soc/amd/common/heapmanager.c b/src/soc/amd/common/heapmanager.c
index 6c240eb..902fb15 100644
--- a/src/soc/amd/common/heapmanager.c
+++ b/src/soc/amd/common/heapmanager.c
@@ -20,19 +20,19 @@
 #include <heapManager.h>
 #include <string.h>
 
-UINT32 GetHeapBase(AMD_CONFIG_PARAMS *StdHeader)
+void *GetHeapBase(AMD_CONFIG_PARAMS *StdHeader)
 {
-	UINT32 heap = BIOS_HEAP_START_ADDRESS;
+	void *heap = (void *)BIOS_HEAP_START_ADDRESS;
 
 	if (acpi_is_wakeup_s3())
-		heap = (UINT32)cbmem_find(CBMEM_ID_RESUME_SCRATCH);
+		heap = cbmem_find(CBMEM_ID_RESUME_SCRATCH);
 
 	return heap;
 }
 
 void EmptyHeap(void)
 {
-	void *BiosManagerPtr = (void *)GetHeapBase(NULL);
+	void *BiosManagerPtr = GetHeapBase(NULL);
 	memset(BiosManagerPtr, 0, BIOS_HEAP_SIZE);
 }
 
@@ -58,7 +58,7 @@
 	AllocParams->BufferPointer = NULL;
 
 	AvailableHeapSize = BIOS_HEAP_SIZE - sizeof(BIOS_HEAP_MANAGER);
-	BiosHeapBaseAddr = (UINT8 *)GetHeapBase(&(AllocParams->StdHeader));
+	BiosHeapBaseAddr = GetHeapBase(&(AllocParams->StdHeader));
 	BiosHeapBasePtr = (BIOS_HEAP_MANAGER *)BiosHeapBaseAddr;
 
 	if (BiosHeapBasePtr->StartOfAllocatedNodes == 0) {
@@ -215,7 +215,7 @@
 
 	AllocParams = (AGESA_BUFFER_PARAMS *)ConfigPtr;
 
-	BiosHeapBaseAddr = (UINT8 *)GetHeapBase(&(AllocParams->StdHeader));
+	BiosHeapBaseAddr = GetHeapBase(&(AllocParams->StdHeader));
 	BiosHeapBasePtr = (BIOS_HEAP_MANAGER *)BiosHeapBaseAddr;
 
 	/* Find target node to deallocate in list of allocated nodes.
@@ -338,7 +338,7 @@
 
 	AllocParams = (AGESA_BUFFER_PARAMS *)ConfigPtr;
 
-	BiosHeapBaseAddr = (UINT8 *)GetHeapBase(&(AllocParams->StdHeader));
+	BiosHeapBaseAddr = GetHeapBase(&(AllocParams->StdHeader));
 	BiosHeapBasePtr = (BIOS_HEAP_MANAGER *)BiosHeapBaseAddr;
 
 	AllocNodeOffset = BiosHeapBasePtr->StartOfAllocatedNodes;

-- 
To view, visit https://review.coreboot.org/21593
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id4a024d000a514ea9a44f9dfc2caffae9ff01789
Gerrit-Change-Number: 21593
Gerrit-PatchSet: 1
Gerrit-Owner: Marshall Dawson <marshalldawson3rd at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170919/04ab2fbe/attachment-0001.html>


More information about the coreboot-gerrit mailing list