htx card on io apic on htx slot of dk8_htx
authorYinghai Lu <yinghai.lu@amd.com>
Wed, 20 Dec 2006 20:21:05 +0000 (20:21 +0000)
committerYinghai Lu <yinghailu@gmail.com>
Wed, 20 Dec 2006 20:21:05 +0000 (20:21 +0000)
Signed-off-by: Yinghai Lu <yinghai.lu@amd.com>
Acked-by: Yinghai Lu <yinghai.lu@amd.com>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2533 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

src/mainboard/iwill/dk8_htx/Config.lb
src/mainboard/iwill/dk8_htx/acpi_tables.c
src/mainboard/iwill/dk8_htx/dx/htx_no_ioapic.asl [new file with mode: 0644]
src/mainboard/iwill/dk8_htx/dx/pci5.asl [new file with mode: 0644]
src/mainboard/iwill/dk8_htx/dx/pci5_hc.asl [new file with mode: 0644]

index 935c98f491f8524d62498ee879dd4a6dc37ccccd..de7d6ff7fd428eb0ce7cf6ff33e70f90257ffa7f 100644 (file)
@@ -119,6 +119,13 @@ if HAVE_ACPI_TABLES
                         action  "mv pci4.hex ssdt4.c"
             end
             object ./ssdt4.o
+            makerule ssdt5.c
+                        depends "$(MAINBOARD)/dx/pci5.asl"
+                        action  "iasl -tc $(MAINBOARD)/dx/pci5.asl"
+                        action  "perl -pi -e 's/AmlCode/AmlCode_ssdt5/g' pci5.hex"
+                        action  "mv pci5.hex ssdt5.c"
+            end
+            object ./ssdt5.o
         end
 end
 
index f35e7f98ec25271c2a573de2dc788fa0fdee0b2a..28cf584323216d18d3d1e7e3daf1f94c4f78c69e 100644 (file)
@@ -44,6 +44,7 @@ extern unsigned char AmlCode_ssdt[];
 extern unsigned char AmlCode_ssdt2[];
 extern unsigned char AmlCode_ssdt3[];
 extern unsigned char AmlCode_ssdt4[];
+extern unsigned char AmlCode_ssdt5[];
 #endif
 
 #define IO_APIC_ADDR   0xfec00000UL
@@ -286,7 +287,9 @@ unsigned long write_acpi_tables(unsigned long start)
                         p = AmlCode_ssdt4;
                         break;
                 default:
-                        continue;
+                       //HTX no io apic
+                        p = AmlCode_ssdt5;
+                       break;
                 }
                 current += ((acpi_header_t *)p)->length;
                 memcpy((void *)ssdtx, (void *)p, ((acpi_header_t *)p)->length);
diff --git a/src/mainboard/iwill/dk8_htx/dx/htx_no_ioapic.asl b/src/mainboard/iwill/dk8_htx/dx/htx_no_ioapic.asl
new file mode 100644 (file)
index 0000000..95a4860
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2006 AMD
+ */
+               
+            Device (HTXA)
+            {
+                /*  HTX */
+                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 }) }
+                }
+
+            }
+
diff --git a/src/mainboard/iwill/dk8_htx/dx/pci5.asl b/src/mainboard/iwill/dk8_htx/dx/pci5.asl
new file mode 100644 (file)
index 0000000..5f25161
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2005 AMD
+ */
+DefinitionBlock ("SSDT5.aml", "SSDT", 1, "AMD-K8", "AMDACPI", 100925440)
+{
+    Scope (_SB)
+    {
+       External (DADD, MethodObj)
+       External (GHCE, MethodObj)
+       External (GHCN, MethodObj)
+       External (GHCL, MethodObj)
+       External (GHCD, MethodObj)
+       External (GNUS, MethodObj)
+       External (GIOR, MethodObj)
+       External (GMEM, MethodObj)
+       External (GWBN, MethodObj)
+       External (GBUS, MethodObj)
+
+       External (PICF)
+
+       External (\_SB.PCI0.LNKA, DeviceObj)
+       External (\_SB.PCI0.LNKB, DeviceObj)
+       External (\_SB.PCI0.LNKC, DeviceObj)
+       External (\_SB.PCI0.LNKD, DeviceObj)
+
+        Device (PCIX)
+        {
+
+           // BUS ? Second HT Chain
+           Name (HCIN, 0xcc)  // HC2 0x01
+            
+           Name (_UID,  0xdd)  // HC 0x03
+
+           Name (_HID, "PNP0A03") 
+
+            Method (_ADR, 0, NotSerialized) //Fake bus should be 0
+           {
+               Return (DADD(GHCN(HCIN), 0x00000000))
+           }
+       
+            Method (_BBN, 0, NotSerialized)
+            {
+                Return (GBUS (GHCN(HCIN), GHCL(HCIN)))
+            }
+
+            Method (_STA, 0, NotSerialized)
+            {
+                Return (\_SB.GHCE(HCIN)) 
+            }
+
+            Method (_CRS, 0, NotSerialized)
+            {
+                Name (BUF0, ResourceTemplate () { })
+               Store( GHCN(HCIN), Local4)
+               Store( GHCL(HCIN), Local5)
+
+                Concatenate (\_SB.GIOR (Local4, Local5), BUF0, Local1)
+                Concatenate (\_SB.GMEM (Local4, Local5), Local1, Local2)
+                Concatenate (\_SB.GWBN (Local4, Local5), Local2, Local3)
+                Return (Local3)
+            }
+
+           Include ("pci5_hc.asl")
+        }
+    }
+
+}
+
diff --git a/src/mainboard/iwill/dk8_htx/dx/pci5_hc.asl b/src/mainboard/iwill/dk8_htx/dx/pci5_hc.asl
new file mode 100644 (file)
index 0000000..6b9276c
--- /dev/null
@@ -0,0 +1 @@
+       Include ("htx_no_ioapic.asl")