projects
/
coreboot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add support for mainboard specific suspend/resume handler
[coreboot.git]
/
src
/
arch
/
x86
/
boot
/
acpi.c
diff --git
a/src/arch/x86/boot/acpi.c
b/src/arch/x86/boot/acpi.c
index f1be0345e491b4d39270d907ed027467aee3afa1..f17e73e3f677f2e0cfa1726310ae9b5a349cfcce 100644
(file)
--- a/
src/arch/x86/boot/acpi.c
+++ b/
src/arch/x86/boot/acpi.c
@@
-31,6
+31,10
@@
#include <arch/acpigen.h>
#include <device/pci.h>
#include <cbmem.h>
#include <arch/acpigen.h>
#include <device/pci.h>
#include <cbmem.h>
+#include <cpu/x86/lapic_def.h>
+#if CONFIG_COLLECT_TIMESTAMPS
+#include <timestamp.h>
+#endif
u8 acpi_checksum(u8 *table, u32 length)
{
u8 acpi_checksum(u8 *table, u32 length)
{
@@
-188,8
+192,6
@@
int acpi_create_madt_lapic_nmi(acpi_madt_lapic_nmi_t *lapic_nmi, u8 cpu,
void acpi_create_madt(acpi_madt_t *madt)
{
void acpi_create_madt(acpi_madt_t *madt)
{
-#define LOCAL_APIC_ADDR 0xfee00000ULL
-
acpi_header_t *header = &(madt->header);
unsigned long current = (unsigned long)madt + sizeof(acpi_madt_t);
acpi_header_t *header = &(madt->header);
unsigned long current = (unsigned long)madt + sizeof(acpi_madt_t);
@@
-472,8
+474,12
@@
void suspend_resume(void)
/* If we happen to be resuming find wakeup vector and jump to OS. */
wake_vec = acpi_find_wakeup_vector();
/* If we happen to be resuming find wakeup vector and jump to OS. */
wake_vec = acpi_find_wakeup_vector();
- if (wake_vec)
+ if (wake_vec) {
+ /* Call mainboard resume handler first, if defined. */
+ if (mainboard_suspend_resume)
+ mainboard_suspend_resume();
acpi_jump_to_wakeup(wake_vec);
acpi_jump_to_wakeup(wake_vec);
+ }
}
/* This is to be filled by SB code - startup value what was found. */
}
/* This is to be filled by SB code - startup value what was found. */
@@
-603,6
+609,10
@@
void acpi_jump_to_wakeup(void *vector)
/* Copy wakeup trampoline in place. */
memcpy((void *)WAKEUP_BASE, &__wakeup, (size_t)&__wakeup_size);
/* Copy wakeup trampoline in place. */
memcpy((void *)WAKEUP_BASE, &__wakeup, (size_t)&__wakeup_size);
+#if CONFIG_COLLECT_TIMESTAMPS
+ timestamp_add_now(TS_ACPI_WAKE_JUMP);
+#endif
+
acpi_do_wakeup((u32)vector, acpi_backup_memory, CONFIG_RAMBASE,
HIGH_MEMORY_SAVE);
}
acpi_do_wakeup((u32)vector, acpi_backup_memory, CONFIG_RAMBASE,
HIGH_MEMORY_SAVE);
}