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.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/kern/freebsd/freebsd_system.cc b/kern/freebsd/freebsd_system.cc
index 283713d40..f3fe84e00 100644
--- a/kern/freebsd/freebsd_system.cc
+++ b/kern/freebsd/freebsd_system.cc
@@ -39,6 +39,7 @@
#include "mem/functional/memory_control.hh"
#include "mem/functional/physical.hh"
#include "sim/builder.hh"
+#include "sim/byteswap.hh"
#include "targetarch/vtophys.hh"
#define TIMER_FREQUENCY 1193180
@@ -82,8 +83,8 @@ FreebsdSystem::doCalibrateClocks(ExecContext *xc)
uint8_t *ppc = physmem->dma_addr(ppc_paddr, sizeof(uint32_t));
uint8_t *timer = physmem->dma_addr(timer_paddr, sizeof(uint32_t));
- *(uint32_t *)ppc = htog((uint32_t)Clock::Frequency);
- *(uint32_t *)timer = htog((uint32_t)TIMER_FREQUENCY);
+ *(uint32_t *)ppc = LittleEndianGuest::htog((uint32_t)Clock::Frequency);
+ *(uint32_t *)timer = LittleEndianGuest::htog((uint32_t)TIMER_FREQUENCY);
}