summaryrefslogtreecommitdiffstats
path: root/sys/dev/gxemul/cons
diff options
context:
space:
mode:
authorgonzo <gonzo@FreeBSD.org>2013-09-04 20:34:36 +0000
committergonzo <gonzo@FreeBSD.org>2013-09-04 20:34:36 +0000
commit1eec0c04d002462ffc14d1d3a0e51db88bcecc7b (patch)
treeada18ef269502d56adc3451a3fa29c4ebf6760c1 /sys/dev/gxemul/cons
parent059527f86c1f6894818d8ea99339b92ad2f425a7 (diff)
downloadFreeBSD-src-1eec0c04d002462ffc14d1d3a0e51db88bcecc7b.zip
FreeBSD-src-1eec0c04d002462ffc14d1d3a0e51db88bcecc7b.tar.gz
Add 32-bit support for Gxemul's oldtestmips machine emulation
Original work by: kan@
Diffstat (limited to 'sys/dev/gxemul/cons')
-rw-r--r--sys/dev/gxemul/cons/gxemul_cons.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/gxemul/cons/gxemul_cons.c b/sys/dev/gxemul/cons/gxemul_cons.c
index b83aa94..cb3b000 100644
--- a/sys/dev/gxemul/cons/gxemul_cons.c
+++ b/sys/dev/gxemul/cons/gxemul_cons.c
@@ -99,18 +99,16 @@ static void gxemul_cons_timeout(void *);
* XXXRW: Should be using FreeBSD's bus routines here, but they are not
* available until later in the boot.
*/
-typedef uint64_t paddr_t;
-typedef uint64_t vaddr_t;
-static inline vaddr_t
-mips_phys_to_uncached(paddr_t phys)
+static inline vm_offset_t
+mips_phys_to_uncached(vm_paddr_t phys)
{
return (MIPS_PHYS_TO_DIRECT_UNCACHED(phys));
}
static inline uint8_t
-mips_ioread_uint8(vaddr_t vaddr)
+mips_ioread_uint8(vm_offset_t vaddr)
{
uint8_t v;
@@ -119,7 +117,7 @@ mips_ioread_uint8(vaddr_t vaddr)
}
static inline void
-mips_iowrite_uint8(vaddr_t vaddr, uint8_t v)
+mips_iowrite_uint8(vm_offset_t vaddr, uint8_t v)
{
__asm__ __volatile__ ("sb %0, 0(%1)" : : "r" (v), "r" (vaddr));
OpenPOWER on IntegriCloud