#include <console/console.h>
#include <string.h>
#include <arch/acpi.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <cpu/x86/msr.h>
#include <cpu/amd/mtrr.h>
#include <cpu/amd/amdk8_sysconf.h>
-#include <../../../northbridge/amd/amdk8/amdk8_acpi.h>
+#include "northbridge/amd/amdk8/amdk8_acpi.h"
#include <arch/cpu.h>
#include <cpu/amd/model_fxx_powernow.h>
}
#endif
-extern const acpi_header_t AmlCode;
-
-#define IO_APIC_ADDR 0xfec00000UL
+extern const unsigned char AmlCode[];
unsigned long acpi_fill_mcfg(unsigned long current)
{
return current;
}
-
-
-static void update_ssdtx(void *ssdtx, int i)
-{
- uint8_t *PCI;
- uint8_t *HCIN;
- uint8_t *UID;
-
- PCI = ssdtx + 0x32;
- HCIN = ssdtx + 0x39;
- UID = ssdtx + 0x40;
-
- if (i < 7) {
- *PCI = (uint8_t) ('4' + i - 1);
- } else {
- *PCI = (uint8_t) ('A' + i - 1 - 6);
- }
- *HCIN = (uint8_t) i;
- *UID = (uint8_t) (i + 3);
-
- /* FIXME: need to update the GSI id in the ssdtx too */
-
-}
-
unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_table_id) {
k8acpi_write_vars();
amd_model_fxx_generate_powernow(pm_base + 8, 6, 1);
/* DSDT */
printk(BIOS_DEBUG, "ACPI: * DSDT\n");
dsdt = (acpi_header_t *) current;
- memcpy((void *)dsdt, &AmlCode, AmlCode.length);
+ memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
current += dsdt->length;
+ memcpy(dsdt, &AmlCode, dsdt->length);
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n", dsdt, dsdt->length);
/* FADT */
printk(BIOS_DEBUG, "ACPI: * FADT\n");