alpha_params.c
2.75 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*
* Copyright (C) 1998 by the Board of Trustees
* of Leland Stanford Junior University.
* Copyright (C) 1998 Digital Equipment Corporation
*
* This file is part of the SimOS distribution.
* See LICENSE file for terms of the license.
*
*/
#include <stdlib.h>
#include "params.h"
#include "alpha.h"
#include "alpha_params.h"
#include "cpu_interface.h"
#include "annotations.h"
#include "tclsimos.h"
#include "tb.h"
#include "ev5.h"
void AlphaCommitAnnExec()
{
AnnPtr ann;
for (AnnFirst("commit", &ann); ann; AnnNext(&ann)) {
AnnExec(ann);
}
}
/* called from tcl_init.c:TCLInit */
struct AlphaConsoleParams alphaConsoleParams;
struct AlphaDebugParams alphaDebugParams;
char *
DTBAccess(ClientData clientData, Tcl_Interp *interp,
char *name1, char *name2, int flags)
{
Tcl_SetVar(interp, "DTB", TBPrint(PE[CPUVec.CurrentCpuNum()]->tb, TB_DATA), TCL_GLOBAL_ONLY);
return NULL;
}
extern char *
IPRAccess(ClientData clientData, Tcl_Interp *interp,
char *name1, char *name2, int flags);
void AlphaTclInit(void)
{
ParamRegister("PARAM(ALPHA.BootNT)", (char *)&alphaConsoleParams.bootNT,
PARAM_BOOLEAN);
ParamRegister("PARAM(ALPHA.Files.PALCode)", (char *)&alphaConsoleParams.PALcodeFileName,
PARAM_STRING);
ParamRegister("PARAM(ALPHA.Files.Console)", (char *)&alphaConsoleParams.consoleFileName,
PARAM_STRING);
ParamRegister("PARAM(ALPHA.Files.Kernel)", (char *)&alphaConsoleParams.kernelFileName,
PARAM_STRING);
ParamRegister("PARAM(ALPHA.Files.NT_Firmware)", (char *)&alphaConsoleParams.NT_FirmwareFileName,
PARAM_STRING);
ParamRegister("PARAM(ALPHA.Files.NT_OSLoader)", (char *)&alphaConsoleParams.NT_OSLoaderFileName,
PARAM_STRING);
ParamRegister("PARAM(CPU.Alpha.Debug.Traps)", (char *)&alphaDebugParams.debugTraps,
PARAM_INT);
ParamRegister("PARAM(CPU.Alpha.Debug.Interrupts)", (char *)&alphaDebugParams.debugInterrupts,
PARAM_INT);
ParamRegister("PARAM(CPU.Alpha.Debug.TBInsert)", (char *)&alphaDebugParams.debugTBInsert,
PARAM_INT);
ParamRegister("PARAM(CPU.Alpha.Debug.VATranslation)", (char *)&alphaDebugParams.debugVATranslation,
PARAM_INT);
Tcl_SetVar2(TCLInterp, "IPR", "0", "0", TCL_GLOBAL_ONLY);
Tcl_TraceVar(TCLInterp, "IPR",
TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_GLOBAL_ONLY,
IPRAccess, NULL);
Tcl_SetVar2(TCLInterp, "DTB", "0", "0", TCL_GLOBAL_ONLY);
Tcl_TraceVar(TCLInterp, "DTB",
TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_GLOBAL_ONLY,
DTBAccess, NULL);
}
extern void AlphaTraceTclInit(Tcl_Interp *interp);
void
(*FFF)(Tcl_Interp *interp) = AlphaTraceTclInit;