eb551a3599600799ae8cf9c41b3ec900377fd632
[gem5.git] / dev / alpha_access.h
1 /*
2 * Copyright (c) 2003 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;
9 * redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution;
12 * neither the name of the copyright holders nor the names of its
13 * contributors may be used to endorse or promote products derived from
14 * this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29 #ifndef __ALPHA_ACCESS_H__
30 #define __ALPHA_ACCESS_H__
31
32 /* @file
33 * System Console Memory Mapped Register Definition
34 */
35
36 #define ALPHA_ACCESS_VERSION (1291+1) /* CH++*/
37
38 #ifdef CONSOLE
39 typedef uint32 UINT32;
40 typedef uint64 UINT64;
41 #else
42 typedef uint32_t UINT32;
43 typedef uint64_t UINT64;
44
45 #include <ostream>
46 #include <string>
47 class Checkpoint;
48
49 #endif
50
51 // This structure hacked up from simos
52 struct AlphaAccess
53 {
54 UINT32 last_offset; // 00: must be first field
55 UINT32 version; // 04:
56 UINT32 numCPUs; // 08:
57 UINT32 align0; // 0C: Placeholder for alignment
58 UINT64 mem_size; // 10:
59 UINT64 cpuClock; // 18: MHz
60 UINT32 intrClockFrequency; // 20: Hz
61 UINT32 align1; // 24: Placeholder for alignment
62
63 // Loaded kernel
64 UINT64 kernStart; // 28:
65 UINT64 kernEnd; // 30:
66 UINT64 entryPoint; // 38:
67
68 // console disk stuff
69 UINT64 diskUnit; // 40:
70 UINT64 diskCount; // 48:
71 UINT64 diskPAddr; // 50:
72 UINT64 diskBlock; // 58:
73 UINT64 diskOperation; // 60:
74
75 // console simple output stuff
76 UINT64 outputChar; // 68:
77
78 // MP boot
79 UINT64 bootStrapImpure; // 70:
80 UINT32 bootStrapCPU; // 78:
81 UINT32 align2; // 7C: Dummy placeholder for alignment
82
83 #ifndef CONSOLE
84 void serialize(std::ostream &os);
85 void unserialize(Checkpoint *cp, const std::string &section);
86 #endif
87 };
88
89 #endif // __ALPHA_ACCESS_H__