1/* SPDX-License-Identifier: GPL-2.0+ */ 2/* 3 * Copyright (C) 2007-2009 coresystems GmbH 4 * Copyright (C) 2013 Google Inc. 5 * Copyright (C) 2016 Bin Meng <bmeng.cn@gmail.com> 6 * 7 * Modified from coreboot src/soc/intel/baytrail/acpi/irqroute.asl 8 */ 9 10Name(\PICM, 0) 11 12/* 13 * The _PIC method is called by the OS to choose between interrupt 14 * routing via the i8259 interrupt controller or the APIC. 15 * 16 * _PIC is called with a parameter of 0 for i8259 configuration and 17 * with a parameter of 1 for Local APIC/IOAPIC configuration. 18 */ 19Method(\_PIC, 1) 20{ 21 /* Remember the OS' IRQ routing choice */ 22 Store(Arg0, PICM) 23} 24 25/* PCI interrupt routing */ 26Method(_PRT) { 27 If (PICM) { 28 Return (Package() { 29 #undef PIC_MODE 30 #include "irq_helper.h" 31 PCI_DEV_PIRQ_ROUTES 32 }) 33 } Else { 34 Return (Package() { 35 #define PIC_MODE 36 #include "irq_helper.h" 37 PCI_DEV_PIRQ_ROUTES 38 }) 39 } 40 41} 42 43/* PCIe downstream ports interrupt routing */ 44PCIE_BRIDGE_IRQ_ROUTES 45#undef PIC_MODE 46#include "irq_helper.h" 47PCIE_BRIDGE_IRQ_ROUTES 48