Re: [PATCH 1/3] Generic acpi vgapost

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael Marineau napsal(a):

Generic function to post the video bios.

Based directly on the original patch by Ole Rohne.

Signed-off-by: Michael Marineau <[email protected]>
------------------------------------------------------------------------

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 <[email protected]>
 */

+#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);
80 chars on a line, again...

+	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);

--
Jiri Slaby         www.fi.muni.cz/~xslaby
~\-/~      [email protected]      ~\-/~
241B347EC88228DE51EE A49C4A73A25004CB2A10

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux