Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2011 Advanced Micro Devices, Inc. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; version 2 of the License. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
Paul Menzel | 2872f4e | 2013-02-21 13:10:24 +0100 | [diff] [blame] | 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 18 | */ |
| 19 | |
| 20 | #include <console/console.h> |
| 21 | #include <string.h> |
| 22 | #include <arch/acpi.h> |
Kerry Sheh | 01f7ab9 | 2012-01-19 13:18:36 +0800 | [diff] [blame] | 23 | #include <arch/acpigen.h> |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 24 | #include <arch/ioapic.h> |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 25 | #include <device/pci.h> |
| 26 | #include <device/pci_ids.h> |
| 27 | #include <cpu/x86/msr.h> |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 28 | #include "agesawrapper.h" |
Marc Jones | 84e0dfc | 2011-12-12 21:12:43 -0700 | [diff] [blame] | 29 | #include <cpu/amd/mtrr.h> |
| 30 | #include <cpu/amd/amdfam14.h> |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 31 | |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 32 | extern const unsigned char AmlCode[]; |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 33 | |
Marc Jones | 84e0dfc | 2011-12-12 21:12:43 -0700 | [diff] [blame] | 34 | unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_table_id) |
| 35 | { |
| 36 | int lens; |
| 37 | msr_t msr; |
| 38 | char pscope[] = "\\_SB.PCI0"; |
| 39 | |
| 40 | lens = acpigen_write_scope(pscope); |
| 41 | msr = rdmsr(TOP_MEM); |
| 42 | lens += acpigen_write_name_dword("TOM1", msr.lo); |
| 43 | msr = rdmsr(TOP_MEM2); |
| 44 | /* |
| 45 | * Since XP only implements parts of ACPI 2.0, we can't use a qword |
| 46 | * here. |
| 47 | * See http://www.acpi.info/presentations/S01USMOBS169_OS%2520new.ppt |
| 48 | * slide 22ff. |
| 49 | * Shift value right by 20 bit to make it fit into 32bit, |
| 50 | * giving us 1MB granularity and a limit of almost 4Exabyte of memory. |
| 51 | */ |
| 52 | lens += acpigen_write_name_dword("TOM2", (msr.hi << 12) | msr.lo >> 20); |
| 53 | acpigen_patch_len(lens - 1); |
| 54 | return (unsigned long) (acpigen_get_current()); |
| 55 | } |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 56 | |
| 57 | unsigned long acpi_fill_mcfg(unsigned long current) |
| 58 | { |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 59 | /* Just a dummy */ |
| 60 | return current; |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 61 | } |
| 62 | |
| 63 | unsigned long acpi_fill_madt(unsigned long current) |
| 64 | { |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 65 | /* create all subtables for processors */ |
Marc Jones | 84e0dfc | 2011-12-12 21:12:43 -0700 | [diff] [blame] | 66 | current = acpi_create_madt_lapics(current); |
Stefan Reinauer | 5ff7c13 | 2011-10-31 12:56:45 -0700 | [diff] [blame] | 67 | |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 68 | /* Write SB800 IOAPIC, only one */ |
Marc Jones | 84e0dfc | 2011-12-12 21:12:43 -0700 | [diff] [blame] | 69 | current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, |
Kerry Sheh | f03360f | 2012-01-19 13:25:55 +0800 | [diff] [blame] | 70 | CONFIG_MAX_CPUS, IO_APIC_ADDR, 0); |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 71 | |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 72 | current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *) |
| 73 | current, 0, 0, 2, 0); |
Marc Jones | 84e0dfc | 2011-12-12 21:12:43 -0700 | [diff] [blame] | 74 | current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *) |
| 75 | current, 0, 9, 9, 0xF); |
Stefan Reinauer | 5ff7c13 | 2011-10-31 12:56:45 -0700 | [diff] [blame] | 76 | |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 77 | /* 0: mean bus 0--->ISA */ |
| 78 | /* 0: PIC 0 */ |
| 79 | /* 2: APIC 2 */ |
Kyösti Mälkki | d874757 | 2014-06-26 05:30:54 +0300 | [diff] [blame^] | 80 | /* 5 mean: 0101 --> Edge-triggered, Active high */ |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 81 | |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 82 | /* create all subtables for processors */ |
Marc Jones | 84e0dfc | 2011-12-12 21:12:43 -0700 | [diff] [blame] | 83 | /* current = acpi_create_madt_lapic_nmis(current, 5, 1); */ |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 84 | /* 1: LINT1 connect to NMI */ |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 85 | |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 86 | return current; |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 87 | } |
| 88 | |
zbao | caf494c8 | 2012-04-13 13:57:14 +0800 | [diff] [blame] | 89 | unsigned long acpi_fill_hest(acpi_hest_t *hest) |
| 90 | { |
| 91 | void *addr, *current; |
| 92 | |
| 93 | /* Skip the HEST header. */ |
| 94 | current = (void *)(hest + 1); |
| 95 | |
| 96 | addr = agesawrapper_getlateinitptr(PICK_WHEA_MCE); |
| 97 | if (addr != NULL) |
| 98 | current += acpi_create_hest_error_source(hest, current, 0, (void *)((u32)addr + 2), *(UINT16 *)addr - 2); |
| 99 | |
| 100 | addr = agesawrapper_getlateinitptr(PICK_WHEA_CMC); |
| 101 | if (addr != NULL) |
| 102 | current += acpi_create_hest_error_source(hest, current, 1, (void *)((u32)addr + 2), *(UINT16 *)addr - 2); |
| 103 | |
| 104 | return (unsigned long)current; |
| 105 | } |
| 106 | |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 107 | unsigned long acpi_fill_slit(unsigned long current) |
| 108 | { |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 109 | // Not implemented |
| 110 | return current; |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 111 | } |
| 112 | |
| 113 | unsigned long acpi_fill_srat(unsigned long current) |
| 114 | { |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 115 | /* No NUMA, no SRAT */ |
| 116 | return current; |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 117 | } |
| 118 | |
| 119 | unsigned long write_acpi_tables(unsigned long start) |
| 120 | { |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 121 | unsigned long current; |
| 122 | acpi_rsdp_t *rsdp; |
| 123 | acpi_rsdt_t *rsdt; |
| 124 | acpi_hpet_t *hpet; |
| 125 | acpi_madt_t *madt; |
| 126 | acpi_srat_t *srat; |
| 127 | acpi_slit_t *slit; |
| 128 | acpi_fadt_t *fadt; |
| 129 | acpi_facs_t *facs; |
| 130 | acpi_header_t *dsdt; |
| 131 | acpi_header_t *ssdt; |
Marc Jones | 84e0dfc | 2011-12-12 21:12:43 -0700 | [diff] [blame] | 132 | acpi_header_t *ssdt2; |
Marc Jones | 7bfd22e | 2011-12-12 22:04:25 -0700 | [diff] [blame] | 133 | acpi_header_t *alib; |
zbao | caf494c8 | 2012-04-13 13:57:14 +0800 | [diff] [blame] | 134 | acpi_hest_t *hest; |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 135 | |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 136 | get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */ |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 137 | |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 138 | /* Align ACPI tables to 16 bytes */ |
Patrick Georgi | 26b00e6 | 2012-04-20 19:19:47 +0200 | [diff] [blame] | 139 | start = ALIGN(start, 16); |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 140 | current = start; |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 141 | |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 142 | printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start); |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 143 | |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 144 | /* We need at least an RSDP and an RSDT Table */ |
| 145 | rsdp = (acpi_rsdp_t *) current; |
| 146 | current += sizeof(acpi_rsdp_t); |
| 147 | rsdt = (acpi_rsdt_t *) current; |
| 148 | current += sizeof(acpi_rsdt_t); |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 149 | |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 150 | /* clear all table memory */ |
| 151 | memset((void *)start, 0, current - start); |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 152 | |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 153 | acpi_write_rsdp(rsdp, rsdt, NULL); |
| 154 | acpi_write_rsdt(rsdt); |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 155 | |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 156 | /* DSDT */ |
Patrick Georgi | 26b00e6 | 2012-04-20 19:19:47 +0200 | [diff] [blame] | 157 | current = ALIGN(current, 8); |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 158 | printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current); |
Marc Jones | 84e0dfc | 2011-12-12 21:12:43 -0700 | [diff] [blame] | 159 | dsdt = (acpi_header_t *)current; |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 160 | memcpy(dsdt, &AmlCode, sizeof(acpi_header_t)); |
| 161 | current += dsdt->length; |
| 162 | memcpy(dsdt, &AmlCode, dsdt->length); |
| 163 | printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n",dsdt,dsdt->length); |
Scott Duplichan | 20aad25 | 2011-05-20 00:06:09 +0000 | [diff] [blame] | 164 | |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 165 | /* FACS */ // it needs 64 bit alignment |
Patrick Georgi | 26b00e6 | 2012-04-20 19:19:47 +0200 | [diff] [blame] | 166 | current = ALIGN(current, 8); |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 167 | printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current); |
Marc Jones | 84e0dfc | 2011-12-12 21:12:43 -0700 | [diff] [blame] | 168 | facs = (acpi_facs_t *) current; |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 169 | current += sizeof(acpi_facs_t); |
| 170 | acpi_create_facs(facs); |
Scott Duplichan | 20aad25 | 2011-05-20 00:06:09 +0000 | [diff] [blame] | 171 | |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 172 | /* FADT */ |
Patrick Georgi | 26b00e6 | 2012-04-20 19:19:47 +0200 | [diff] [blame] | 173 | current = ALIGN(current, 8); |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 174 | printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current); |
| 175 | fadt = (acpi_fadt_t *) current; |
| 176 | current += sizeof(acpi_fadt_t); |
Scott Duplichan | 20aad25 | 2011-05-20 00:06:09 +0000 | [diff] [blame] | 177 | |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 178 | acpi_create_fadt(fadt, facs, dsdt); |
| 179 | acpi_add_table(rsdp, fadt); |
Scott Duplichan | 20aad25 | 2011-05-20 00:06:09 +0000 | [diff] [blame] | 180 | |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 181 | /* |
| 182 | * We explicitly add these tables later on: |
| 183 | */ |
Patrick Georgi | 26b00e6 | 2012-04-20 19:19:47 +0200 | [diff] [blame] | 184 | current = ALIGN(current, 8); |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 185 | printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current); |
| 186 | hpet = (acpi_hpet_t *) current; |
| 187 | current += sizeof(acpi_hpet_t); |
| 188 | acpi_create_hpet(hpet); |
| 189 | acpi_add_table(rsdp, hpet); |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 190 | |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 191 | /* If we want to use HPET Timers Linux wants an MADT */ |
Patrick Georgi | 26b00e6 | 2012-04-20 19:19:47 +0200 | [diff] [blame] | 192 | current = ALIGN(current, 8); |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 193 | printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current); |
| 194 | madt = (acpi_madt_t *) current; |
| 195 | acpi_create_madt(madt); |
| 196 | current += madt->header.length; |
| 197 | acpi_add_table(rsdp, madt); |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 198 | |
zbao | caf494c8 | 2012-04-13 13:57:14 +0800 | [diff] [blame] | 199 | /* HEST */ |
Patrick Georgi | 26b00e6 | 2012-04-20 19:19:47 +0200 | [diff] [blame] | 200 | current = ALIGN(current, 8); |
zbao | caf494c8 | 2012-04-13 13:57:14 +0800 | [diff] [blame] | 201 | hest = (acpi_hest_t *)current; |
| 202 | acpi_write_hest((void *)current); |
| 203 | acpi_add_table(rsdp, (void *)current); |
| 204 | current += ((acpi_header_t *)current)->length; |
| 205 | |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 206 | /* SRAT */ |
Patrick Georgi | 26b00e6 | 2012-04-20 19:19:47 +0200 | [diff] [blame] | 207 | current = ALIGN(current, 8); |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 208 | printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current); |
| 209 | srat = (acpi_srat_t *) agesawrapper_getlateinitptr (PICK_SRAT); |
| 210 | if (srat != NULL) { |
Marc Jones | 84e0dfc | 2011-12-12 21:12:43 -0700 | [diff] [blame] | 211 | memcpy((void *)current, srat, srat->header.length); |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 212 | srat = (acpi_srat_t *) current; |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 213 | current += srat->header.length; |
| 214 | acpi_add_table(rsdp, srat); |
| 215 | } |
Marc Jones | 84e0dfc | 2011-12-12 21:12:43 -0700 | [diff] [blame] | 216 | else { |
| 217 | printk(BIOS_DEBUG, " AGESA SRAT table NULL. Skipping.\n"); |
| 218 | } |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 219 | |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 220 | /* SLIT */ |
Patrick Georgi | 26b00e6 | 2012-04-20 19:19:47 +0200 | [diff] [blame] | 221 | current = ALIGN(current, 8); |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 222 | printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current); |
| 223 | slit = (acpi_slit_t *) agesawrapper_getlateinitptr (PICK_SLIT); |
| 224 | if (slit != NULL) { |
Marc Jones | 84e0dfc | 2011-12-12 21:12:43 -0700 | [diff] [blame] | 225 | memcpy((void *)current, slit, slit->header.length); |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 226 | slit = (acpi_slit_t *) current; |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 227 | current += slit->header.length; |
| 228 | acpi_add_table(rsdp, slit); |
| 229 | } |
Marc Jones | 84e0dfc | 2011-12-12 21:12:43 -0700 | [diff] [blame] | 230 | else { |
| 231 | printk(BIOS_DEBUG, " AGESA SLIT table NULL. Skipping.\n"); |
| 232 | } |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 233 | |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 234 | /* SSDT */ |
Patrick Georgi | 26b00e6 | 2012-04-20 19:19:47 +0200 | [diff] [blame] | 235 | current = ALIGN(current, 16); |
Marc Jones | 7bfd22e | 2011-12-12 22:04:25 -0700 | [diff] [blame] | 236 | printk(BIOS_DEBUG, "ACPI: * AGESA ALIB SSDT at %lx\n", current); |
| 237 | alib = (acpi_header_t *)agesawrapper_getlateinitptr (PICK_ALIB); |
| 238 | if (alib != NULL) { |
| 239 | memcpy((void *)current, alib, alib->length); |
zbao | 2132005 | 2012-04-13 13:48:50 +0800 | [diff] [blame] | 240 | alib = (acpi_header_t *) current; |
Marc Jones | 7bfd22e | 2011-12-12 22:04:25 -0700 | [diff] [blame] | 241 | current += alib->length; |
zbao | 2132005 | 2012-04-13 13:48:50 +0800 | [diff] [blame] | 242 | acpi_add_table(rsdp, (void *)alib); |
| 243 | } else { |
Marc Jones | 7bfd22e | 2011-12-12 22:04:25 -0700 | [diff] [blame] | 244 | printk(BIOS_DEBUG, " AGESA ALIB SSDT table NULL. Skipping.\n"); |
| 245 | } |
| 246 | |
zbao | 585a400 | 2012-04-12 11:27:26 +0800 | [diff] [blame] | 247 | /* The DSDT needs additional work for the AGESA SSDT Pstate table */ |
| 248 | /* Keep the comment for a while. */ |
Patrick Georgi | 26b00e6 | 2012-04-20 19:19:47 +0200 | [diff] [blame] | 249 | current = ALIGN(current, 16); |
Marc Jones | 84e0dfc | 2011-12-12 21:12:43 -0700 | [diff] [blame] | 250 | printk(BIOS_DEBUG, "ACPI: * AGESA SSDT Pstate at %lx\n", current); |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 251 | ssdt = (acpi_header_t *)agesawrapper_getlateinitptr (PICK_PSTATE); |
| 252 | if (ssdt != NULL) { |
Marc Jones | 84e0dfc | 2011-12-12 21:12:43 -0700 | [diff] [blame] | 253 | memcpy((void *)current, ssdt, ssdt->length); |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 254 | ssdt = (acpi_header_t *) current; |
| 255 | current += ssdt->length; |
Kerry Sheh | 01f7ab9 | 2012-01-19 13:18:36 +0800 | [diff] [blame] | 256 | acpi_add_table(rsdp,ssdt); |
zbao | 585a400 | 2012-04-12 11:27:26 +0800 | [diff] [blame] | 257 | } else { |
Kerry Sheh | 01f7ab9 | 2012-01-19 13:18:36 +0800 | [diff] [blame] | 258 | printk(BIOS_DEBUG, " AGESA SSDT Pstate table NULL. Skipping.\n"); |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 259 | } |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 260 | |
Patrick Georgi | 26b00e6 | 2012-04-20 19:19:47 +0200 | [diff] [blame] | 261 | current = ALIGN(current, 16); |
Marc Jones | 84e0dfc | 2011-12-12 21:12:43 -0700 | [diff] [blame] | 262 | printk(BIOS_DEBUG, "ACPI: * coreboot TOM SSDT2 at %lx\n", current); |
| 263 | ssdt2 = (acpi_header_t *) current; |
| 264 | acpi_create_ssdt_generator(ssdt2, ACPI_TABLE_CREATOR); |
| 265 | current += ssdt2->length; |
| 266 | acpi_add_table(rsdp,ssdt2); |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 267 | |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 268 | printk(BIOS_INFO, "ACPI: done.\n"); |
| 269 | return current; |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 270 | } |