diff options
author | Jean Delvare <jdelvare@suse.de> | 2006-05-10 07:41:42 +0000 |
---|---|---|
committer | Jean Delvare <jdelvare@suse.de> | 2006-05-10 07:41:42 +0000 |
commit | 816d042552bd3d522a5c996f9d85ad42d7a5d55a (patch) | |
tree | d9aa9a8a76014ae7f1e6ddd719fcee6f95e08565 | |
parent | fca422120bba8b202882ee7784b2b705c3a26152 (diff) | |
download | dmidecode-git-816d042552bd3d522a5c996f9d85ad42d7a5d55a.tar.gz |
Automatically enable the unaligned memory access workaround on ia64.
-rw-r--r-- | README | 5 | ||||
-rw-r--r-- | config.h | 10 | ||||
-rw-r--r-- | types.h | 16 |
3 files changed, 20 insertions, 11 deletions
@@ -46,9 +46,8 @@ Two parameters can be set in the Makefile file to make dmidecode work on non-i386 systems. They should be used if your system uses the big endian byte ordering (Motorola) or doesn't support unaligned memory accesses, respectively. For example, compiling for a SPARC processor would require -both. Note that this hasn't been much tested though, because the data -manipulated by dmidecode and the other tools is only found on i386 and -neighbour architectures (x86_64, ia64) anyway. +both. Compiling for an IA64 processor requires the memory alignment +workaround, and it is enabled automatically. ** DOCUMENTATION ** @@ -2,6 +2,9 @@ * Configuration */ +#ifndef CONFIG_H +#define CONFIG_H + /* Default memory device file */ #ifdef __BEOS__ #define DEFAULT_MEM_DEV "/dev/misc/mem" @@ -13,3 +16,10 @@ #ifndef __BEOS__ #define USE_MMAP #endif + +/* Use memory alignment workaround or not */ +#ifdef __ia64__ +#define ALIGNMENT_WORKAROUND +#endif + +#endif @@ -1,22 +1,22 @@ #ifndef TYPES_H #define TYPES_H +#include "config.h" + typedef unsigned char u8; typedef unsigned short u16; typedef signed short i16; typedef unsigned int u32; /* - * These macros help us solve problems on systems that don't support - * non-aligned memory access. This isn't a big issue IMHO, since the tools - * in this package are intended mainly for Intel and compatible systems, - * which are little-endian and support non-aligned memory access. Anyway, - * you may use the following defines to control the way it works: - * - Define BIGENDIAN on big-endian systems. + * You may use the following defines to adjust the type definitions + * depending on the architecture: + * - Define BIGENDIAN on big-endian systems. Untested, as all target + * systems to date are little-endian. * - Define ALIGNMENT_WORKAROUND if your system doesn't support * non-aligned memory access. In this case, we use a slower, but safer, - * memory access method. - * You most probably will have to define none or the two of them. + * memory access method. This should be done automatically in config.h + * for architectures which need it. */ #ifdef BIGENDIAN |