Add detection/dump support for ServerEngines SE-SM 4210-P01.
[coreboot.git] / util / nvramtool / common.h
index c8ea92a5885ab13169cb2e828be69d333d8742ce..8ad0f65a38cc18ff18119a35f9e602423396a439 100644 (file)
@@ -25,7 +25,7 @@
  *
  *  You should have received a copy of the GNU General Public License along
  *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 \*****************************************************************************/
 
 #ifndef COMMON_H
 #include <string.h>
 #include <ctype.h>
 
-#if defined(__FreeBSD__)
-#include <sys/types.h>
-#include <machine/cpufunc.h>
-#define OUTB(x, y) do { u_int tmp = (y); outb(tmp, (x)); } while (0)
-#define OUTW(x, y) do { u_int tmp = (y); outw(tmp, (x)); } while (0)
-#define OUTL(x, y) do { u_int tmp = (y); outl(tmp, (x)); } while (0)
-#define INB(x) __extension__ ({ u_int tmp = (x); inb(tmp); })
-#define INW(x) __extension__ ({ u_int tmp = (x); inw(tmp); })
-#define INL(x) __extension__ ({ u_int tmp = (x); inl(tmp); })
-#else
-#if defined(__GLIBC__)
-#include <sys/io.h>
-#endif
-#if (defined(__MACH__) && defined(__APPLE__))
-#include <DirectIO/darwinio.h>
-#endif
-#define OUTB outb
-#define OUTW outw
-#define OUTL outl
-#define INB  inb
-#define INW  inw
-#define INL  inl
-#endif
-
 #define FALSE 0
 #define TRUE 1
 
@@ -77,7 +53,7 @@
 #define CMOS_RESULT_START 0x30000
 #define CMOS_OP_RESULT_START 0x40000
 
-#define OK 0  /* 0 is used universally to indicate success. */
+#define OK 0                   /* 0 is used universally to indicate success. */
 
 #define LINE_EOF (COMMON_RESULT_START + 0)
 #define LINE_TOO_LONG (COMMON_RESULT_START + 1)
@@ -88,8 +64,8 @@ extern const char prog_name[];
 /* version of this program */
 extern const char prog_version[];
 
-int get_line_from_file (FILE *f, char line[], int line_buf_size);
-void out_of_memory (void);
-void usage (FILE *outfile);
+int get_line_from_file(FILE * f, char line[], int line_buf_size);
+void out_of_memory(void);
+void usage(FILE * outfile);
 
-#endif  /* COMMON_H */
+#endif                         /* COMMON_H */