gem5  v20.1.0.0
access.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2002-2005 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 __MIPS_ACCESS_H__
30 #define __MIPS_ACCESS_H__
31 
36 #define MIPS_ACCESS_VERSION (1305)
37 #define CONSOLE_START_ADDRESS 0xBFD00F00
38 #define REG_OFFSET 1
39 #define UART8250_BASE 0xBFD003F8
40 #define UART8250_END 7*REG_OFFSET
41 #ifdef CONSOLE
42 typedef unsigned uint32_t;
43 typedef unsigned long uint64_t;
44 #endif
45 
46 // This structure hacked up from simos
47 struct MipsAccess
48 {
49  uint32_t inputChar; // 00: Placeholder for input
50  uint32_t last_offset; // 04: must be first field
51  uint32_t version; // 08:
52  uint32_t numCPUs; // 0C:
53  uint32_t intrClockFrequency; // 10: Hz
54 
55  // Loaded kernel
56  uint32_t kernStart; // 14:
57  uint32_t kernEnd; // 18:
58  uint32_t entryPoint; // 1c:
59 
60  // console simple output stuff
61  uint32_t outputChar; // 20: Placeholder for output
62 
63  // console disk stuff
64  uint32_t diskUnit; // 24:
65  uint32_t diskCount; // 28:
66  uint32_t diskPAddr; // 2c:
67  uint32_t diskBlock; // 30:
68  uint32_t diskOperation; // 34:
69 
70  // MP boot
71  uint32_t cpuStack[64]; // 70:
72 
73  /* XXX There appears to be a problem in accessing
74  * unit64_t in the console.c file. They are treated
75  * like uint32_int and result in the wrong address for
76  * everything below. This problem should be investigated.
77  */
78  uint64_t cpuClock; // 38: MHz
79  uint64_t mem_size; // 40:
80 };
81 
82 #endif // __MIPS_ACCESS_H__
MipsAccess::cpuClock
uint64_t cpuClock
Definition: access.h:78
MipsAccess::cpuStack
uint32_t cpuStack[64]
Definition: access.h:71
MipsAccess::diskBlock
uint32_t diskBlock
Definition: access.h:67
MipsAccess::kernEnd
uint32_t kernEnd
Definition: access.h:57
MipsAccess::mem_size
uint64_t mem_size
Definition: access.h:79
MipsAccess::diskPAddr
uint32_t diskPAddr
Definition: access.h:66
MipsAccess::inputChar
uint32_t inputChar
Definition: access.h:49
MipsAccess::intrClockFrequency
uint32_t intrClockFrequency
Definition: access.h:53
MipsAccess::version
uint32_t version
Definition: access.h:51
MipsAccess::last_offset
uint32_t last_offset
Definition: access.h:50
MipsAccess::diskCount
uint32_t diskCount
Definition: access.h:65
MipsAccess::outputChar
uint32_t outputChar
Definition: access.h:61
MipsAccess::kernStart
uint32_t kernStart
Definition: access.h:56
MipsAccess::diskUnit
uint32_t diskUnit
Definition: access.h:64
MipsAccess::numCPUs
uint32_t numCPUs
Definition: access.h:52
MipsAccess
Definition: access.h:47
MipsAccess::diskOperation
uint32_t diskOperation
Definition: access.h:68
MipsAccess::entryPoint
uint32_t entryPoint
Definition: access.h:58

Generated on Wed Sep 30 2020 14:02:11 for gem5 by doxygen 1.8.17