#include <arch/acpigen.h>
#include <device/pci.h>
#include <cbmem.h>
+#include <cpu/x86/lapic_def.h>
+#if CONFIG_CHROMEOS
+#include <vendorcode/google/chromeos/chromeos.h>
+#endif
u8 acpi_checksum(u8 *table, u32 length)
{
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);
static int acpi_is_wakeup(void)
{
- return (acpi_slp_type == 3);
+ /* Both resume from S2 and resume from S3 restart at CPU reset */
+ return (acpi_slp_type == 3 || acpi_slp_type == 2);
}
static acpi_rsdp_t *valid_rsdp(acpi_rsdp_t *rsdp)
if (!acpi_is_wakeup())
return NULL;
+#if CONFIG_CHROMEOS
+ printk(BIOS_DEBUG, "Verified boot TPM initialization.\n");
+ init_vboot();
+#endif
+
printk(BIOS_DEBUG, "Trying to find the wakeup vector...\n");
/* Find RSDP. */
return wake_vec;
}
+#if CONFIG_SMP
extern char *lowmem_backup;
extern char *lowmem_backup_ptr;
extern int lowmem_backup_size;
+#endif
#define WAKEUP_BASE 0x600
return;
}
+#if CONFIG_SMP
// FIXME: This should go into the ACPI backup memory, too. No pork saussages.
/*
* Just restore the SMP trampoline and continue with wakeup on
* assembly level.
*/
memcpy(lowmem_backup_ptr, lowmem_backup, lowmem_backup_size);
+#endif
/* Copy wakeup trampoline in place. */
memcpy((void *)WAKEUP_BASE, &__wakeup, (size_t)&__wakeup_size);