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 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) { |
177 Addr new_addr = addr + 2 * sizeof(MachInst); |
178 DPRINTF(Loader, "fixFuncEventAddr: %p -> %p", addr, new_addr); 179 return new_addr; 180 } else { 181 return addr; 182 } 183} 184 |
185void 186AlphaSystem::setAlphaAccess(Addr access) 187{ 188 Addr addr = 0; 189 if (consoleSymtab->findAddress("m5AlphaAccess", addr)) { 190 virtPort.write(addr, htog(Phys2K0Seg(access))); |
191 } else { |
192 panic("could not find m5AlphaAccess\n"); |
193 } |
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 |
204void 205AlphaSystem::unserialize(Checkpoint *cp, const std::string §ion) 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} |