summaryrefslogtreecommitdiff
path: root/src/arch/arm/linux
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/arm/linux')
-rw-r--r--src/arch/arm/linux/system.cc21
-rw-r--r--src/arch/arm/linux/system.hh11
2 files changed, 32 insertions, 0 deletions
diff --git a/src/arch/arm/linux/system.cc b/src/arch/arm/linux/system.cc
index 445fa2f19..66f4f26af 100644
--- a/src/arch/arm/linux/system.cc
+++ b/src/arch/arm/linux/system.cc
@@ -117,6 +117,27 @@ LinuxArmSystem::LinuxArmSystem(Params *p)
} else {
panic("couldn't find kernel symbol \'udelay\'");
}
+
+ secDataPtrAddr = 0;
+ secDataAddr = 0;
+ penReleaseAddr = 0;
+ kernelSymtab->findAddress("__secondary_data", secDataPtrAddr);
+ kernelSymtab->findAddress("secondary_data", secDataAddr);
+ kernelSymtab->findAddress("pen_release", penReleaseAddr);
+
+ secDataPtrAddr &= ~ULL(0x7F);
+ secDataAddr &= ~ULL(0x7F);
+ penReleaseAddr &= ~ULL(0x7F);
+}
+
+bool
+LinuxArmSystem::adderBootUncacheable(Addr a)
+{
+ Addr block = a & ~ULL(0x7F);
+ if (block == secDataPtrAddr || block == secDataAddr ||
+ block == penReleaseAddr)
+ return true;
+ return false;
}
void
diff --git a/src/arch/arm/linux/system.hh b/src/arch/arm/linux/system.hh
index 2ef65fea2..54681096b 100644
--- a/src/arch/arm/linux/system.hh
+++ b/src/arch/arm/linux/system.hh
@@ -69,6 +69,8 @@ class LinuxArmSystem : public ArmSystem
void initState();
+ bool adderBootUncacheable(Addr a);
+
private:
#ifndef NDEBUG
/** Event to halt the simulator if the kernel calls panic() */
@@ -87,6 +89,15 @@ class LinuxArmSystem : public ArmSystem
* Thus we need to do some division to get back to us.
*/
Linux::UDelayEvent *constUDelaySkipEvent;
+
+ /** These variables store addresses of important data structures
+ * that are normaly kept coherent at boot with cache mainetence operations.
+ * Since these operations aren't supported in gem5, we keep them coherent
+ * by making them uncacheable until all processors in the system boot.
+ */
+ Addr secDataPtrAddr;
+ Addr secDataAddr;
+ Addr penReleaseAddr;
};
#endif // __ARCH_ARM_LINUX_SYSTEM_HH__