-/* $OpenBSD: mips_cpu.h,v 1.2 2015/09/24 18:38:58 miod Exp $ */
+/* $OpenBSD: mips_cpu.h,v 1.3 2016/08/06 09:32:04 visa Exp $ */
/*-
* Copyright (c) 1992, 1993
#define COP_0_PRID $15
#define COP_0_CONFIG $16
+/* MIPS64 release 2 */
+#define COP_0_TLB_PG_GRAIN $5, 1
+#define COP_0_EBASE $15, 1
+
/* R4000/5000/10000 */
#define COP_0_TLB_INDEX $0
#define COP_0_TLB_RANDOM $1
#define COP_0_DIAG $22
/* Octeon specific */
-#define COP_0_TLB_PG_GRAIN $5, 1
#define COP_0_CVMCTL $9, 7
#define COP_0_CVMMEMCTL $11, 7
-#define COP_0_EBASE $15, 1
/*
* COP_0_COUNT speed divider.
#define FPC_ID $0
#define FPC_CSR $31
+/*
+ * PageGrain register
+ */
+#define PGRAIN_RIE 0x80000000
+#define PGRAIN_XIE 0x40000000
+#define PGRAIN_ELPA 0x20000000
+#define PGRAIN_ESP 0x10000000
+#define PGRAIN_IEC 0x08000000
+
#endif /* _KERNEL || _STANDALONE */
#endif /* !_MIPS64_CPUREGS_H_ */
-/* $OpenBSD: locore.S,v 1.8 2016/04/14 15:48:09 visa Exp $ */
+/* $OpenBSD: locore.S,v 1.9 2016/08/06 09:32:05 visa Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
dmtc0 t0, COP_0_CVMMEMCTL
/* initialize pagegrain */
- dli t0, 0x20000000
+ dli t0, PGRAIN_ELPA
dmtc0 t0, COP_0_TLB_PG_GRAIN
mfc0 v0, COP_0_STATUS_REG