Generic function to post the video bios.80 chars on a line, again...
Based directly on the original patch by Ole Rohne.
Signed-off-by: Michael Marineau <marineam@xxxxxxxxxxxxx>
------------------------------------------------------------------------
Index: linux-2.6.13-rc7/arch/i386/kernel/acpi/sleep.c
===================================================================
--- linux-2.6.13-rc7.orig/arch/i386/kernel/acpi/sleep.c
+++ linux-2.6.13-rc7/arch/i386/kernel/acpi/sleep.c
@@ -5,6 +5,7 @@
* Copyright (C) 2001-2003 Pavel Machek <pavel@xxxxxxx>
*/
+#include <linux/module.h>
#include <linux/acpi.h>
#include <linux/bootmem.h>
#include <linux/dmi.h>
@@ -56,6 +57,34 @@ void acpi_restore_state_mem (void)
zap_low_mappings();
}
+/*
+ * acpi_vgapost
+ */
+
+extern void do_vgapost_lowlevel (unsigned long);
+
+void acpi_vgapost (unsigned long slot)
+{
+ unsigned long flags, saved_video_flags = acpi_video_flags;
+
+ acpi_video_flags = (slot & 0xffff) << 16 | 1;
+
+ /* Map low memory and copy information */
+ init_low_mapping(swapper_pg_dir, USER_PTRS_PER_PGD);
+ memcpy((void *) acpi_wakeup_address, &wakeup_start, &wakeup_end - &wakeup_start);
+ acpi_copy_wakeup_routine(acpi_wakeup_address);
+
+ /* Tunnel thru real mode */
+ local_irq_save(flags);
+ do_vgapost_lowlevel(acpi_wakeup_address);
+ local_irq_restore(flags);