summaryrefslogtreecommitdiff
path: root/src/mainboard/kontron
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/kontron')
-rw-r--r--src/mainboard/kontron/986lcd-m/acpi_tables.c8
-rw-r--r--src/mainboard/kontron/kt690/acpi_tables.c21
2 files changed, 13 insertions, 16 deletions
diff --git a/src/mainboard/kontron/986lcd-m/acpi_tables.c b/src/mainboard/kontron/986lcd-m/acpi_tables.c
index bd8e932c44..1c6cc9d3ee 100644
--- a/src/mainboard/kontron/986lcd-m/acpi_tables.c
+++ b/src/mainboard/kontron/986lcd-m/acpi_tables.c
@@ -29,8 +29,7 @@
#include <cpu/x86/msr.h>
#include "dmi.h"
-extern unsigned char AmlCode[];
-void *amlcodeptr = &AmlCode;
+extern const acpi_header_t AmlCode;
#if CONFIG_HAVE_ACPI_SLIC
unsigned long acpi_create_slic(unsigned long current);
#endif
@@ -204,10 +203,9 @@ unsigned long write_acpi_tables(unsigned long start)
ALIGN_CURRENT;
acpi_create_facs(facs);
- int len = ((acpi_header_t *) amlcodeptr)->length;
dsdt = (acpi_header_t *) current;
- current += len;
- memcpy((void *) dsdt, amlcodeptr, len);
+ current += AmlCode.length;
+ memcpy((void *) dsdt, &AmlCode, AmlCode.length);
ALIGN_CURRENT;
diff --git a/src/mainboard/kontron/kt690/acpi_tables.c b/src/mainboard/kontron/kt690/acpi_tables.c
index b77a3bd507..997074e225 100644
--- a/src/mainboard/kontron/kt690/acpi_tables.c
+++ b/src/mainboard/kontron/kt690/acpi_tables.c
@@ -57,13 +57,13 @@ static void dump_mem(u32 start, u32 end)
}
#endif
-extern u8 AmlCode[];
+extern const acpi_header_t AmlCode;
#if CONFIG_ACPI_SSDTX_NUM >= 1
-extern u8 AmlCode_ssdt2[];
-extern u8 AmlCode_ssdt3[];
-extern u8 AmlCode_ssdt4[];
-extern u8 AmlCode_ssdt5[];
+extern const acpi_header_t AmlCode_ssdt2;
+extern const acpi_header_t AmlCode_ssdt3;
+extern const acpi_header_t AmlCode_ssdt4;
+extern const acpi_header_t AmlCode_ssdt5;
#endif
#define IO_APIC_ADDR 0xfec00000UL
@@ -219,17 +219,17 @@ unsigned long write_acpi_tables(unsigned long start)
ssdtx = (acpi_header_t *) current;
switch (sysconf.hcid[i]) {
case 1: /* 8132 */
- p = AmlCode_ssdt2;
+ p = &AmlCode_ssdt2;
break;
case 2: /* 8151 */
- p = AmlCode_ssdt3;
+ p = &AmlCode_ssdt3;
break;
case 3: /* 8131 */
- p = AmlCode_ssdt4;
+ p = &AmlCode_ssdt4;
break;
default:
/* HTX no io apic */
- p = AmlCode_ssdt5;
+ p = &AmlCode_ssdt5;
break;
}
current += ((acpi_header_t *) p)->length;
@@ -251,8 +251,7 @@ unsigned long write_acpi_tables(unsigned long start)
/* DSDT */
printk(BIOS_DEBUG, "ACPI: * DSDT\n");
dsdt = (acpi_header_t *) current;
- memcpy((void *)dsdt, (void *)AmlCode,
- ((acpi_header_t *) AmlCode)->length);
+ memcpy((void *)dsdt, &AmlCode, AmlCode.length);
current += dsdt->length;
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n", dsdt, dsdt->length);
/* FADT */