Subversion Repositories HelenOS

Rev

Rev 341 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 341 Rev 344
Line 43... Line 43...
43
    "LoadedProgram",
43
    "LoadedProgram",
44
    "FirmwareTemporary",
44
    "FirmwareTemporary",
45
    "FirmwarePermanent"
45
    "FirmwarePermanent"
46
};
46
};
47
 
47
 
-
 
48
static char *ctypes[] = {
-
 
49
    "ARC_type",
-
 
50
    "CPU_type",
-
 
51
    "FPU_type",
-
 
52
    "PrimaryICache",
-
 
53
    "PrimaryDCache",
-
 
54
    "SecondaryICache",
-
 
55
    "SecondaryDCache",
-
 
56
    "SecondaryCache",
-
 
57
    "Memory",
-
 
58
    "EISAAdapter",
-
 
59
    "TCAdapter",
-
 
60
    "SCSIAdapter",
-
 
61
    "DTIAdapter",
-
 
62
    "MultiFunctionAdapter",
-
 
63
    "DiskController",
-
 
64
    "TapeController",
-
 
65
    "CDROMController",
-
 
66
    "WORMController",
-
 
67
    "SerialController",
-
 
68
    "NetworkController",
-
 
69
    "DisplayController",
-
 
70
    "ParallelController",
-
 
71
    "PointerController",
-
 
72
    "KeyboardController",
-
 
73
    "AudioController",
-
 
74
    "OtherController",
-
 
75
    "DiskPeripheral",
-
 
76
    "FloppyDiskPeripheral",
-
 
77
    "TapePeripheral",
-
 
78
    "ModemPeripheral",
-
 
79
    "MonitorPeripheral",
-
 
80
    "PrinterPeripheral",
-
 
81
    "PointerPeripheral",
-
 
82
    "KeyboardPeripheral",
-
 
83
    "TerminalPeripheral",
-
 
84
    "OtherPeripheral",
-
 
85
    "LinePeripheral",
-
 
86
    "NetworkPeripheral"
-
 
87
    "OtherPeripheral",
-
 
88
    "XTalkAdapter",
-
 
89
    "PCIAdapter",
-
 
90
    "GIOAdapter",
-
 
91
    "TPUAdapter",
-
 
92
    "Anonymous"
-
 
93
};
-
 
94
 
48
static arc_sbp *sbp = (arc_sbp *)PA2KA(0x1000);
95
static arc_sbp *sbp = (arc_sbp *)PA2KA(0x1000);
49
static arc_func_vector_t *arc_entry;
96
static arc_func_vector_t *arc_entry;
50
 
97
 
51
static void _arc_putchar(char ch);
98
static void _arc_putchar(char ch);
52
 
99
 
Line 72... Line 119...
72
int arc_enabled(void)
119
int arc_enabled(void)
73
{
120
{
74
    return sbp != NULL;
121
    return sbp != NULL;
75
}
122
}
76
 
123
 
-
 
124
static void arc_print_component(arc_component *c)
-
 
125
{
-
 
126
    int i;
-
 
127
 
-
 
128
    printf("%s: ",ctypes[c->type]);
-
 
129
    for (i=0;i < c->identifier_len;i++)
-
 
130
        putchar(c->identifier[i]);
-
 
131
    putchar('\n');
-
 
132
}
-
 
133
 
-
 
134
void arc_print_devices(void)
-
 
135
{
-
 
136
    arc_component *c,*next;
-
 
137
 
-
 
138
    if (!arc_enabled())
-
 
139
        return;
-
 
140
 
-
 
141
    c = arc_entry->getchild(NULL);
-
 
142
    while (c) {
-
 
143
        arc_print_component(c);
-
 
144
        next = arc_entry->getchild(c);
-
 
145
        while (!next) {
-
 
146
            next = arc_entry->getpeer(c);
-
 
147
            if (!next)
-
 
148
                c = arc_entry->getparent(c);
-
 
149
            if (!c)
-
 
150
                return;
-
 
151
        }
-
 
152
        c = next;
-
 
153
    }
-
 
154
}
-
 
155
 
77
void arc_print_memory_map(void)
156
void arc_print_memory_map(void)
78
{
157
{
79
    arc_memdescriptor_t *desc;
158
    arc_memdescriptor_t *desc;
80
 
159
 
81
    if (!sbp) {
160
    if (!arc_enabled()) {
82
        printf("ARC not enabled.\n");
161
        printf("ARC not enabled.\n");
83
        return;
162
        return;
84
    }
163
    }
85
 
164
 
86
    printf("Memory map:\n");
165
    printf("Memory map:\n");