components/acpidump/patches/pmtools-01.patch
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Wed, 29 Aug 2012 11:05:56 -0700
changeset 957 255465c5756f
parent 197 fd801ec0737c
permissions -rw-r--r--
Close of build 04.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
197
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     1
diff -Naupr pmtools-20071116/acpidump/acpidump.c acpidump-solaris/acpidump/acpidump.c
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     2
--- pmtools-20071116/acpidump/acpidump.c	2007-11-17 02:27:17.000000000 +0800
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     3
+++ acpidump-solaris/acpidump/acpidump.c	2009-01-14 16:42:09.000000000 +0800
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     4
@@ -81,13 +81,14 @@ static u8 *acpi_map_memory(unsigned long
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     5
 {
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     6
 	unsigned long offset;
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     7
 	u8 *there;
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     8
-	int fd = open("/dev/mem", O_RDONLY);
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     9
+	int fd = open(DEFAULT_MEM_DEV, O_RDONLY);
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    10
 	if (fd < 0) {
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    11
-		fprintf(stderr, "acpi_os_map_memory: cannot open /dev/mem\n");
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    12
+		fprintf(stderr, "acpi_os_map_memory: cannot open %s\n",
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    13
+			DEFAULT_MEM_DEV);
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    14
 		exit(1);
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    15
 	}
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    16
 	offset = where % psz;
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    17
-	there = mmap(NULL, length + offset, PROT_READ, MAP_PRIVATE,
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    18
+	there = mmap(NULL, length + offset, PROT_READ, MAP_FLAGS,
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    19
 			 fd, where - offset);
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    20
 	close(fd);
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    21
 	if (there == MAP_FAILED) return 0;
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    22
diff -Naupr pmtools-20071116/acpidump/Makefile acpidump-solaris/acpidump/Makefile
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    23
--- pmtools-20071116/acpidump/Makefile	2006-11-30 20:41:15.000000000 +0800
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    24
+++ acpidump-solaris/acpidump/Makefile	2009-01-18 14:02:17.850743693 +0800
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    25
@@ -12,3 +12,6 @@ CLEANFILES= $(PROG)
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    26
 clean : 
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    27
 	rm -f $(CLEANFILES) $(patsubst %.c,%.o, $(SRCS)) *~
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    28
 
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    29
+install:
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    30
+	cp $(PROG)	$(DESTDIR)
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    31
+
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    32
diff -Naupr pmtools-20071116/acpixtract/Makefile acpidump-solaris/acpixtract/Makefile
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    33
--- pmtools-20071116/acpixtract/Makefile	2006-11-30 20:45:06.000000000 +0800
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    34
+++ acpidump-solaris/acpixtract/Makefile	2009-01-18 14:02:38.805550620 +0800
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    35
@@ -12,3 +12,6 @@ CLEANFILES= $(PROG)
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    36
 
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    37
 clean : 
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    38
 	rm -f $(CLEANFILES) $(patsubst %.c,%.o, $(SRCS))
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    39
+
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    40
+install:
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    41
+	cp $(PROG)	$(DESTDIR)
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    42
diff -Naupr pmtools-20071116/include/acpi/platform/acenv.h acpidump-solaris/include/acpi/platform/acenv.h
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    43
--- pmtools-20071116/include/acpi/platform/acenv.h	2005-11-12 01:07:04.000000000 +0800
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    44
+++ acpidump-solaris/include/acpi/platform/acenv.h	2009-01-14 16:39:17.000000000 +0800
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    45
@@ -146,6 +146,9 @@
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    46
 #elif defined(NETWARE)
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    47
 #include "acnetware.h"
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    48
 
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    49
+#elif defined(__sun)
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    50
+#include "acsolaris.h"
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    51
+
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    52
 #else
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    53
 
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    54
 /* All other environments */
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    55
diff -Naupr pmtools-20071116/include/acpi/platform/aclinux.h acpidump-solaris/include/acpi/platform/aclinux.h
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    56
--- pmtools-20071116/include/acpi/platform/aclinux.h	2005-11-12 01:07:04.000000000 +0800
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    57
+++ acpidump-solaris/include/acpi/platform/aclinux.h	2009-01-14 16:37:48.000000000 +0800
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    58
@@ -47,6 +47,9 @@
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    59
 #define ACPI_USE_SYSTEM_CLIBRARY
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    60
 #define ACPI_USE_DO_WHILE_0
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    61
 
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    62
+#define	DEFAULT_MEM_DEV "/dev/mem"
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    63
+#define	MAP_FLAGS MAP_PRIVATE
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    64
+
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    65
 #ifdef __KERNEL__
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    66
 
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    67
 #include <linux/config.h>
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    68
diff -Naupr pmtools-20071116/include/acpi/platform/acsolaris.h acpidump-solaris/include/acpi/platform/acsolaris.h
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    69
--- pmtools-20071116/include/acpi/platform/acsolaris.h	1970-01-01 08:00:00.000000000 +0800
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    70
+++ acpidump-solaris/include/acpi/platform/acsolaris.h	2009-01-14 16:37:00.000000000 +0800
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    71
@@ -0,0 +1,95 @@
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    72
+/******************************************************************************
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    73
+ *
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    74
+ * Name: acsolaris.h - OS specific defines, etc.
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    75
+ *
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    76
+ *****************************************************************************/
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    77
+
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    78
+/*
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    79
+ * Copyright (C) 2000 - 2005, R. Byron Moore
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    80
+ * All rights reserved.
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    81
+ *
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    82
+ * Redistribution and use in source and binary forms, with or without
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    83
+ * modification, are permitted provided that the following conditions
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    84
+ * are met:
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    85
+ * 1. Redistributions of source code must retain the above copyright
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    86
+ *    notice, this list of conditions, and the following disclaimer,
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    87
+ *    without modification.
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    88
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    89
+ *    substantially similar to the "NO WARRANTY" disclaimer below
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    90
+ *    ("Disclaimer") and any redistribution must be conditioned upon
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    91
+ *    including a substantially similar Disclaimer requirement for further
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    92
+ *    binary redistribution.
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    93
+ * 3. Neither the names of the above-listed copyright holders nor the names
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    94
+ *    of any contributors may be used to endorse or promote products derived
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    95
+ *    from this software without specific prior written permission.
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    96
+ *
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    97
+ * Alternatively, this software may be distributed under the terms of the
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    98
+ * GNU General Public License ("GPL") version 2 as published by the Free
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    99
+ * Software Foundation.
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   100
+ *
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   101
+ * NO WARRANTY
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   102
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   103
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   104
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   105
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   106
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   107
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   108
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   109
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   110
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   111
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   112
+ * POSSIBILITY OF SUCH DAMAGES.
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   113
+ */
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   114
+
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   115
+#ifndef __ACSOLARIS_H__
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   116
+#define __ACSOLARIS_H__
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   117
+
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   118
+#define ACPI_USE_SYSTEM_CLIBRARY
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   119
+#define ACPI_USE_DO_WHILE_0
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   120
+
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   121
+#define	DEFAULT_MEM_DEV "/dev/xsvc"
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   122
+#define	MAP_FLAGS MAP_SHARED | MAP_NORESERVE
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   123
+
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   124
+#ifdef __KERNEL__
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   125
+
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   126
+#include <linux/config.h>
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   127
+#include <linux/string.h>
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   128
+#include <linux/kernel.h>
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   129
+#include <linux/ctype.h>
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   130
+#include <asm/system.h>
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   131
+#include <asm/atomic.h>
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   132
+#include <asm/div64.h>
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   133
+#include <asm/acpi.h>
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   134
+
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   135
+#define strtoul simple_strtoul
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   136
+
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   137
+#define ACPI_MACHINE_WIDTH  BITS_PER_LONG
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   138
+
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   139
+#else /* !__KERNEL__ */
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   140
+
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   141
+#include <stdarg.h>
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   142
+#include <string.h>
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   143
+#include <stdlib.h>
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   144
+#include <ctype.h>
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   145
+#include <unistd.h>
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   146
+
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   147
+#if defined(__ia64__) || defined(__x86_64__)
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   148
+#define ACPI_MACHINE_WIDTH          64
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   149
+#define COMPILER_DEPENDENT_INT64    long
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   150
+#define COMPILER_DEPENDENT_UINT64   unsigned long
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   151
+#else
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   152
+#define ACPI_MACHINE_WIDTH          32
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   153
+#define COMPILER_DEPENDENT_INT64    long long
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   154
+#define COMPILER_DEPENDENT_UINT64   unsigned long long
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   155
+#define ACPI_USE_NATIVE_DIVIDE
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   156
+#endif
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   157
+
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   158
+#define __cdecl
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   159
+#define ACPI_FLUSH_CPU_CACHE()
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   160
+#endif /* __KERNEL__ */
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   161
+
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   162
+/* Solaris uses GCC */
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   163
+
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   164
+#include "acgcc.h"
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   165
+
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   166
+#endif /* __ACSOLARIS_H__ */
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   167
diff -Naupr pmtools-20071116/madt/Makefile acpidump-solaris/madt/Makefile
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   168
--- pmtools-20071116/madt/Makefile	2007-11-17 02:48:56.000000000 +0800
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   169
+++ acpidump-solaris/madt/Makefile	2009-01-18 14:02:58.243462763 +0800
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   170
@@ -14,3 +14,6 @@ CLEANFILES= $(PROG)
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   171
 clean : 
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   172
 	rm -f $(CLEANFILES) $(patsubst %.c,%.o, $(SRCS)) *~
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   173
 
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   174
+install:
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   175
+	cp $(PROG)	$(DESTDIR)
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   176
+
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   177
diff -Naupr pmtools-20071116/Makefile acpidump-solaris/Makefile
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   178
--- pmtools-20071116/Makefile	2007-11-17 02:46:10.000000000 +0800
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   179
+++ acpidump-solaris/Makefile	2009-01-18 14:07:53.943658824 +0800
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   180
@@ -1,4 +1,6 @@
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   181
 DIRS = acpidump acpixtract madt
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   182
+
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   183
+
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   184
 
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   185
 all:
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   186
 	for i in $(DIRS); do $(MAKE) -C $$i [email protected]; done
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   187
@@ -6,4 +8,7 @@ all:
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   188
 clean:
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   189
 	for i in $(DIRS); do $(MAKE) -C $$i [email protected]; done
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   190
 
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   191
-.PHONY: all clean
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   192
+install:
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   193
+	for i in $(DIRS); do $(MAKE) -C $$i [email protected]; done
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   194
+
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   195
+.PHONY: all clean install