diff options
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/alpha/freebsd/system.cc | 5 | ||||
-rw-r--r-- | src/arch/alpha/linux/system.cc | 6 | ||||
-rw-r--r-- | src/arch/alpha/stacktrace.cc | 1 | ||||
-rw-r--r-- | src/arch/alpha/system.cc | 17 | ||||
-rw-r--r-- | src/arch/alpha/tru64/system.cc | 3 | ||||
-rw-r--r-- | src/arch/arm/linux/system.cc | 4 | ||||
-rw-r--r-- | src/arch/arm/stacktrace.cc | 1 | ||||
-rw-r--r-- | src/arch/arm/system.cc | 1 | ||||
-rwxr-xr-x | src/arch/mips/system.cc | 10 |
9 files changed, 27 insertions, 21 deletions
diff --git a/src/arch/alpha/freebsd/system.cc b/src/arch/alpha/freebsd/system.cc index ac7a92ed3..6c7da711f 100644 --- a/src/arch/alpha/freebsd/system.cc +++ b/src/arch/alpha/freebsd/system.cc @@ -43,6 +43,7 @@ #include "cpu/thread_context.hh" #include "mem/physical.hh" #include "mem/port.hh" +#include "mem/vport.hh" #include "sim/byteswap.hh" #define TIMER_FREQUENCY 1193180 @@ -77,8 +78,8 @@ FreebsdAlphaSystem::doCalibrateClocks(ThreadContext *tc) ppc_vaddr = (Addr)tc->readIntReg(17); timer_vaddr = (Addr)tc->readIntReg(18); - virtPort.write(ppc_vaddr, (uint32_t)SimClock::Frequency); - virtPort.write(timer_vaddr, (uint32_t)TIMER_FREQUENCY); + virtPort->write(ppc_vaddr, (uint32_t)SimClock::Frequency); + virtPort->write(timer_vaddr, (uint32_t)TIMER_FREQUENCY); } void diff --git a/src/arch/alpha/linux/system.cc b/src/arch/alpha/linux/system.cc index c2af286dd..1bb8bd2cf 100644 --- a/src/arch/alpha/linux/system.cc +++ b/src/arch/alpha/linux/system.cc @@ -77,7 +77,7 @@ LinuxAlphaSystem::LinuxAlphaSystem(Params *p) * Since we aren't using a bootloader, we have to copy the * kernel arguments directly into the kernel's memory. */ - virtPort.writeBlob(CommandLine(), (uint8_t*)params()->boot_osflags.c_str(), + virtPort->writeBlob(CommandLine(), (uint8_t*)params()->boot_osflags.c_str(), params()->boot_osflags.length()+1); /** @@ -86,7 +86,7 @@ LinuxAlphaSystem::LinuxAlphaSystem(Params *p) * calculated it by using the PIT, RTC, etc. */ if (kernelSymtab->findAddress("est_cycle_freq", addr)) - virtPort.write(addr, (uint64_t)(SimClock::Frequency / + virtPort->write(addr, (uint64_t)(SimClock::Frequency / p->boot_cpu_frequency)); @@ -97,7 +97,7 @@ LinuxAlphaSystem::LinuxAlphaSystem(Params *p) * 255 ASNs. */ if (kernelSymtab->findAddress("dp264_mv", addr)) - virtPort.write(addr + 0x18, LittleEndianGuest::htog((uint32_t)127)); + virtPort->write(addr + 0x18, LittleEndianGuest::htog((uint32_t)127)); else panic("could not find dp264_mv\n"); diff --git a/src/arch/alpha/stacktrace.cc b/src/arch/alpha/stacktrace.cc index 9c6b3cff0..9744d56d1 100644 --- a/src/arch/alpha/stacktrace.cc +++ b/src/arch/alpha/stacktrace.cc @@ -37,6 +37,7 @@ #include "base/trace.hh" #include "cpu/base.hh" #include "cpu/thread_context.hh" +#include "mem/vport.hh" #include "sim/system.hh" using namespace std; 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"); } diff --git a/src/arch/alpha/tru64/system.cc b/src/arch/alpha/tru64/system.cc index db3402d2a..5a47addbd 100644 --- a/src/arch/alpha/tru64/system.cc +++ b/src/arch/alpha/tru64/system.cc @@ -40,6 +40,7 @@ #include "kern/system_events.hh" #include "mem/physical.hh" #include "mem/port.hh" +#include "mem/vport.hh" using namespace std; @@ -48,7 +49,7 @@ Tru64AlphaSystem::Tru64AlphaSystem(Tru64AlphaSystem::Params *p) { Addr addr = 0; if (kernelSymtab->findAddress("enable_async_printf", addr)) { - virtPort.write(addr, (uint32_t)0); + virtPort->write(addr, (uint32_t)0); } #ifdef DEBUG diff --git a/src/arch/arm/linux/system.cc b/src/arch/arm/linux/system.cc index 40658976b..ddf7f19f3 100644 --- a/src/arch/arm/linux/system.cc +++ b/src/arch/arm/linux/system.cc @@ -43,8 +43,10 @@ #include "arch/arm/isa_traits.hh" #include "arch/arm/linux/atag.hh" #include "arch/arm/linux/system.hh" +#include "arch/arm/utility.hh" #include "base/loader/object_file.hh" #include "base/loader/symtab.hh" +#include "cpu/thread_context.hh" #include "mem/physical.hh" using namespace ArmISA; @@ -87,7 +89,7 @@ LinuxArmSystem::LinuxArmSystem(Params *p) DPRINTF(Loader, "Boot atags was %d bytes in total\n", size << 2); DDUMP(Loader, boot_data, size << 2); - functionalPort.writeBlob(ParamsList, boot_data, size << 2); + functionalPort->writeBlob(ParamsList, boot_data, size << 2); #ifndef NDEBUG kernelPanicEvent = addKernelFuncEvent<BreakPCEvent>("panic"); diff --git a/src/arch/arm/stacktrace.cc b/src/arch/arm/stacktrace.cc index 6b346b0ab..31376cdae 100644 --- a/src/arch/arm/stacktrace.cc +++ b/src/arch/arm/stacktrace.cc @@ -37,6 +37,7 @@ #include "base/trace.hh" #include "cpu/base.hh" #include "cpu/thread_context.hh" +#include "mem/vport.hh" #include "sim/system.hh" using namespace std; diff --git a/src/arch/arm/system.cc b/src/arch/arm/system.cc index 756f64eb7..f6e265ae4 100644 --- a/src/arch/arm/system.cc +++ b/src/arch/arm/system.cc @@ -44,7 +44,6 @@ #include <iostream> using namespace std; -using namespace ArmISA; using namespace Linux; ArmSystem::ArmSystem(Params *p) diff --git a/src/arch/mips/system.cc b/src/arch/mips/system.cc index d11d473e3..6e2ad4d5a 100755 --- a/src/arch/mips/system.cc +++ b/src/arch/mips/system.cc @@ -50,7 +50,7 @@ MipsSystem::MipsSystem(Params *p) : System(p) #if FULL_SYSTEM if (p->bare_iron == true) { hexFile = new HexFile(params()->hex_file_name); - if (!hexFile->loadSections(&functionalPort)) + if (!hexFile->loadSections(functionalPort)) panic("Could not load hex file\n"); } @@ -70,7 +70,7 @@ MipsSystem::MipsSystem(Params *p) : System(p) if (console == NULL) fatal("Could not load console file %s", params()->console); //Load program sections into memory - console->loadSections(&functionalPort, loadAddrMask); + console->loadSections(functionalPort, loadAddrMask); //load symbols if (!console->loadGlobalSymbols(consoleSymtab)) @@ -92,7 +92,7 @@ MipsSystem::MipsSystem(Params *p) : System(p) */ if (consoleSymtab->findAddress("env_booted_osflags", addr)) { warn("writing addr starting from %#x", 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())); } @@ -103,9 +103,9 @@ MipsSystem::MipsSystem(Params *p) : System(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"); } |