blob: 5a932385d0f64948214232bc2d960b62d89dcd11 [file] [log] [blame]
Stefan Reinauercc46e732009-03-13 00:44:09 +00001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2007-2009 coresystems GmbH
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; version 2 of
9 * 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.
Stefan Reinauercc46e732009-03-13 00:44:09 +000015 */
16
Patrick Georgi334328a2012-02-16 19:01:22 +010017#include "hostbridge.asl"
18#include "../i945.h"
Stefan Reinauercc46e732009-03-13 00:44:09 +000019
Denis 'GNUtoo' Carikli4b213a82013-03-28 14:24:39 +010020/* Operating System Capabilities Method */
21Method (_OSC, 4)
22{
23 // Create DWord-addressable fields from the Capabilities Buffer
24 CreateDWordField(Arg3, 0, CDW1)
25 CreateDWordField(Arg3, 4, CDW2)
26 CreateDWordField(Arg3, 8, CDW3)
27
28 /* Check for proper PCI/PCIe UUID */
29 If (LEqual(Arg0, ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766")))
30 {
31 /* Let OS control everything */
32 Return(Arg3)
33 } Else {
34 Or(CDW1, 4, CDW1) // Unrecognized UUID, so set bit 2 to 1
35 Return(Arg3)
36 }
37}
38
Stefan Reinauercc46e732009-03-13 00:44:09 +000039/* PCI Device Resource Consumption */
40Device (PDRC)
41{
42 Name (_HID, EISAID("PNP0C02"))
43 Name (_UID, 1)
Stefan Reinauer71a3d962009-07-21 21:44:24 +000044
45 // This does not seem to work correctly yet - set values statically for
46 // now.
Stefan Reinauer109ab312009-08-12 16:08:05 +000047
Stefan Reinauer71a3d962009-07-21 21:44:24 +000048 //Name (PDRS, ResourceTemplate() {
49 // Memory32Fixed(ReadWrite, 0x00000000, 0x00004000, RCRB) // RCBA
50 // Memory32Fixed(ReadWrite, 0x00000000, 0x00004000, MCHB) // MCHBAR
51 // Memory32Fixed(ReadWrite, 0x00000000, 0x00001000, DMIB) // DMIBAR
52 // Memory32Fixed(ReadWrite, 0x00000000, 0x00001000, EGPB) // EPBAR
53 // Memory32Fixed(ReadWrite, 0x00000000, 0x00000000, PCIE) // PCIE BAR
54 // Memory32Fixed(ReadWrite, 0xfed20000, 0x00070000, ICHB) // Misc ICH
55 //})
56
Stefan Reinauercc46e732009-03-13 00:44:09 +000057 Name (PDRS, ResourceTemplate() {
Stefan Reinauer71a3d962009-07-21 21:44:24 +000058 Memory32Fixed(ReadWrite, 0xfed1c000, 0x00004000) // RCBA
Stefan Reinaueraca6ec62009-10-26 17:12:21 +000059 Memory32Fixed(ReadWrite, DEFAULT_MCHBAR, 0x00004000)
60 Memory32Fixed(ReadWrite, DEFAULT_DMIBAR, 0x00001000)
61 Memory32Fixed(ReadWrite, DEFAULT_EPBAR, 0x00001000)
62 Memory32Fixed(ReadWrite, DEFAULT_PCIEXBAR, 0x04000000)
Stefan Reinauer71a3d962009-07-21 21:44:24 +000063 Memory32Fixed(ReadWrite, 0xfed20000, 0x00020000) // Misc ICH
64 Memory32Fixed(ReadWrite, 0xfed40000, 0x00005000) // Misc ICH
65 Memory32Fixed(ReadWrite, 0xfed45000, 0x0004b000) // Misc ICH
Stefan Reinauercc46e732009-03-13 00:44:09 +000066 })
67
68 // Current Resource Settings
69 Method (_CRS, 0, Serialized)
70 {
Stefan Reinauer71a3d962009-07-21 21:44:24 +000071 //CreateDwordField(PDRS, ^RCRB._BAS, RBR0)
72 //ShiftLeft(\_SB.PCI0.LPCB.RCBA, 14, RBR0)
Stefan Reinauercc46e732009-03-13 00:44:09 +000073
Stefan Reinauer71a3d962009-07-21 21:44:24 +000074 //CreateDwordField(PDRS, ^MCHB._BAS, MBR0)
75 //ShiftLeft(\_SB.PCI0.MCHC.MHBR, 14, MBR0)
Stefan Reinauercc46e732009-03-13 00:44:09 +000076
Stefan Reinauer71a3d962009-07-21 21:44:24 +000077 //CreateDwordField(PDRS, ^DMIB._BAS, DBR0)
78 //ShiftLeft(\_SB.PCI0.MCHC.DMBR, 12, DBR0)
Stefan Reinauercc46e732009-03-13 00:44:09 +000079
Stefan Reinauer71a3d962009-07-21 21:44:24 +000080 //CreateDwordField(PDRS, ^EGPB._BAS, EBR0)
81 //ShiftLeft(\_SB.PCI0.MCHC.EPBR, 12, EBR0)
Stefan Reinauercc46e732009-03-13 00:44:09 +000082
Stefan Reinauer71a3d962009-07-21 21:44:24 +000083 //CreateDwordField(PDRS, ^PCIE._BAS, PBR0)
84 //ShiftLeft(\_SB.PCI0.MCHC.PXBR, 26, PBR0)
Stefan Reinauercc46e732009-03-13 00:44:09 +000085
Stefan Reinauer71a3d962009-07-21 21:44:24 +000086 //CreateDwordField(PDRS, ^PCIE._LEN, PSZ0)
87 //ShiftLeft(0x10000000, \_SB.PCI0.MCHC.PXSZ, PSZ0)
Stefan Reinauercc46e732009-03-13 00:44:09 +000088
89 Return(PDRS)
90 }
91}
92
93// PCIe graphics port 0:1.0
Patrick Georgi334328a2012-02-16 19:01:22 +010094#include "peg.asl"
Stefan Reinauercc46e732009-03-13 00:44:09 +000095
96// Integrated graphics 0:2.0
Patrick Georgi334328a2012-02-16 19:01:22 +010097#include "igd.asl"