diff options
Diffstat (limited to 'sys/i386/i386/legacy.c')
-rw-r--r-- | sys/i386/i386/legacy.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sys/i386/i386/legacy.c b/sys/i386/i386/legacy.c index f5554f8..5fdda2b 100644 --- a/sys/i386/i386/legacy.c +++ b/sys/i386/i386/legacy.c @@ -289,7 +289,17 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, rman_set_bustag(rv, I386_BUS_SPACE_MEM); } else if (type == SYS_RES_IOPORT) { rman_set_bustag(rv, I386_BUS_SPACE_IO); +#ifdef PC98 + /* PC-98: the type of bus_space_handle_t is the structure. */ + rv->r_bushandle.bsh_base = rv->r_start; + rv->r_bushandle.bsh_iat = NULL; + rv->r_bushandle.bsh_iatsz = 0; + rv->r_bushandle.bsh_res = NULL; + rv->r_bushandle.bsh_ressz = 0; +#else + /* IBM-PC: the type of bus_space_handle_t is u_int */ rman_set_bushandle(rv, rv->r_start); +#endif } if (needactivate) { @@ -329,7 +339,17 @@ nexus_activate_resource(device_t bus, device_t child, int type, int rid, vaddr = (caddr_t) pmap_mapdev(paddr-poffs, psize+poffs) + poffs; } rman_set_virtual(r, vaddr); +#ifdef PC98 + /* PC-98: the type of bus_space_handle_t is the structure. */ + r->r_bushandle.bsh_base = (bus_addr_t) vaddr; + r->r_bushandle.bsh_iat = NULL; + r->r_bushandle.bsh_iatsz = 0; + r->r_bushandle.bsh_res = NULL; + r->r_bushandle.bsh_ressz = 0; +#else + /* IBM-PC: the type of bus_space_handle_t is u_int */ rman_set_bushandle(r, (bus_space_handle_t) vaddr); +#endif } return (rman_activate_resource(r)); } |