summaryrefslogtreecommitdiffstats
path: root/sys/i386/acpica/genwakecode.pl
diff options
context:
space:
mode:
authortakawata <takawata@FreeBSD.org>2001-07-20 06:07:34 +0000
committertakawata <takawata@FreeBSD.org>2001-07-20 06:07:34 +0000
commitd3d1b151d3f3f67385b5e5adbbafd20527daa156 (patch)
treefb4e3d6b249e14e537e8681949888f823fa67602 /sys/i386/acpica/genwakecode.pl
parentc3d97bef4d7f5c6ef78bbe34ac08731d7e2a9b0f (diff)
downloadFreeBSD-src-d3d1b151d3f3f67385b5e5adbbafd20527daa156.zip
FreeBSD-src-d3d1b151d3f3f67385b5e5adbbafd20527daa156.tar.gz
Add ACPI S2-S4BIOS Suspend/Resume code.
Some problems may remain. Reviewed by:iwasaki
Diffstat (limited to 'sys/i386/acpica/genwakecode.pl')
-rw-r--r--sys/i386/acpica/genwakecode.pl22
1 files changed, 22 insertions, 0 deletions
diff --git a/sys/i386/acpica/genwakecode.pl b/sys/i386/acpica/genwakecode.pl
new file mode 100644
index 0000000..1f5aede
--- /dev/null
+++ b/sys/i386/acpica/genwakecode.pl
@@ -0,0 +1,22 @@
+#!/usr/bin/perl
+# $FreeBSD$
+print "static char wakecode[] = {\n";
+open(BIN, "hexdump -Cv acpi_wakecode.bin|");
+while (<BIN>) {
+ s/^[0-9a-f]+//;
+ s/\|.*$//;
+ foreach (split()) {
+ print "0x$_,";
+ }
+ print "\n";
+}
+print "};\n";
+close(BIN);
+
+open(NM, "nm -n acpi_wakecode.o|");
+while (<NM>) {
+ split;
+ print "#define $_[2] 0x$_[0]\n";
+}
+close(NM);
+
OpenPOWER on IntegriCloud