blob: 29d0841904a16f1af9385b0bce5936f2abfc0c51 [file] [log] [blame]
Kyösti Mälkkic6918f92018-06-11 08:52:22 +03001
2#include <AGESA.h>
3#include <AMD.h>
4#include <heapManager.h>
5
6#include "debug_util.h"
7
8static const char undefined[] = "undefined";
9
10static const char *HeapStatusStr[] = {
11 "DoNotExistYet", "LocalCache", "TempMem", "SystemMem", "DoNotExistAnymore","S3Resume"
12};
13
14/* This function has to match with enumeration of XXXX defined
15 * inside heapManager.h header file.
16 */
17const char *heap_status_name(UINT8 HeapStatus)
18{
19 if ((HeapStatus < HEAP_DO_NOT_EXIST_YET) || (HeapStatus > HEAP_S3_RESUME))
20 return undefined;
21
22 int index = HeapStatus - HEAP_DO_NOT_EXIST_YET;
23 return HeapStatusStr[index];
24}