system.cc (5568:d14250d688d2) system.cc (5569:baeee670d4ce)
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;

--- 102 unchanged lines hidden (view full) ---

111 if (consoleSymtab->findAddress("m5_rpb", addr)) {
112 uint64_t data;
113 data = htog(params()->system_type);
114 virtPort.write(addr+0x50, data);
115 data = htog(params()->system_rev);
116 virtPort.write(addr+0x58, data);
117 } else
118 panic("could not find hwrpb\n");
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;

--- 102 unchanged lines hidden (view full) ---

111 if (consoleSymtab->findAddress("m5_rpb", addr)) {
112 uint64_t data;
113 data = htog(params()->system_type);
114 virtPort.write(addr+0x50, data);
115 data = htog(params()->system_rev);
116 virtPort.write(addr+0x58, data);
117 } else
118 panic("could not find hwrpb\n");
119
120}
121
122AlphaSystem::~AlphaSystem()
123{
124 delete consoleSymtab;
125 delete console;
126 delete pal;
127#ifdef DEBUG

--- 42 unchanged lines hidden (view full) ---

170 // lda gp,Y(gp): opcode 8, Ra = 29, rb = 29
171 const uint32_t gp_lda_pattern = (8 << 26) | (29 << 21) | (29 << 16);
172
173 uint32_t i1 = virtPort.read<uint32_t>(addr);
174 uint32_t i2 = virtPort.read<uint32_t>(addr + sizeof(MachInst));
175
176 if ((i1 & inst_mask) == gp_ldah_pattern &&
177 (i2 & inst_mask) == gp_lda_pattern) {
119}
120
121AlphaSystem::~AlphaSystem()
122{
123 delete consoleSymtab;
124 delete console;
125 delete pal;
126#ifdef DEBUG

--- 42 unchanged lines hidden (view full) ---

169 // lda gp,Y(gp): opcode 8, Ra = 29, rb = 29
170 const uint32_t gp_lda_pattern = (8 << 26) | (29 << 21) | (29 << 16);
171
172 uint32_t i1 = virtPort.read<uint32_t>(addr);
173 uint32_t i2 = virtPort.read<uint32_t>(addr + sizeof(MachInst));
174
175 if ((i1 & inst_mask) == gp_ldah_pattern &&
176 (i2 & inst_mask) == gp_lda_pattern) {
178 Addr new_addr = addr + 2* sizeof(MachInst);
177 Addr new_addr = addr + 2 * sizeof(MachInst);
179 DPRINTF(Loader, "fixFuncEventAddr: %p -> %p", addr, new_addr);
180 return new_addr;
181 } else {
182 return addr;
183 }
184}
185
178 DPRINTF(Loader, "fixFuncEventAddr: %p -> %p", addr, new_addr);
179 return new_addr;
180 } else {
181 return addr;
182 }
183}
184
186
187void
188AlphaSystem::setAlphaAccess(Addr access)
189{
190 Addr addr = 0;
191 if (consoleSymtab->findAddress("m5AlphaAccess", addr)) {
192 virtPort.write(addr, htog(Phys2K0Seg(access)));
185void
186AlphaSystem::setAlphaAccess(Addr access)
187{
188 Addr addr = 0;
189 if (consoleSymtab->findAddress("m5AlphaAccess", addr)) {
190 virtPort.write(addr, htog(Phys2K0Seg(access)));
193 } else
191 } else {
194 panic("could not find m5AlphaAccess\n");
192 panic("could not find m5AlphaAccess\n");
193 }
195}
196
197void
198AlphaSystem::serialize(std::ostream &os)
199{
200 System::serialize(os);
201 consoleSymtab->serialize("console_symtab", os);
202 palSymtab->serialize("pal_symtab", os);
203}
204
194}
195
196void
197AlphaSystem::serialize(std::ostream &os)
198{
199 System::serialize(os);
200 consoleSymtab->serialize("console_symtab", os);
201 palSymtab->serialize("pal_symtab", os);
202}
203
205
206void
207AlphaSystem::unserialize(Checkpoint *cp, const std::string &section)
208{
209 System::unserialize(cp,section);
210 consoleSymtab->unserialize("console_symtab", cp, section);
211 palSymtab->unserialize("pal_symtab", cp, section);
212}
213
214AlphaSystem *
215AlphaSystemParams::create()
216{
217 return new AlphaSystem(this);
218}
204void
205AlphaSystem::unserialize(Checkpoint *cp, const std::string &section)
206{
207 System::unserialize(cp,section);
208 consoleSymtab->unserialize("console_symtab", cp, section);
209 palSymtab->unserialize("pal_symtab", cp, section);
210}
211
212AlphaSystem *
213AlphaSystemParams::create()
214{
215 return new AlphaSystem(this);
216}