>From 8a1e7b8f698a3e459d61c489feae602ed9bc83fc Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sat, 10 Aug 2013 11:48:00 -0400 Subject: [PATCH 2/2] make pmbase runtime To: seabios@seabios.org Signed-off-by: Gerd Hoffmann --- src/acpi.c | 2 +- src/acpi.h | 2 +- src/smm.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/acpi.c b/src/acpi.c index 8db1ed4..db33595 100644 --- a/src/acpi.c +++ b/src/acpi.c @@ -18,7 +18,7 @@ #include "acpi-dsdt.hex" -u32 acpi_pm1a_cnt VARFSEG; +u16 acpi_pm1a_cnt VARFSEG; static void build_header(struct acpi_table_header *h, u32 sig, int len, u8 rev) diff --git a/src/acpi.h b/src/acpi.h index f0d24d4..5c478a1 100644 --- a/src/acpi.h +++ b/src/acpi.h @@ -36,7 +36,7 @@ struct rsdp_descriptor { /* Root System Descriptor Pointer */ }; extern struct rsdp_descriptor *RsdpAddr; -extern u32 acpi_pm1a_cnt; +extern u16 acpi_pm1a_cnt; /* Table structure from Linux kernel (the ACPI tables are under the BSD license) */ diff --git a/src/smm.c b/src/smm.c index d8473fd..b06107e 100644 --- a/src/smm.c +++ b/src/smm.c @@ -52,7 +52,7 @@ ASM32FLAT( " jne 1f\n" /* ACPI disable */ - " movw $" __stringify(PORT_ACPI_PM_BASE) " + 0x04, %dx\n" /* PMCNTRL */ + " addr32 movw (acpi_pm1a_cnt), %dx\n" /* PMCNTRL */ " inw %dx, %ax\n" " andw $~1, %ax\n" " outw %ax, %dx\n" @@ -64,7 +64,7 @@ ASM32FLAT( " jne 2f\n" /* ACPI enable */ - " movw $" __stringify(PORT_ACPI_PM_BASE) " + 0x04, %dx\n" /* PMCNTRL */ + " addr32 movw (acpi_pm1a_cnt), %dx\n" /* PMCNTRL */ " inw %dx, %ax\n" " orw $1, %ax\n" " outw %ax, %dx\n" -- 1.7.11.7