Esempio n. 1
0
int
vga_jazzio_match(device_t parent, cfdata_t match, void *aux)
{
	struct jazzio_attach_args *ja = aux;
	bus_space_tag_t iot, memt;

	if (vga_jazzio_init_tag(ja->ja_name, &iot, &memt))
		return 0;

	if (!vga_is_console(iot, WSDISPLAY_TYPE_JAZZVGA) &&
	    !vga_common_probe(iot, memt))
		return 0;

	return 1;
}
Esempio n. 2
0
int
vga_isa_match(device_t parent, cfdata_t match, void *aux)
{
    struct isa_attach_args *ia = aux;

    if (ISA_DIRECT_CONFIG(ia))
        return (0);

    /* If values are hardwired to something that they can't be, punt. */
    if (ia->ia_nio < 1 ||
            (ia->ia_io[0].ir_addr != ISA_UNKNOWN_PORT &&
             ia->ia_io[0].ir_addr != 0x3b0))
        return (0);

    if (ia->ia_niomem < 1 ||
            (ia->ia_iomem[0].ir_addr != ISA_UNKNOWN_IOMEM &&
             ia->ia_iomem[0].ir_addr != 0xa0000))
        return (0);
    if (ia->ia_iomem[0].ir_size != 0 &&
            ia->ia_iomem[0].ir_size != 0x20000)
        return (0);

    if (ia->ia_nirq > 0 &&
            ia->ia_irq[0].ir_irq != ISA_UNKNOWN_IRQ)
        return (0);

    if (ia->ia_ndrq > 0 &&
            ia->ia_drq[0].ir_drq != ISA_UNKNOWN_DRQ)
        return (0);

    if (!vga_is_console(ia->ia_iot, WSDISPLAY_TYPE_ISAVGA) &&
            !vga_common_probe(ia->ia_iot, ia->ia_memt))
        return (0);

    ia->ia_nio = 1;
    ia->ia_io[0].ir_addr = 0x3b0;	/* XXX mono 0x3b0 color 0x3c0 */
    ia->ia_io[0].ir_size = 0x30;	/* XXX 0x20 */

    ia->ia_niomem = 1;
    ia->ia_iomem[0].ir_addr = 0xa0000;
    ia->ia_iomem[0].ir_size = 0x20000;

    ia->ia_nirq = 0;
    ia->ia_ndrq = 0;

    return (2);	/* more than generic pcdisplay */
}
Esempio n. 3
0
int
vga_isa_match(struct device *parent, void *match, void *aux)
{
	struct isa_attach_args *ia = aux;

	/* If values are hardwired to something that they can't be, punt. */
	if ((ia->ia_iobase != IOBASEUNK && ia->ia_iobase != 0x3b0) ||
	    /* ia->ia_iosize != 0 || XXX isa.c */
	    (ia->ia_maddr != MADDRUNK && ia->ia_maddr != 0xa0000) ||
	    (ia->ia_msize != 0 && ia->ia_msize != 0x20000) ||
	    ia->ia_irq != IRQUNK || ia->ia_drq != DRQUNK)
		return (0);

	if (!vga_is_console(ia->ia_iot, WSDISPLAY_TYPE_ISAVGA) &&
	    !vga_common_probe(ia->ia_iot, ia->ia_memt))
		return (0);

	ia->ia_iobase = 0x3b0;	/* XXX mono 0x3b0 color 0x3c0 */
	ia->ia_iosize = 0x30;	/* XXX 0x20 */
	ia->ia_maddr = 0xa0000;
	ia->ia_msize = 0x20000;
	return (2);	/* more than generic pcdisplay */
}