* move i386 / ACPI dependent code out of hardwaremain.c and into the i386 
  acpi code.
* add some defines for FADT flags

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4167 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
diff --git a/src/boot/hardwaremain.c b/src/boot/hardwaremain.c
index 99c4d30..c22754f 100644
--- a/src/boot/hardwaremain.c
+++ b/src/boot/hardwaremain.c
@@ -28,16 +28,16 @@
 
 #include <console/console.h>
 #include <version.h>
-#include <boot/tables.h>
 #include <device/device.h>
 #include <device/pci.h>
 #include <delay.h>
 #include <stdlib.h>
 #include <part/hard_reset.h>
 #include <part/init_timer.h>
+#include <boot/tables.h>
 #include <boot/elf.h>
 #include <cbfs.h>
-#if HAVE_ACPI_RESUME == 1
+#if HAVE_ACPI_RESUME
 #include <arch/acpi.h>
 #endif
 
@@ -54,9 +54,6 @@
 void hardwaremain(int boot_complete)
 {
 	struct lb_memory *lb_mem;
-#if HAVE_ACPI_RESUME == 1
-	void *wake_vec;
-#endif
 
 	post_code(0x80);
 
@@ -92,20 +89,8 @@
 	post_code(0x89);
 
 #if HAVE_ACPI_RESUME == 1
-
-#if MEM_TRAIN_SEQ != 0
-	#error "So far it works on AMD and MEM_TRAIN_SEQ == 0"
-#endif
-
-#if _RAMBASE < 0x1F00000
-	#error "For ACPI RESUME you need to have _RAMBASE at least 31MB"
-	#error "Chipset support (S3_NVRAM_EARLY and ACPI_IS_WAKEUP_EARLY functions and memory ctrl)"
-	#error "And coreboot memory reserved in mainboard.c"
-#endif
-	/* if we happen to be resuming find wakeup vector and jump to OS */
-	wake_vec = acpi_find_wakeup_vector();
-	if (wake_vec)
-		acpi_jump_to_wakeup(wake_vec);
+	suspend_resume();
+	post_code(0x8a);
 #endif
 
 	/* Now that we have collected all of our information