Deleted Added
sdiff udiff text old ( 5568:d14250d688d2 ) new ( 5569:baeee670d4ce )
full compact
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) {
178 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
186
187void
188AlphaSystem::setAlphaAccess(Addr access)
189{
190 Addr addr = 0;
191 if (consoleSymtab->findAddress("m5AlphaAccess", addr)) {
192 virtPort.write(addr, htog(Phys2K0Seg(access)));
193 } else
194 panic("could not find m5AlphaAccess\n");
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
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}