summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/i386
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2017-12-23 18:18:56 +1100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-01-25 08:45:26 +0100
commit2afb22b7e1ebcbe40373ff7e0efae7d207c655a9 (patch)
tree44759efe9374f13200a97e96d91bd9a2b7e5ce2a /c/src/lib/libcpu/i386
parentMAINTAINERS: Add myself to Write After Approval. (diff)
downloadrtems-2afb22b7e1ebcbe40373ff7e0efae7d207c655a9.tar.bz2
Remove make preinstall
A speciality of the RTEMS build system was the make preinstall step. It copied header files from arbitrary locations into the build tree. The header files were included via the -Bsome/build/tree/path GCC command line option. This has at least seven problems: * The make preinstall step itself needs time and disk space. * Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error. * There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult. * The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit. * An introduction of a new build system is difficult. * Include paths specified by the -B option are system headers. This may suppress warnings. * The parallel build had sporadic failures on some hosts. This patch removes the make preinstall step. All installed header files are moved to dedicated include directories in the source tree. Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc, etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g. erc32, imx, qoriq, etc. The new cpukit include directories are: * cpukit/include * cpukit/score/cpu/@RTEMS_CPU@/include * cpukit/libnetworking The new BSP include directories are: * bsps/include * bsps/@RTEMS_CPU@/include * bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include There are build tree include directories for generated files. The include directory order favours the most general header file, e.g. it is not possible to override general header files via the include path order. The "bootstrap -p" option was removed. The new "bootstrap -H" option should be used to regenerate the "headers.am" files. Update #3254.
Diffstat (limited to 'c/src/lib/libcpu/i386')
-rw-r--r--c/src/lib/libcpu/i386/Makefile.am6
-rw-r--r--c/src/lib/libcpu/i386/byteorder.h31
-rw-r--r--c/src/lib/libcpu/i386/configure.ac2
-rw-r--r--c/src/lib/libcpu/i386/cpuModel.h51
-rw-r--r--c/src/lib/libcpu/i386/page.h39
-rw-r--r--c/src/lib/libcpu/i386/preinstall.am32
6 files changed, 2 insertions, 159 deletions
diff --git a/c/src/lib/libcpu/i386/Makefile.am b/c/src/lib/libcpu/i386/Makefile.am
index c47b9dfc39..6f1e9fe3ec 100644
--- a/c/src/lib/libcpu/i386/Makefile.am
+++ b/c/src/lib/libcpu/i386/Makefile.am
@@ -4,11 +4,6 @@ noinst_PROGRAMS =
include $(top_srcdir)/../../../automake/compile.am
-include_libcpudir = $(includedir)/libcpu
-
-include_libcpu_HEADERS = page.h cpuModel.h
-include_libcpu_HEADERS += byteorder.h
-
noinst_PROGRAMS += cache.rel
cache_rel_SOURCES = cache.c cache_.h \
../shared/src/cache_manager.c ../shared/include/cache.h
@@ -25,5 +20,4 @@ page_rel_SOURCES = page.c page.h
page_rel_CPPFLAGS = $(AM_CPPFLAGS)
page_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
-include $(srcdir)/preinstall.am
include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/lib/libcpu/i386/byteorder.h b/c/src/lib/libcpu/i386/byteorder.h
deleted file mode 100644
index 939e51fe84..0000000000
--- a/c/src/lib/libcpu/i386/byteorder.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#ifndef _LIBCPU_BYTEORDER_H
-#define _LIBCPU_BYTEORDER_H
-
-static inline void st_le32(volatile uint32_t *addr, uint32_t value)
-{
- *(addr)=value ;
-}
-
-static inline uint32_t ld_le32(volatile uint32_t *addr)
-{
- return(*addr);
-}
-
-static inline void st_le16(volatile uint16_t *addr, uint16_t value)
-{
- *(addr)=value ;
-}
-
-static inline uint16_t ld_le16(volatile uint16_t *addr)
-{
- return(*addr);
-}
-
-
-#endif
diff --git a/c/src/lib/libcpu/i386/configure.ac b/c/src/lib/libcpu/i386/configure.ac
index e03af4824a..3f0f59543a 100644
--- a/c/src/lib/libcpu/i386/configure.ac
+++ b/c/src/lib/libcpu/i386/configure.ac
@@ -4,6 +4,8 @@ AC_PREREQ([2.69])
AC_INIT([rtems-c-src-lib-libcpu-i386],[_RTEMS_VERSION],[https://devel.rtems.org/newticket])
AC_CONFIG_SRCDIR([idtr.S])
RTEMS_TOP([../../../../..],[../../..])
+RTEMS_SOURCE_TOP
+RTEMS_BUILD_TOP
RTEMS_CANONICAL_TARGET_CPU
diff --git a/c/src/lib/libcpu/i386/cpuModel.h b/c/src/lib/libcpu/i386/cpuModel.h
deleted file mode 100644
index d17839b7ea..0000000000
--- a/c/src/lib/libcpu/i386/cpuModel.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * This file contains declaration for variables and code
- * that may be used to get the Intel Cpu identification
- * that has been performed by checkCPUtypeSetCr0 function.
- */
-
-/*
- * COPYRIGHT (c) 1998 valette@crf.canon.fr
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#ifndef libcpu_cpuModel_h
-#define libcpu_cpuModel_h
-
-/*
- * Tell us the machine setup..
- */
-
-extern char hard_math; /* floating point coprocessor present indicator */
-extern char x86; /* type of cpu (3 = 386, 4 =486, ...) */
-extern char x86_model;
-extern char x86_mask;
-extern int x86_capability; /* cpuid:EDX */
-extern int x86_capability_x; /* cpuid:ECX */
-extern int x86_capability_ebx; /* cpuid:EBX */
-extern int x86_capability_cores; /* cpuid.(EAX=4, ECX=0) - physical cores */
-extern char x86_vendor_id[13];
-extern int have_cpuid;
-extern unsigned char Cx86_step; /* cyrix processor identification */
-
-/* Display this information on console in ascii form */
-extern void printCpuInfo(void);
-
-/* determine if the CPU has a TSC */
-#define x86_has_tsc() \
- (x86_capability & (1 << 4))
-
-static inline unsigned long long
-rdtsc(void)
-{
- /* Return the value of the on-chip cycle counter. */
- unsigned long long result;
- __asm__ volatile(".byte 0x0F, 0x31" : "=A" (result));
- return result;
-} /* rdtsc */
-
-
-#endif
diff --git a/c/src/lib/libcpu/i386/page.h b/c/src/lib/libcpu/i386/page.h
deleted file mode 100644
index 5e9cec2227..0000000000
--- a/c/src/lib/libcpu/i386/page.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * @file page.h
- *
- * Copyright (C) 1998 Eric Valette (valette@crf.canon.fr)
- * Canon Centre Recherche France.
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#ifndef _LIBCPU_i386_PAGE_H
-#define _LIBCPU_i386_PAGE_H
-
-#ifndef ASM
-
-#include <rtems/score/cpu.h>
-
-/* C declaration for paging management */
-
-extern int _CPU_is_cache_enabled(void);
-extern int _CPU_is_paging_enabled(void);
-extern int init_paging(void);
-extern void _CPU_enable_paging(void);
-extern void _CPU_disable_paging(void);
-extern void _CPU_disable_cache(void);
-extern void _CPU_enable_cache(void);
-extern int _CPU_map_phys_address
- (void **mappedAddress, void *physAddress,
- int size, int flag);
-extern int _CPU_unmap_virt_address (void *mappedAddress, int size);
-extern int _CPU_change_memory_mapping_attribute
- (void **newAddress, void *mappedAddress,
- unsigned int size, unsigned int flag);
-extern int _CPU_display_memory_attribute(void);
-
-# endif /* ASM */
-
-#endif
diff --git a/c/src/lib/libcpu/i386/preinstall.am b/c/src/lib/libcpu/i386/preinstall.am
deleted file mode 100644
index 1e6c1dfdba..0000000000
--- a/c/src/lib/libcpu/i386/preinstall.am
+++ /dev/null
@@ -1,32 +0,0 @@
-## Automatically generated by ampolish3 - Do not edit
-
-if AMPOLISH3
-$(srcdir)/preinstall.am: Makefile.am
- $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am
-endif
-
-PREINSTALL_DIRS =
-DISTCLEANFILES = $(PREINSTALL_DIRS)
-
-all-am: $(PREINSTALL_FILES)
-
-PREINSTALL_FILES =
-CLEANFILES = $(PREINSTALL_FILES)
-
-$(PROJECT_INCLUDE)/libcpu/$(dirstamp):
- @$(MKDIR_P) $(PROJECT_INCLUDE)/libcpu
- @: > $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
-PREINSTALL_DIRS += $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
-
-$(PROJECT_INCLUDE)/libcpu/page.h: page.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/page.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/page.h
-
-$(PROJECT_INCLUDE)/libcpu/cpuModel.h: cpuModel.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/cpuModel.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/cpuModel.h
-
-$(PROJECT_INCLUDE)/libcpu/byteorder.h: byteorder.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/byteorder.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/byteorder.h
-