FreeBSD/sys/dev/pci/pci_pci.c
/*
 * This is used to reject I/O port allocations that conflict with an
 * ISA alias range.
 */
This is used to reject I/O port allocations that conflict with an
ISA alias range.
This is used to reject I / O port allocations that conflict with an ISA alias range .
static int
pcib_is_isa_range(struct pcib_softc *sc, rman_res_t start, rman_res_t end,
    rman_res_t count)
{
	rman_res_t next_alias;
	if (!(sc->bridgectl & PCIB_BCR_ISA_ENABLE))
		return (0);
	if (start + count - 1 != end)
		return (0);
	if (start >= 65536)
		return (0);
	if (start < 0x100)
		goto alias;
	if ((start & 0x300) != 0)
		goto alias;
	next_alias = (start & ~0x3fful) | 0x100;
	if (next_alias <= end)
		goto alias;
	return (0);
alias:
	if (bootverbose)
		device_printf(sc->dev,
		    "I/O range %#jx-%#jx overlaps with an ISA alias\n", start,
		    end);
	return (1);
}
static int pcib_is_isa_range ( struct pcib_softc * sc , rman_res_t start , rman_res_t end , rman_res_t count ) { rman_res_t next_alias ; if ( ! ( sc -> bridgectl & PCIB_BCR_ISA_ENABLE ) ) return ( 0 ) ; if ( start + count - 1 != end ) return ( 0 ) ; if ( start >= 65536 ) return ( 0 ) ; if ( start < 0x100 ) goto alias ; if ( ( start & 0x300 ) != 0 ) goto alias ; next_alias = ( start & ~ 0x3fful ) | 0x100 ; if ( next_alias <= end ) goto alias ; return ( 0 ) ; alias : if ( bootverbose ) device_printf ( sc -> dev , " \n " , start , end ) ; return ( 1 ) ; }
This is used to reject I/O port allocations that conflict with an
 ISA alias range.
This is used to reject I / O port allocations that conflict with an ISA alias range .
/* Only check fixed ranges for overlap. */ /* ISA aliases are only in the lower 64KB of I/O space. */ /* Check for overlap with 0x000 - 0x0ff as a special case. */ /*
	 * If the start address is an alias, the range is an alias.
	 * Otherwise, compute the start of the next alias range and
	 * check if it is before the end of the candidate range.
	 */