FreeBSD/sys/x86/xen/pvcpu_enum.c
/*
 * On PVH guests there's no IO APIC
 */
On PVH guests there's no IO APIC
On PVH guests there ' s no IO APIC
static int
xenpv_setup_io(void)
{
	if (xen_initial_domain()) {
		int i, ret;
		madt_physaddr = acpi_find_table(ACPI_SIG_MADT);
		madt = acpi_map_table(madt_physaddr, ACPI_SIG_MADT);
		madt_length = madt->Header.Length;
		i = acpi_Startup();
		if (ACPI_FAILURE(i)) {
			printf("MADT: ACPI Startup failed with %s\n",
			    AcpiFormatException(i));
			printf("Try disabling either ACPI or apic support.\n");
			panic("Using MADT but ACPI doesn't work");
		}
		madt_walk_table(madt_parse_ints, NULL);
		if (!madt_found_sci_override) {
			printf(
	"MADT: Forcing active-low polarity and level trigger for SCI\n");
			ret = xen_register_pirq(AcpiGbl_FADT.SciInterrupt,
			    INTR_TRIGGER_LEVEL, INTR_POLARITY_LOW);
			if (ret != 0)
				panic("Unable to register SCI IRQ");
		}
		for (i = 1; i < 16; i++) {
			if (intr_lookup_source(i) != NULL)
				continue;
			ret = xen_register_pirq(i, INTR_TRIGGER_EDGE,
			    INTR_POLARITY_LOW);
			if (ret != 0 && bootverbose)
				printf("Unable to register legacy IRQ#%d: %d\n",
				    i, ret);
		}
		acpi_SetDefaultIntrModel(ACPI_INTR_APIC);
	}
	return (0);
}
static int xenpv_setup_io ( void ) { if ( xen_initial_domain ( ) ) { int i , ret ; madt_physaddr = acpi_find_table ( ACPI_SIG_MADT ) ; madt = acpi_map_table ( madt_physaddr , ACPI_SIG_MADT ) ; madt_length = madt -> Header . Length ; i = acpi_Startup ( ) ; if ( ACPI_FAILURE ( i ) ) { printf ( " \n " , AcpiFormatException ( i ) ) ; printf ( " \n " ) ; panic ( " " ) ; } madt_walk_table ( madt_parse_ints , NULL ) ; if ( ! madt_found_sci_override ) { printf ( " \n " ) ; ret = xen_register_pirq ( AcpiGbl_FADT . SciInterrupt , INTR_TRIGGER_LEVEL , INTR_POLARITY_LOW ) ; if ( ret != 0 ) panic ( " " ) ; } for ( i = 1 ; i < 16 ; i ++ ) { if ( intr_lookup_source ( i ) != NULL ) continue ; ret = xen_register_pirq ( i , INTR_TRIGGER_EDGE , INTR_POLARITY_LOW ) ; if ( ret != 0 && bootverbose ) printf ( " \n " , i , ret ) ; } acpi_SetDefaultIntrModel ( ACPI_INTR_APIC ) ; } return ( 0 ) ; }
On PVH guests there's no IO APIC
On PVH guests there ' s no IO APIC
/* Map MADT */ /* Try to initialize ACPI so that we can access the FADT. */ /* Run through the table to see if there are any overrides. */ /*
		 * If there was not an explicit override entry for the SCI,
		 * force it to use level trigger and active-low polarity.
		 */ /* Register legacy ISA IRQs */