[coreboot-gerrit] New patch to review for coreboot: AGESA: Move heap allocator declarations
Kyösti Mälkki (kyosti.malkki@gmail.com)
gerrit at coreboot.org
Tue Mar 7 11:57:20 CET 2017
Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18616
-gerrit
commit d4d2817c9fb02b71eb435080909a66ec37ddd5d6
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date: Sun Mar 5 18:57:03 2017 +0200
AGESA: Move heap allocator declarations
Definitions are not part of ACPI S3 feature, nor do
they require any AGESA headers so move them to a
better location.
Change-Id: I9269e9d65463463d9b8280936cf90ef76711ed4f
Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
src/cpu/amd/agesa/heapmanager.c | 2 +-
src/cpu/amd/agesa/s3_resume.c | 1 +
src/cpu/amd/agesa/s3_resume.h | 16 ----------------
src/northbridge/amd/agesa/agesa_helper.h | 19 +++++++++++++++++++
src/northbridge/amd/agesa/oem_s3.c | 1 +
src/southbridge/amd/agesa/hudson/agesawrapper.c | 2 +-
6 files changed, 23 insertions(+), 18 deletions(-)
diff --git a/src/cpu/amd/agesa/heapmanager.c b/src/cpu/amd/agesa/heapmanager.c
index 087959d..9acd0bd 100644
--- a/src/cpu/amd/agesa/heapmanager.c
+++ b/src/cpu/amd/agesa/heapmanager.c
@@ -17,7 +17,7 @@
#include "heapManager.h"
#include <cbmem.h>
-#include <cpu/amd/agesa/s3_resume.h>
+#include <northbridge/amd/agesa/agesa_helper.h>
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include <arch/acpi.h>
diff --git a/src/cpu/amd/agesa/s3_resume.c b/src/cpu/amd/agesa/s3_resume.c
index 1e4aadb..f45ff3c 100644
--- a/src/cpu/amd/agesa/s3_resume.c
+++ b/src/cpu/amd/agesa/s3_resume.c
@@ -25,6 +25,7 @@
#include <string.h>
#include <halt.h>
#include "s3_resume.h"
+#include <northbridge/amd/agesa/agesa_helper.h>
static void move_stack_high_mem(void)
{
diff --git a/src/cpu/amd/agesa/s3_resume.h b/src/cpu/amd/agesa/s3_resume.h
index ff23966..b10489e 100644
--- a/src/cpu/amd/agesa/s3_resume.h
+++ b/src/cpu/amd/agesa/s3_resume.h
@@ -22,20 +22,4 @@ void prepare_for_resume(void);
void backup_mtrr(void *mtrr_store, u32 *mtrr_store_size);
const void *OemS3Saved_MTRR_Storage(void);
-void *GetHeapBase(void);
-void EmptyHeap(void);
-void ResumeHeap(void **heap, size_t *len);
-
-#define BSP_STACK_BASE_ADDR 0x30000
-
-#if 1
-/* This covers node 0 only. */
-#define HIGH_ROMSTAGE_STACK_SIZE (0x48000 - BSP_STACK_BASE_ADDR)
-#else
-/* This covers total of 8 nodes. */
-#define HIGH_ROMSTAGE_STACK_SIZE (0xA0000 - BSP_STACK_BASE_ADDR)
-#endif
-
-#define HIGH_MEMORY_SCRATCH 0x30000
-
#endif
diff --git a/src/northbridge/amd/agesa/agesa_helper.h b/src/northbridge/amd/agesa/agesa_helper.h
index 73f927e..82963c1 100644
--- a/src/northbridge/amd/agesa/agesa_helper.h
+++ b/src/northbridge/amd/agesa/agesa_helper.h
@@ -16,6 +16,8 @@
#ifndef _AGESA_HELPER_H_
#define _AGESA_HELPER_H_
+#include <stddef.h>
+
enum {
PICK_DMI, /* DMI Interface */
PICK_PSTATE, /* Acpi Pstate SSDT Table */
@@ -33,4 +35,21 @@ void amd_initcpuio(void);
void amd_initmmio(void);
void amd_initenv(void);
+void *GetHeapBase(void);
+void EmptyHeap(void);
+void ResumeHeap(void **heap, size_t *len);
+
+#define BSP_STACK_BASE_ADDR 0x30000
+
+#if 1
+/* This covers node 0 only. */
+#define HIGH_ROMSTAGE_STACK_SIZE (0x48000 - BSP_STACK_BASE_ADDR)
+#else
+/* This covers total of 8 nodes. */
+#define HIGH_ROMSTAGE_STACK_SIZE (0xA0000 - BSP_STACK_BASE_ADDR)
+#endif
+
+#define HIGH_MEMORY_SCRATCH 0x30000
+
+
#endif /* _AGESA_HELPER_H_ */
diff --git a/src/northbridge/amd/agesa/oem_s3.c b/src/northbridge/amd/agesa/oem_s3.c
index c7d23ff..a9504ac 100644
--- a/src/northbridge/amd/agesa/oem_s3.c
+++ b/src/northbridge/amd/agesa/oem_s3.c
@@ -21,6 +21,7 @@
#include <cpu/amd/agesa/s3_resume.h>
#include <northbridge/amd/agesa/agesawrapper.h>
#include <AGESA.h>
+#include <northbridge/amd/agesa/agesa_helper.h>
typedef enum {
S3DataTypeNonVolatile = 0, ///< NonVolatile Data Type
diff --git a/src/southbridge/amd/agesa/hudson/agesawrapper.c b/src/southbridge/amd/agesa/hudson/agesawrapper.c
index 0c0deff..0da792c 100644
--- a/src/southbridge/amd/agesa/hudson/agesawrapper.c
+++ b/src/southbridge/amd/agesa/hudson/agesawrapper.c
@@ -16,6 +16,7 @@
#include <stdint.h>
#include <string.h>
#include <cpu/x86/mtrr.h>
+#include <northbridge/amd/agesa/agesa_helper.h>
#include <northbridge/amd/agesa/agesawrapper.h>
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include "cpuRegisters.h"
@@ -30,7 +31,6 @@
#include "heapManager.h"
#include "FchPlatform.h"
#include "Fch.h"
-#include <cpu/amd/agesa/s3_resume.h>
#include <arch/io.h>
#include <device/device.h>
#include "hudson.h"
More information about the coreboot-gerrit
mailing list