--- trunk/src/devices/bus_isa.c 2007/10/08 16:21:17 34 +++ trunk/src/devices/bus_isa.c 2007/10/08 16:22:32 42 @@ -25,10 +25,12 @@ * SUCH DAMAGE. * * - * $Id: bus_isa.c,v 1.16 2007/02/17 06:32:06 debug Exp $ + * $Id: bus_isa.c,v 1.19 2007/06/15 18:44:18 debug Exp $ * - * Generic ISA bus. This is not a normal device, but it can be used as a quick - * way of adding most of the common legacy ISA devices to a machine. + * COMMENT: Generic ISA bus framework + * + * This is not a normal device, but it can be used as a quick way of adding + * most of the common legacy ISA devices to a machine. */ #include @@ -175,12 +177,13 @@ char *interrupt_base_path, uint32_t bus_isa_flags, uint64_t isa_portbase, uint64_t isa_membase) { - struct bus_isa_data *d = malloc(sizeof(struct bus_isa_data)); + struct bus_isa_data *d; char tmpstr[300], tmpstr2[300]; int wdc0_irq = 14, wdc1_irq = 15; int i, tmp_handle, kbd_in_use; int lptbase = 0x378; + CHECK_ALLOCATION(d = malloc(sizeof(struct bus_isa_data))); memset(d, 0, sizeof(struct bus_isa_data)); d->isa_portbase = isa_portbase; @@ -208,7 +211,7 @@ } kbd_in_use = ((bus_isa_flags & BUS_ISA_PCKBC_FORCE_USE) || - (machine->use_x11))? 1 : 0; + (machine->x11_md.in_use))? 1 : 0; if (machine->machine_type == MACHINE_PREP) { /* PReP with obio controller has both WDCs on irq 13! */ @@ -295,7 +298,7 @@ } if (bus_isa_flags & BUS_ISA_VGA) { - if (machine->use_x11 || bus_isa_flags & BUS_ISA_VGA_FORCE) + if (machine->x11_md.in_use || bus_isa_flags & BUS_ISA_VGA_FORCE) dev_vga_init(machine, machine->memory, isa_membase + 0xa0000, isa_portbase + 0x3c0, machine->machine_name);