diff --git a/src/include/cpu/generic/x86/arch/swab.h b/src/include/cpu/generic/x86/arch/swab.h new file mode 100644 index 0000000000..3a166863ec --- /dev/null +++ b/src/include/cpu/generic/x86/arch/swab.h @@ -0,0 +1,33 @@ +#ifndef _SWAB_H +#define _SWAB_H + +/* + * linux/byteorder/swab.h + * Byte-swapping, independently from CPU endianness + * swabXX[ps]?(foo) + * + * Francois-Rene Rideau 19971205 + * separated swab functions from cpu_to_XX, + * to clean up support for bizarre-endian architectures. + * + * See asm-i386/byteorder.h and suches for examples of how to provide + * architecture-dependent optimized versions + * + */ + +/* casts are necessary for constants, because we never know how for sure + * how U/UL/ULL map to __u16, __u32, __u64. At least not in a portable way. + */ +#define swab16(x) \ + ((unsigned short)( \ + (((unsigned short)(x) & (unsigned short)0x00ffU) << 8) | \ + (((unsigned short)(x) & (unsigned short)0xff00U) >> 8) )) + +#define swab32(x) \ + ((unsigned int)( \ + (((unsigned int)(x) & (unsigned int)0x000000ffUL) << 24) | \ + (((unsigned int)(x) & (unsigned int)0x0000ff00UL) << 8) | \ + (((unsigned int)(x) & (unsigned int)0x00ff0000UL) >> 8) | \ + (((unsigned int)(x) & (unsigned int)0xff000000UL) >> 24) )) + +#endif /* _SWAB_H */ diff --git a/src/mainboard/emulation/qemu-i386/Kconfig b/src/mainboard/emulation/qemu-i386/Kconfig index d7377876d8..054807c373 100644 --- a/src/mainboard/emulation/qemu-i386/Kconfig +++ b/src/mainboard/emulation/qemu-i386/Kconfig @@ -19,8 +19,9 @@ config BIOS help Build the rest of the BIOS. This includes memory init, device init, PCI init, and so on. -config COMPRESSORS +config UNCOMPRESSORS bool default y help - Build the various compressors found in the compressors directory + Build the various uncompressors found in the uncompressors directory +