common.c
1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
* Copyright (C) 1996-1998 by the Board of Trustees
* of Leland Stanford Junior University.
*
* This file is part of the SimOS distribution.
* See LICENSE file for terms of the license.
*
*/
/*****************************************************************
*
*
* Author: $Author: blythe $
* Date: $Date: 2002/05/29 01:09:11 $
*****************************************************************/
#include <string.h>
#include "syslimits.h"
#include "machine_params.h"
#include "sim_error.h"
#include "simutil.h"
#include "../memsys.h"
MemsysVector memsysVec;
extern void BusUmaInit(void);
extern void Chal2MemInit(void);
extern void NumaInit(void);
extern void PerfectMemInit(void);
extern void FlashliteInit(void);
/*
* Initialize the selected memory system. Each one is responsible to
* initialize the memsysVec indirection entries.
*/
void
MemsysInit(void)
{
if (!strcmp(MEMSYS_MODEL, "Numa")) {
NumaInit();
} else if (!strcmp(MEMSYS_MODEL, "BusUma")) {
BusUmaInit();
} else if (!strcmp(MEMSYS_MODEL, "Perfect")) {
PerfectMemInit();
#if defined(SIM_X86)
} else if (!strcmp(MEMSYS_MODEL, "Chal2")) {
Chal2MemInit();
#endif
#if defined(SIM_MIPS32) || defined(SIM_MIPS64)
} else if (!strcmp(MEMSYS_MODEL, "Flashlite")) {
FlashliteInit();
#endif
} else {
CPUError("Unknown MemSys configuration value: %s\n", MEMSYS_MODEL);
}
}