summaryrefslogtreecommitdiffstats
path: root/sys/mips/sibyte/sb_scd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/mips/sibyte/sb_scd.c')
-rw-r--r--sys/mips/sibyte/sb_scd.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/mips/sibyte/sb_scd.c b/sys/mips/sibyte/sb_scd.c
index c8fec69..bfaa8d4 100644
--- a/sys/mips/sibyte/sb_scd.c
+++ b/sys/mips/sibyte/sb_scd.c
@@ -38,8 +38,15 @@ __FBSDID("$FreeBSD$");
#include "sb_scd.h"
-extern void sb_store64(uint32_t addr, uint64_t val);
-extern uint64_t sb_load64(uint32_t addr);
+/*
+ * We compile a 32-bit kernel to run on the SB-1 processor which is a 64-bit
+ * processor. It has some registers that must be accessed using 64-bit load
+ * and store instructions.
+ *
+ * We use the mips_ld() and mips_sd() functions to do this for us.
+ */
+#define sb_store64(addr, val) mips3_sd((uint64_t *)(addr), (val))
+#define sb_load64(addr) mips3_ld((uint64_t *)(addr))
/*
* System Control and Debug (SCD) unit on the Sibyte ZBbus.
OpenPOWER on IntegriCloud