aboutsummaryrefslogtreecommitdiff
path: root/src/vendorcode/amd/agesa/common/debug_util.c
blob: 29d0841904a16f1af9385b0bce5936f2abfc0c51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <AGESA.h>
#include <AMD.h>
#include <heapManager.h>

#include "debug_util.h"

static const char undefined[] = "undefined";

static const char *HeapStatusStr[] = {
	"DoNotExistYet", "LocalCache", "TempMem", "SystemMem", "DoNotExistAnymore","S3Resume"
};

/* This function has to match with enumeration of XXXX defined
 * inside heapManager.h header file.
 */
const char *heap_status_name(UINT8 HeapStatus)
{
	if ((HeapStatus < HEAP_DO_NOT_EXIST_YET) || (HeapStatus > HEAP_S3_RESUME))
		return undefined;

	int index = HeapStatus - HEAP_DO_NOT_EXIST_YET;
	return HeapStatusStr[index];
}