Kyösti Mälkki | cf246d5 | 2021-01-21 08:17:00 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Kyösti Mälkki | fa5f9b5 | 2021-01-19 14:12:19 +0200 | [diff] [blame] | 2 | |
| 3 | #include <acpi/acpigen_extern.asl> |
Kyösti Mälkki | ae7ac8a | 2021-01-12 15:23:25 +0200 | [diff] [blame] | 4 | |
Kyösti Mälkki | 84d10cc | 2021-02-10 17:53:34 +0200 | [diff] [blame] | 5 | #if CONFIG(CHROMEOS_NVS) |
Jon Murphy | c4e9045 | 2022-06-28 10:36:23 -0600 | [diff] [blame] | 6 | /* ChromeOS specific */ |
Kyösti Mälkki | ade4f35 | 2021-01-20 23:02:16 +0200 | [diff] [blame] | 7 | #include <vendorcode/google/chromeos/acpi/chromeos.asl> |
Kyösti Mälkki | ae7ac8a | 2021-01-12 15:23:25 +0200 | [diff] [blame] | 8 | #endif |
Kyösti Mälkki | d6ccbb9 | 2021-01-15 13:46:11 +0200 | [diff] [blame] | 9 | |
Kyösti Mälkki | f6f1215 | 2020-12-29 09:04:30 +0200 | [diff] [blame] | 10 | /* Operating system enumeration. */ |
| 11 | Name (OSYS, 0) |
| 12 | |
Felix Singer | 7b8ac00 | 2022-12-26 08:45:56 +0100 | [diff] [blame] | 13 | /* Zero => PIC mode, 1 => APIC Mode */ |
Kyösti Mälkki | aa969e8 | 2021-01-25 17:05:35 +0200 | [diff] [blame] | 14 | Name (PICM, Zero) |
| 15 | |
Kyösti Mälkki | d6ccbb9 | 2021-01-15 13:46:11 +0200 | [diff] [blame] | 16 | /* Power state (AC = 1) */ |
Felix Singer | 7b8ac00 | 2022-12-26 08:45:56 +0100 | [diff] [blame] | 17 | Name (PWRS, 1) |
Kyösti Mälkki | d591a5a | 2021-01-25 17:05:35 +0200 | [diff] [blame] | 18 | |
| 19 | /* |
| 20 | * The _PIC method is called by the OS to choose between interrupt |
| 21 | * routing via the i8259 interrupt controller or the APIC. |
| 22 | * |
| 23 | * _PIC is called with a parameter of 0 for i8259 configuration and |
| 24 | * with a parameter of 1 for Local Apic/IOAPIC configuration. |
| 25 | */ |
| 26 | |
| 27 | Method (_PIC, 1) |
| 28 | { |
| 29 | /* Remember the OS' IRQ routing choice. */ |
| 30 | PICM = Arg0 |
| 31 | } |
Kyösti Mälkki | c92efa3 | 2021-02-14 00:06:39 +0200 | [diff] [blame] | 32 | |
Shelley Chen | 4e9bb33 | 2021-10-20 15:43:45 -0700 | [diff] [blame] | 33 | #if CONFIG(ECAM_MMCONF_SUPPORT) |
Kyösti Mälkki | c0733e1 | 2021-02-14 06:58:39 +0200 | [diff] [blame] | 34 | Scope(\_SB) { |
| 35 | /* Base address of PCIe config space */ |
Shelley Chen | 4e9bb33 | 2021-10-20 15:43:45 -0700 | [diff] [blame] | 36 | Name(PCBA, CONFIG_ECAM_MMCONF_BASE_ADDRESS) |
Kyösti Mälkki | c92efa3 | 2021-02-14 00:06:39 +0200 | [diff] [blame] | 37 | |
Kyösti Mälkki | c0733e1 | 2021-02-14 06:58:39 +0200 | [diff] [blame] | 38 | /* Length of PCIe config space, 1MB each bus */ |
Shelley Chen | 4e9bb33 | 2021-10-20 15:43:45 -0700 | [diff] [blame] | 39 | Name(PCLN, CONFIG_ECAM_MMCONF_LENGTH) |
Kyösti Mälkki | c0733e1 | 2021-02-14 06:58:39 +0200 | [diff] [blame] | 40 | |
| 41 | /* PCIe Configuration Space */ |
| 42 | OperationRegion(PCFG, SystemMemory, PCBA, PCLN) /* Each bus consumes 1MB */ |
| 43 | } |
Kyösti Mälkki | c92efa3 | 2021-02-14 00:06:39 +0200 | [diff] [blame] | 44 | #endif |