isa_common.c (2414e86439f4c53aff73d1afe0453fb48145d9e5) | isa_common.c (43cd61606b6bfae52bb09856277751103bfa28fd) |
---|---|
1/*- 2 * Copyright (c) 1999 Doug Rabson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 136 unchanged lines hidden (view full) --- 145 146 for (start = config->ic_mem[i].ir_start, 147 end = config->ic_mem[i].ir_end, 148 align = config->ic_mem[i].ir_align; 149 start + size - 1 <= end && start + size > start; 150 start += MAX(align, 1)) { 151 bus_set_resource(child, SYS_RES_MEMORY, i, 152 start, size); | 1/*- 2 * Copyright (c) 1999 Doug Rabson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 136 unchanged lines hidden (view full) --- 145 146 for (start = config->ic_mem[i].ir_start, 147 end = config->ic_mem[i].ir_end, 148 align = config->ic_mem[i].ir_align; 149 start + size - 1 <= end && start + size > start; 150 start += MAX(align, 1)) { 151 bus_set_resource(child, SYS_RES_MEMORY, i, 152 start, size); |
153 res[i] = bus_alloc_resource(child, 154 SYS_RES_MEMORY, &i, 0, ~0, 1, | 153 res[i] = bus_alloc_resource_any(child, 154 SYS_RES_MEMORY, &i, |
155 rman_make_alignment_flags(align) /* !RF_ACTIVE */); 156 if (res[i]) { 157 result->ic_mem[i].ir_start = start; 158 result->ic_mem[i].ir_end = start + size - 1; 159 result->ic_mem[i].ir_size = size; 160 result->ic_mem[i].ir_align = align; 161 break; 162 } --- 56 unchanged lines hidden (view full) --- 219 220 for (start = config->ic_port[i].ir_start, 221 end = config->ic_port[i].ir_end, 222 align = config->ic_port[i].ir_align; 223 start + size - 1 <= end; 224 start += align) { 225 bus_set_resource(child, SYS_RES_IOPORT, i, 226 start, size); | 155 rman_make_alignment_flags(align) /* !RF_ACTIVE */); 156 if (res[i]) { 157 result->ic_mem[i].ir_start = start; 158 result->ic_mem[i].ir_end = start + size - 1; 159 result->ic_mem[i].ir_size = size; 160 result->ic_mem[i].ir_align = align; 161 break; 162 } --- 56 unchanged lines hidden (view full) --- 219 220 for (start = config->ic_port[i].ir_start, 221 end = config->ic_port[i].ir_end, 222 align = config->ic_port[i].ir_align; 223 start + size - 1 <= end; 224 start += align) { 225 bus_set_resource(child, SYS_RES_IOPORT, i, 226 start, size); |
227 res[i] = bus_alloc_resource(child, 228 SYS_RES_IOPORT, &i, 0, ~0, 1, | 227 res[i] = bus_alloc_resource_any(child, 228 SYS_RES_IOPORT, &i, |
229 rman_make_alignment_flags(align) /* !RF_ACTIVE */); 230 if (res[i]) { 231 result->ic_port[i].ir_start = start; 232 result->ic_port[i].ir_end = start + size - 1; 233 result->ic_port[i].ir_size = size; 234 result->ic_port[i].ir_align = align; 235 break; 236 } --- 889 unchanged lines hidden --- | 229 rman_make_alignment_flags(align) /* !RF_ACTIVE */); 230 if (res[i]) { 231 result->ic_port[i].ir_start = start; 232 result->ic_port[i].ir_end = start + size - 1; 233 result->ic_port[i].ir_size = size; 234 result->ic_port[i].ir_align = align; 235 break; 236 } --- 889 unchanged lines hidden --- |