path: root/arch.h
diff options
authorStefan Tauner <>2015-01-10 09:32:50 +0000
committerStefan Tauner <>2015-01-10 09:32:50 +0000
commitb0eee9b8d649efc3db9a6c5f333b0fff5204a979 (patch)
treefcba10fdf1451557f3bc58de6f39d669e5106c46 /arch.h
parentbe62d3fc07194ec13f091aa06beff0a032f1a418 (diff)
Unify target OS and CPU architecture checks
We do CPU architecture checks once for the makefile in arch.h and once for HW access abstraction in hwaccess.c. This patch unifies related files so that they can share the checks to improve maintainability and reduce the chance of inconsistencies. Furthermore, it refines some of the definitions, which - adds "support" for AARCH64 and PPC64, - adds big-endian handling on arm as well as LE handling on PPC64, - fixes compilation of internal.c on AARCH64 and PPC64. Additionally, this patch continues to unify all OS checks in flashrom by adding a new helper macro IS_WINDOWS. The old header file for architecture checking is renamed to platform.h to reflect its broader scope and all new macros are add in there. Corresponding to flashrom svn r1864. Signed-off-by: Stefan Tauner <> Acked-by: Stefan Tauner <>
Diffstat (limited to 'arch.h')
1 files changed, 0 insertions, 33 deletions
diff --git a/arch.h b/arch.h
deleted file mode 100644
index f3f3b0d..0000000
--- a/arch.h
+++ /dev/null
@@ -1,33 +0,0 @@
- * This file is part of the flashrom project.
- *
- * Copyright (C) 2011 Carl-Daniel Hailfinger
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
- * Header file for CPU architecture checking.
- */
-#if defined (__i386__) || defined (__x86_64__)
-#define __FLASHROM_ARCH__ "x86"
-#elif defined (__mips) || defined (__mips__) || defined (_mips) || defined (mips)
-#define __FLASHROM_ARCH__ "mips"
-#elif defined(__powerpc__) || defined(__powerpc64__) || defined(__ppc__) || defined(__ppc64__)
-#define __FLASHROM_ARCH__ "ppc"
-#elif defined(__arm__)
-#define __FLASHROM_ARCH__ "arm"
OpenPOWER on IntegriCloud