summaryrefslogtreecommitdiff
path: root/kern/freebsd/freebsd_system.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kern/freebsd/freebsd_system.cc')
-rw-r--r--kern/freebsd/freebsd_system.cc21
1 files changed, 12 insertions, 9 deletions
diff --git a/kern/freebsd/freebsd_system.cc b/kern/freebsd/freebsd_system.cc
index 5e0ce113b..283713d40 100644
--- a/kern/freebsd/freebsd_system.cc
+++ b/kern/freebsd/freebsd_system.cc
@@ -48,18 +48,13 @@ using namespace std;
FreebsdSystem::FreebsdSystem(Params *p)
: System(p)
{
- Addr addr = 0;
-
/**
* Any time DELAY is called just skip the function.
+ * Shouldn't we actually emulate the delay?
*/
- skipDelayEvent = new SkipFuncEvent(&pcEventQueue, "DELAY");
- if (kernelSymtab->findAddress("DELAY", addr))
- skipDelayEvent->schedule(addr+sizeof(MachInst));
-
- skipCalibrateClocks = new FreebsdSkipCalibrateClocksEvent(&pcEventQueue, "calibrate_clocks");
- if (kernelSymtab->findAddress("calibrate_clocks", addr))
- skipCalibrateClocks->schedule(addr + sizeof(MachInst) * 2);
+ skipDelayEvent = addKernelFuncEvent<SkipFuncEvent>("DELAY");
+ skipCalibrateClocks =
+ addKernelFuncEvent<SkipCalibrateClocksEvent>("calibrate_clocks");
}
@@ -92,6 +87,14 @@ FreebsdSystem::doCalibrateClocks(ExecContext *xc)
}
+void
+FreebsdSystem::SkipCalibrateClocksEvent::process(ExecContext *xc)
+{
+ SkipFuncEvent::process(xc);
+ ((FreebsdSystem *)xc->system)->doCalibrateClocks(xc);
+}
+
+
BEGIN_DECLARE_SIM_OBJECT_PARAMS(FreebsdSystem)
Param<Tick> boot_cpu_frequency;