diff options
author | Patrick Georgi <patrick.georgi@coresystems.de> | 2010-02-08 15:46:37 +0000 |
---|---|---|
committer | Patrick Georgi <patrick.georgi@coresystems.de> | 2010-02-08 15:46:37 +0000 |
commit | af97d33ec426b9414133fd82d958cf9ab52a390f (patch) | |
tree | d99f6480914df848dabb0ec197864e0c8f64d939 /src/mainboard/amd/serengeti_cheetah_fam10/acpi/amd8131_2.asl | |
parent | 0e92974904703272b55d66dc4959d95adba6f30c (diff) |
Clean up ACPI:
- unify all iasl related rules into the toplevel Makefile
- build a filesystem standard for ACPI files and use it
- pass ACPI sources through cpp, so constants can be shared
between C and ACPI more easily
- use cpp's #include instead of ACPI's Include() so cpp gets
the whole picture
Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5094 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/mainboard/amd/serengeti_cheetah_fam10/acpi/amd8131_2.asl')
-rw-r--r-- | src/mainboard/amd/serengeti_cheetah_fam10/acpi/amd8131_2.asl | 126 |
1 files changed, 126 insertions, 0 deletions
diff --git a/src/mainboard/amd/serengeti_cheetah_fam10/acpi/amd8131_2.asl b/src/mainboard/amd/serengeti_cheetah_fam10/acpi/amd8131_2.asl new file mode 100644 index 0000000000..d810726e58 --- /dev/null +++ b/src/mainboard/amd/serengeti_cheetah_fam10/acpi/amd8131_2.asl @@ -0,0 +1,126 @@ +// +// This file is part of the coreboot project. +// +// Copyright (C) 2007 Advanced Micro Devices, Inc. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; version 2 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +// + Device (PG0A) + { + // 8132 pcix bridge + Method (_ADR, 0, NotSerialized) + { + Return (DADD(GHCD(HCIN, 0), 0x00000000)) + } + + Method (_PRW, 0, NotSerialized) + { + If (CondRefOf (\_S3, Local0)) { Return (Package (0x02) { 0x29, 0x03 }) } + Else { Return (Package (0x02) { 0x29, 0x01 }) } + } + + Name (APIC, Package (0x04) + { + // Slot A - PIRQ BCDA + Package (0x04) { 0x0001FFFF, 0x00, 0x00, 0x0018 }, //Slot 2 + Package (0x04) { 0x0001FFFF, 0x01, 0x00, 0x0019 }, + Package (0x04) { 0x0001FFFF, 0x02, 0x00, 0x001A }, + Package (0x04) { 0x0001FFFF, 0x03, 0x00, 0x001B }, + }) + Name (PICM, Package (0x04) + { + Package (0x04) { 0x0001FFFF, 0x00, \_SB.PCI0.LNKA, 0x00 },//Slot 2 + Package (0x04) { 0x0001FFFF, 0x01, \_SB.PCI0.LNKB, 0x00 }, + Package (0x04) { 0x0001FFFF, 0x02, \_SB.PCI0.LNKC, 0x00 }, + Package (0x04) { 0x0001FFFF, 0x03, \_SB.PCI0.LNKD, 0x00 }, + }) + + Name (DNCG, Ones) + + Method (_PRT, 0, NotSerialized) + { + If (LEqual (^DNCG, Ones)) + { + Multiply (HCIN, 0x0008, Local2) // GSI for 8132 is 4 so we get 8 + Store (0x00, Local1) + While (LLess (Local1, 0x04)) + { + // Update the GSI according to HCIN + Store(DeRefOf(Index (DeRefOf (Index (APIC, Local1)), 3)), Local0) + Add(Local2, Local0, Local0) + Store(Local0, Index (DeRefOf (Index (APIC, Local1)), 3)) + Increment (Local1) + } + Store (0x00, ^DNCG) + } + If (LNot (PICF)) { Return (PICM) } + Else { Return (APIC) } + } + } + + Device (PG0B) + { + // 8132 pcix bridge 2 + Method (_ADR, 0, NotSerialized) + { + Return (DADD(GHCD(HCIN, 0), 0x00010000)) + } + + Method (_PRW, 0, NotSerialized) + { + If (CondRefOf (\_S3, Local0)) { Return (Package (0x02) { 0x22, 0x03 }) } + Else { Return (Package (0x02) { 0x22, 0x01 }) } + } + + Name (APIC, Package (0x04) + { + // Slot A - PIRQ ABCD + Package (0x04) { 0x0001FFFF, 0x00, 0x00, 0x001F },// Slot 1 + Package (0x04) { 0x0001FFFF, 0x01, 0x00, 0x0020 }, + Package (0x04) { 0x0001FFFF, 0x02, 0x00, 0x0021 }, + Package (0x04) { 0x0001FFFF, 0x03, 0x00, 0x0022 } + }) + Name (PICM, Package (0x04) + { + Package (0x04) { 0x0001FFFF, 0x00, \_SB.PCI0.LNKA, 0x00 },//Slot 1 + Package (0x04) { 0x0001FFFF, 0x01, \_SB.PCI0.LNKB, 0x00 }, + Package (0x04) { 0x0001FFFF, 0x02, \_SB.PCI0.LNKC, 0x00 }, + Package (0x04) { 0x0001FFFF, 0x03, \_SB.PCI0.LNKD, 0x00 } + }) + + Name (DNCG, Ones) + + Method (_PRT, 0, NotSerialized) + { + If (LEqual (^DNCG, Ones)) + { + Multiply (HCIN, 0x0008, Local2) // GSI for 8132 is 4 so we get 8 + Store (0x00, Local1) + While (LLess (Local1, 0x04)) + { + // Update the GSI according to HCIN + Store(DeRefOf(Index (DeRefOf (Index (APIC, Local1)), 3)), Local0) + Add(Local2, Local0, Local0) + Store(Local0, Index (DeRefOf (Index (APIC, Local1)), 3)) + Increment (Local1) + } + + Store (0x00, ^DNCG) + + } + + If (LNot (PICF)) { Return (PICM) } + Else { Return (APIC) } + } + } |