Marc Jones | 1587dc8 | 2017-05-15 18:55:11 -0600 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2013 Sage Electronic Engineering, LLC |
| 5 | * Copyright (C) 2016 Advanced Micro Devices, Inc. |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; version 2 of the License. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | */ |
| 16 | |
| 17 | /* Note: Only need HID on Primary Bus */ |
| 18 | External (TOM1) |
| 19 | External (TOM2) |
| 20 | Name(_HID, EISAID("PNP0A08")) /* PCI Express Root Bridge */ |
| 21 | Name(_CID, EISAID("PNP0A03")) /* PCI Root Bridge */ |
| 22 | Name(_ADR, 0x00180000) /* Dev# = BSP Dev#, Func# = 0 */ |
| 23 | |
| 24 | /* Describe the Northbridge devices */ |
| 25 | |
| 26 | Method(_BBN, 0, NotSerialized) /* Bus number = 0 */ |
| 27 | { |
| 28 | Return(Zero) |
| 29 | } |
| 30 | |
| 31 | Method(_STA, 0, NotSerialized) |
| 32 | { |
| 33 | Return(0x0B) /* Status is visible */ |
| 34 | } |
| 35 | |
| 36 | Method(_PRT,0, NotSerialized) |
| 37 | { |
| 38 | If(PMOD) |
| 39 | { |
| 40 | Return(APR0) /* APIC mode */ |
| 41 | } |
| 42 | Return (PR0) /* PIC Mode */ |
| 43 | } |
| 44 | |
| 45 | Device(AMRT) { |
| 46 | Name(_ADR, 0x00000000) |
| 47 | } /* end AMRT */ |
| 48 | |
Marc Jones | 6dcb6c2 | 2018-07-26 17:07:13 -0600 | [diff] [blame^] | 49 | /* Internal Graphics */ |
| 50 | Device(IGFX) { |
| 51 | Name(_ADR, 0x00010000) |
| 52 | } |
| 53 | |
Marc Jones | 1587dc8 | 2017-05-15 18:55:11 -0600 | [diff] [blame] | 54 | /* Gpp 0 */ |
| 55 | Device(PBR4) { |
| 56 | Name(_ADR, 0x00020001) |
Marc Jones | 1587dc8 | 2017-05-15 18:55:11 -0600 | [diff] [blame] | 57 | Method(_PRT,0) { |
| 58 | If(PMOD){ Return(APS4) } /* APIC mode */ |
| 59 | Return (PS4) /* PIC Mode */ |
| 60 | } /* end _PRT */ |
| 61 | } /* end PBR4 */ |
| 62 | |
| 63 | /* Gpp 1 */ |
| 64 | Device(PBR5) { |
| 65 | Name(_ADR, 0x00020002) |
Marc Jones | 1587dc8 | 2017-05-15 18:55:11 -0600 | [diff] [blame] | 66 | Method(_PRT,0) { |
| 67 | If(PMOD){ Return(APS5) } /* APIC mode */ |
| 68 | Return (PS5) /* PIC Mode */ |
| 69 | } /* end _PRT */ |
| 70 | } /* end PBR5 */ |
| 71 | |
| 72 | /* Gpp 2 */ |
| 73 | Device(PBR6) { |
| 74 | Name(_ADR, 0x00020003) |
Marc Jones | 1587dc8 | 2017-05-15 18:55:11 -0600 | [diff] [blame] | 75 | Method(_PRT,0) { |
| 76 | If(PMOD){ Return(APS6) } /* APIC mode */ |
| 77 | Return (PS6) /* PIC Mode */ |
| 78 | } /* end _PRT */ |
| 79 | } /* end PBR6 */ |
| 80 | |
| 81 | /* Gpp 3 */ |
| 82 | Device(PBR7) { |
| 83 | Name(_ADR, 0x00020004) |
Marc Jones | 1587dc8 | 2017-05-15 18:55:11 -0600 | [diff] [blame] | 84 | Method(_PRT,0) { |
| 85 | If(PMOD){ Return(APS7) } /* APIC mode */ |
| 86 | Return (PS7) /* PIC Mode */ |
| 87 | } /* end _PRT */ |
| 88 | } /* end PBR7 */ |
| 89 | |
| 90 | /* Gpp 4 */ |
| 91 | Device(PBR8) { |
| 92 | Name(_ADR, 0x00020005) |
Marc Jones | 1587dc8 | 2017-05-15 18:55:11 -0600 | [diff] [blame] | 93 | Method(_PRT,0) { |
| 94 | If(PMOD){ Return(APS8) } /* APIC mode */ |
| 95 | Return (PS8) /* PIC Mode */ |
| 96 | } /* end _PRT */ |
| 97 | } /* end PBR8 */ |
| 98 | |
| 99 | Device(AZHD) { /* 0:9.2 - HD Audio */ |
| 100 | Name(_ADR, 0x00090002) |
| 101 | OperationRegion(AZPD, PCI_Config, 0x00, 0x100) |
| 102 | Field(AZPD, AnyAcc, NoLock, Preserve) { |
| 103 | offset (0x42), |
| 104 | NSDI, 1, |
| 105 | NSDO, 1, |
| 106 | NSEN, 1, |
| 107 | offset (0x44), |
| 108 | IPCR, 4, |
| 109 | offset (0x54), |
| 110 | PWST, 2, |
| 111 | , 6, |
| 112 | PMEB, 1, |
| 113 | , 6, |
| 114 | PMST, 1, |
| 115 | offset (0x62), |
| 116 | MMCR, 1, |
| 117 | offset (0x64), |
| 118 | MMLA, 32, |
| 119 | offset (0x68), |
| 120 | MMHA, 32, |
Marshall Dawson | 6744dfe | 2017-06-14 16:09:07 -0600 | [diff] [blame] | 121 | offset (0x6c), |
Marc Jones | 1587dc8 | 2017-05-15 18:55:11 -0600 | [diff] [blame] | 122 | MMDT, 16, |
| 123 | } |
| 124 | |
| 125 | Method (_INI, 0, NotSerialized) |
| 126 | { |
| 127 | If (LEqual (OSVR, 0x03)) |
| 128 | { |
| 129 | Store (Zero, NSEN) |
| 130 | Store (One, NSDO) |
| 131 | Store (One, NSDI) |
| 132 | } |
| 133 | } |
| 134 | } /* end AZHD */ |