summaryrefslogtreecommitdiff
path: root/src/arch/alpha/system.cc
diff options
context:
space:
mode:
authorAli Saidi <Ali.Saidi@ARM.com>2010-11-08 13:58:22 -0600
committerAli Saidi <Ali.Saidi@ARM.com>2010-11-08 13:58:22 -0600
commit0ea794bcf453093f83c21a56333d78ba1b8dae33 (patch)
tree969727aba252ca3f2f910a6d380a743409e4594e /src/arch/alpha/system.cc
parent72b526227857c5eeb90b52fad18eb2d647a27403 (diff)
downloadgem5-0ea794bcf453093f83c21a56333d78ba1b8dae33.tar.xz
sim: Use forward declarations for ports.
Virtual ports need TLB data which means anything touching a file in the arch directory rebuilds any file that includes system.hh which in everything.
Diffstat (limited to 'src/arch/alpha/system.cc')
-rw-r--r--src/arch/alpha/system.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/arch/alpha/system.cc b/src/arch/alpha/system.cc
index 2c5570d46..4964347fb 100644
--- a/src/arch/alpha/system.cc
+++ b/src/arch/alpha/system.cc
@@ -38,6 +38,7 @@
#include "base/loader/symtab.hh"
#include "base/trace.hh"
#include "mem/physical.hh"
+#include "mem/vport.hh"
#include "params/AlphaSystem.hh"
#include "sim/byteswap.hh"
@@ -65,8 +66,8 @@ AlphaSystem::AlphaSystem(Params *p)
// Load program sections into memory
- pal->loadSections(&functionalPort, loadAddrMask);
- console->loadSections(&functionalPort, loadAddrMask);
+ pal->loadSections(functionalPort, loadAddrMask);
+ console->loadSections(functionalPort, loadAddrMask);
// load symbols
if (!console->loadGlobalSymbols(consoleSymtab))
@@ -99,7 +100,7 @@ AlphaSystem::AlphaSystem(Params *p)
* others do.)
*/
if (consoleSymtab->findAddress("env_booted_osflags", addr)) {
- virtPort.writeBlob(addr, (uint8_t*)params()->boot_osflags.c_str(),
+ virtPort->writeBlob(addr, (uint8_t*)params()->boot_osflags.c_str(),
strlen(params()->boot_osflags.c_str()));
}
@@ -110,9 +111,9 @@ AlphaSystem::AlphaSystem(Params *p)
if (consoleSymtab->findAddress("m5_rpb", addr)) {
uint64_t data;
data = htog(params()->system_type);
- virtPort.write(addr+0x50, data);
+ virtPort->write(addr+0x50, data);
data = htog(params()->system_rev);
- virtPort.write(addr+0x58, data);
+ virtPort->write(addr+0x58, data);
} else
panic("could not find hwrpb\n");
}
@@ -168,8 +169,8 @@ AlphaSystem::fixFuncEventAddr(Addr addr)
// lda gp,Y(gp): opcode 8, Ra = 29, rb = 29
const uint32_t gp_lda_pattern = (8 << 26) | (29 << 21) | (29 << 16);
- uint32_t i1 = virtPort.read<uint32_t>(addr);
- uint32_t i2 = virtPort.read<uint32_t>(addr + sizeof(MachInst));
+ uint32_t i1 = virtPort->read<uint32_t>(addr);
+ uint32_t i2 = virtPort->read<uint32_t>(addr + sizeof(MachInst));
if ((i1 & inst_mask) == gp_ldah_pattern &&
(i2 & inst_mask) == gp_lda_pattern) {
@@ -186,7 +187,7 @@ AlphaSystem::setAlphaAccess(Addr access)
{
Addr addr = 0;
if (consoleSymtab->findAddress("m5AlphaAccess", addr)) {
- virtPort.write(addr, htog(Phys2K0Seg(access)));
+ virtPort->write(addr, htog(Phys2K0Seg(access)));
} else {
panic("could not find m5AlphaAccess\n");
}