[coreboot-gerrit] New patch to review for coreboot: ed621c9 RELOCATABLE_RAMSTAGE: Fix weak symbols in ACPI
Kyösti Mälkki (kyosti.malkki@gmail.com)
gerrit at coreboot.org
Sat Dec 27 12:26:13 CET 2014
Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7955
-gerrit
commit ed621c934e787192f860a9e0f35e61006f2779b9
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date: Fri Dec 26 13:29:09 2014 +0200
RELOCATABLE_RAMSTAGE: Fix weak symbols in ACPI
After relocation the weak symbols are no longer NULL.
Always have empty stub function defined.
Change-Id: I6cb959c1fa10b4b63018e400636842e2a15d6e81
Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
src/arch/x86/boot/acpi.c | 16 ++++++++++++----
src/arch/x86/include/arch/acpi.h | 4 ++--
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/src/arch/x86/boot/acpi.c b/src/arch/x86/boot/acpi.c
index 5abc178..61f0954 100644
--- a/src/arch/x86/boot/acpi.c
+++ b/src/arch/x86/boot/acpi.c
@@ -830,6 +830,10 @@ unsigned long write_acpi_tables(unsigned long start)
#endif
#if CONFIG_HAVE_ACPI_RESUME
+void __attribute__((weak)) mainboard_suspend_resume(void)
+{
+}
+
void acpi_resume(void *wake_vec)
{
#if CONFIG_HAVE_SMI_HANDLER
@@ -844,8 +848,7 @@ void acpi_resume(void *wake_vec)
#endif
/* Call mainboard resume handler first, if defined. */
- if (mainboard_suspend_resume)
- mainboard_suspend_resume();
+ mainboard_suspend_resume();
post_code(POST_OS_RESUME);
acpi_jump_to_wakeup(wake_vec);
@@ -854,13 +857,18 @@ void acpi_resume(void *wake_vec)
/* This is to be filled by SB code - startup value what was found. */
u8 acpi_slp_type = 0;
+int __attribute__((weak)) acpi_get_sleep_type(void)
+{
+ return 0;
+}
+
static void acpi_handoff_wakeup(void)
{
static int once = 0;
if (once)
return;
- if (acpi_get_sleep_type)
- acpi_slp_type = acpi_get_sleep_type();
+
+ acpi_slp_type = acpi_get_sleep_type();
once = 1;
}
diff --git a/src/arch/x86/include/arch/acpi.h b/src/arch/x86/include/arch/acpi.h
index 54217b3..502c826 100644
--- a/src/arch/x86/include/arch/acpi.h
+++ b/src/arch/x86/include/arch/acpi.h
@@ -570,12 +570,12 @@ int acpi_is_wakeup_early(void);
void acpi_fail_wakeup(void);
void acpi_resume(void *wake_vec);
void acpi_prepare_resume_backup(void);
-void __attribute__((weak)) mainboard_suspend_resume(void);
+void mainboard_suspend_resume(void);
void *acpi_find_wakeup_vector(void);
void *acpi_get_wakeup_rsdp(void);
void acpi_jump_to_wakeup(void *wakeup_addr);
-int __attribute__((weak)) acpi_get_sleep_type(void);
+int acpi_get_sleep_type(void);
#endif /* IS_ENABLED(CONFIG_HAVE_ACPI_RESUME) */
/* cpu/intel/speedstep/acpi.c */
More information about the coreboot-gerrit
mailing list