From a8bf95d0249565f4210ccab5c13232d501ce0c2d Mon Sep 17 00:00:00 2001 From: Till Straumann Date: Wed, 22 Apr 2009 22:06:58 +0000 Subject: - importing updated version from SLAC as of 20090422 --- bsd_eth_drivers/if_em/LICENSE | 31 ++++ bsd_eth_drivers/if_em/Makefile | 158 +++++++++++++++++ bsd_eth_drivers/if_em/README.rtems | 66 +++++++ bsd_eth_drivers/if_em/freebsd_cvs_status | 291 +++++++++++++++++++++++++++++++ 4 files changed, 546 insertions(+) create mode 100644 bsd_eth_drivers/if_em/LICENSE create mode 100644 bsd_eth_drivers/if_em/Makefile create mode 100644 bsd_eth_drivers/if_em/README.rtems create mode 100644 bsd_eth_drivers/if_em/freebsd_cvs_status (limited to 'bsd_eth_drivers/if_em') diff --git a/bsd_eth_drivers/if_em/LICENSE b/bsd_eth_drivers/if_em/LICENSE new file mode 100644 index 0000000..7e13aa1 --- /dev/null +++ b/bsd_eth_drivers/if_em/LICENSE @@ -0,0 +1,31 @@ +$FreeBSD: src/sys/dev/em/LICENSE,v 1.6 2007/05/04 00:00:11 jfv Exp $ + + Copyright (c) 2001-2007, Intel Corporation + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. Neither the name of the Intel Corporation nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + diff --git a/bsd_eth_drivers/if_em/Makefile b/bsd_eth_drivers/if_em/Makefile new file mode 100644 index 0000000..ea0d776 --- /dev/null +++ b/bsd_eth_drivers/if_em/Makefile @@ -0,0 +1,158 @@ +# +# Makefile.leaf,v 1.7 2002/07/22 22:56:09 joel Exp +# +# Templates/Makefile.leaf +# Template leaf node Makefile +# +# +LIBNAME=libif_em.a + +ENBL_82542_SUPPORT=NO +ENBL_ICH8LAN_SUPPORT=YES + +CPPFLAGS_82542_SUPPORT_NO=-DNO_82542_SUPPORT +C_PIECES_82542_SUPPORT_YES=e1000_82542 +CPPFLAGS_ICH8LAN_SUPPORT_NO=-DNO_ICH8LAN_SUPPORT +C_PIECES_ICH8LAN_SUPPORT_YES=e1000_ich8lan + +# C source names, if any, go here -- minus the .c +C_PIECES= + +C_PIECES+=e1000_80003es2lan +C_PIECES+=e1000_82540 +C_PIECES+=e1000_82541 +C_PIECES+=$(C_PIECES_82542_SUPPORT_$(ENBL_82542_SUPPORT)) +C_PIECES+=e1000_82543 +C_PIECES+=e1000_82571 +C_PIECES+=e1000_82575 +C_PIECES+=e1000_api +C_PIECES+=$(C_PIECES_ICH8LAN_SUPPORT_$(ENBL_ICH8LAN_SUPPORT)) +C_PIECES+=e1000_mac +C_PIECES+=e1000_manage +C_PIECES+=e1000_nvm +C_PIECES+=e1000_phy + +C_PIECES+=if_em + +C_FILES=$(C_PIECES:%=%.c) +C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) + +# C++ source names, if any, go here -- minus the .cc +CC_PIECES= +CC_FILES=$(CC_PIECES:%=%.cc) +CC_O_FILES=$(CC_PIECES:%=${ARCH}/%.o) + +H_FILES= + +# Assembly source names, if any, go here -- minus the .S +S_PIECES= +S_FILES=$(S_PIECES:%=%.S) +S_O_FILES=$(S_FILES:%.S=${ARCH}/%.o) + +SRCS=$(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES) +OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES) + +# If your PGMS target has the '.exe' extension, a statically +# linked application is generated. +# If it has a '.obj' extension, a loadable module is built. +# +# +ifdef LIBNAME +LIB=${ARCH}/${LIBNAME} +else +PGMS=${ARCH}/if_em.obj +endif + +# List of RTEMS Classic API Managers to be included in the application +# goes here. Use: +# MANAGERS=all +# to include all RTEMS Classic API Managers in the application or +# something like this to include a specific set of managers. +# MANAGERS=io event message rate_monotonic semaphore timer +# +# UNUSED for loadable modules +MANAGERS=ALL + +ifndef RTEMS_MAKEFILE_PATH +$(error you need to set the RTEMS_MAKEFILE_PATH environment variable) +endif + +include $(RTEMS_MAKEFILE_PATH)/Makefile.inc + +include $(RTEMS_CUSTOM) +ifdef LIBNAME +include $(RTEMS_ROOT)/make/lib.cfg +else +include $(RTEMS_ROOT)/make/leaf.cfg +endif + +# +# (OPTIONAL) Add local stuff here using += +# + +DEFINES += +CPPFLAGS += -I. -I../libbsdport -I../libbsdport/dummyheaders +CPPFLAGS += $(CPPFLAGS_82542_SUPPORT_$(ENBL_82542_SUPPORT)) +CPPFLAGS += $(CPPFLAGS_ICH8LAN_SUPPORT_$(ENBL_ICH8LAN_SUPPORT)) +CFLAGS += + +# +# CFLAGS_DEBUG_V are used when the `make debug' target is built. +# To link your application with the non-optimized RTEMS routines, +# uncomment the following line: +# CFLAGS_DEBUG_V += -qrtems_debug +# + +LD_PATHS += +LD_LIBS += +LDFLAGS += + +# +# Add your list of files to delete here. The config files +# already know how to delete some stuff, so you may want +# to just run 'make clean' first to see what gets missed. +# 'make clobber' already includes 'make clean' +# + +CLEAN_ADDITIONS += +CLOBBER_ADDITIONS += + +all: ${ARCH} $(SRCS) $(PGMS) ${LIB} + +#How to make a relocatable object +$(filter %.obj, $(PGMS)): ${OBJS} + $(make-obj) + +#How to make an executable (statically linked) +$(filter %.exe,$(PGMS)): ${LINK_FILES} + $(make-exe) +ifdef ELFEXT +ifdef XSYMS + $(XSYMS) $(@:%.exe=%.$(ELFEXT)) $(@:%.exe=%.sym) +endif +endif + +$(LIB): ${OBJS} + $(make-library) + +ifndef RTEMS_SITE_INSTALLDIR +RTEMS_SITE_INSTALLDIR = $(PROJECT_RELEASE) +endif + +${RTEMS_SITE_INSTALLDIR}/include \ +${RTEMS_SITE_INSTALLDIR}/lib \ +${RTEMS_SITE_INSTALLDIR}/bin: + test -d $@ || mkdir -p $@ +# Install the program(s), appending _g or _p as appropriate. +# for include files, just use $(INSTALL_CHANGE) +# +# - Some BSPs might generate bootable executables in yet another +# format (such as .srec) and you might need to extend the rule +# below so the essential files get installed. YMMV. +ifdef LIBNAME +install: all $(RTEMS_SITE_INSTALLDIR)/lib + $(INSTALL_VARIANT) -m 644 ${LIB} ${RTEMS_SITE_INSTALLDIR}/lib +else +install: all $(RTEMS_SITE_INSTALLDIR)/bin + $(INSTALL_VARIANT) -m 555 ${PGMS} ${PGMS:%.exe=%.bin} ${PGMS:%.exe=%.sym} ${RTEMS_SITE_INSTALLDIR}/bin +endif diff --git a/bsd_eth_drivers/if_em/README.rtems b/bsd_eth_drivers/if_em/README.rtems new file mode 100644 index 0000000..88fa2fb --- /dev/null +++ b/bsd_eth_drivers/if_em/README.rtems @@ -0,0 +1,66 @@ +RTEMS PORT OF THE 'em' ETHERNET DRIVER +====================================== + +This is a port of the intel / FreeBSD 'em' driver as of +2007/7/4 (checked out from FreeBSD/head on that date). + +SUPPORTED BSPs: +- you need 'libbsdport' which in turn needs 'libbspExt' + These work for i386/pc386 and powerpc/new-exception-processing + BSPs, i.e., the BSP must implement and . + +USAGE: +- to attach this driver: + * define a NULL terminated list with all libbsdport supported + drivers you want to include with your application: + + extern driver_t libbsdport_em_driver; + + driver_t *libbsdport_netdriver_table[] = { + &libbsdport_em_driver, + /* other drivers here or upstream of 'em' if they support + * the same hardware but are preferred. + */ + 0 + }; + + * specify libbsdport_netdriver_attach for the 'attach' function + pointer in struct rtems_bsdnet_ifconfig. + + * use the 'name' field in struct rtems_bsdnet_ifconfig to filter + drivers and device instances: + + + + either may be omitted which means that the next available + driver/hardware device is to be used. Here are a few examples: + + "" /* use first device found supported by any driver in the + * libbsdport_driver_table[]. + */ + + "em2" /* use second device supported by the 'em' driver */ + + Notes: Counting instances begins with 1 (not 0). + Consult libbsdport/README for more information. + + +KNOWN ISSUES: +- 'ignore_broadcast' and 'mtu' settings from + struct rtems_bsdnet_ifconfig are ignored. I haven't seen + many drivers that honour 'ignore_broadcast' and 'mtu' can be + set using a ioctl(). I'm trying to keep changes to BSD sources + minimal... +- ring sizes are restricted (driver validates sizes and uses + defaults if requested sizes don't meet requirements). + +TESTED WITH: + 82544 on motorola MVME5500 (PPC MVE board) + 82573 on concurrent technologies PP410 (intel x86) board + +TESTED ON: + rtems-4.7 + powerpc/beatnik (motorola MVME5500) + i386/pc686 (concurrent technologies PP410 compact PCI) + +T.S, 200707 diff --git a/bsd_eth_drivers/if_em/freebsd_cvs_status b/bsd_eth_drivers/if_em/freebsd_cvs_status new file mode 100644 index 0000000..da6f8b8 --- /dev/null +++ b/bsd_eth_drivers/if_em/freebsd_cvs_status @@ -0,0 +1,291 @@ +FreeBSD checkout at 2007-07-04 00:49 PDT + +? freebsd_cvs_status +=================================================================== +File: LICENSE Status: Up-to-date + + Working revision: 1.6 + Repository revision: 1.6 /home/ncvs/src/sys/dev/em/LICENSE,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: README Status: Up-to-date + + Working revision: 1.15 + Repository revision: 1.15 /home/ncvs/src/sys/dev/em/README,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: e1000_80003es2lan.c Status: Up-to-date + + Working revision: 1.3 + Repository revision: 1.3 /home/ncvs/src/sys/dev/em/e1000_80003es2lan.c,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: e1000_80003es2lan.h Status: Up-to-date + + Working revision: 1.3 + Repository revision: 1.3 /home/ncvs/src/sys/dev/em/e1000_80003es2lan.h,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: e1000_82540.c Status: Up-to-date + + Working revision: 1.3 + Repository revision: 1.3 /home/ncvs/src/sys/dev/em/e1000_82540.c,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: e1000_82541.c Status: Up-to-date + + Working revision: 1.3 + Repository revision: 1.3 /home/ncvs/src/sys/dev/em/e1000_82541.c,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: e1000_82541.h Status: Up-to-date + + Working revision: 1.3 + Repository revision: 1.3 /home/ncvs/src/sys/dev/em/e1000_82541.h,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: e1000_82542.c Status: Up-to-date + + Working revision: 1.3 + Repository revision: 1.3 /home/ncvs/src/sys/dev/em/e1000_82542.c,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: e1000_82543.c Status: Up-to-date + + Working revision: 1.3 + Repository revision: 1.3 /home/ncvs/src/sys/dev/em/e1000_82543.c,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: e1000_82543.h Status: Up-to-date + + Working revision: 1.3 + Repository revision: 1.3 /home/ncvs/src/sys/dev/em/e1000_82543.h,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: e1000_82571.c Status: Up-to-date + + Working revision: 1.3 + Repository revision: 1.3 /home/ncvs/src/sys/dev/em/e1000_82571.c,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: e1000_82571.h Status: Up-to-date + + Working revision: 1.3 + Repository revision: 1.3 /home/ncvs/src/sys/dev/em/e1000_82571.h,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: e1000_82575.c Status: Up-to-date + + Working revision: 1.3 + Repository revision: 1.3 /home/ncvs/src/sys/dev/em/e1000_82575.c,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: e1000_82575.h Status: Up-to-date + + Working revision: 1.3 + Repository revision: 1.3 /home/ncvs/src/sys/dev/em/e1000_82575.h,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: e1000_api.c Status: Up-to-date + + Working revision: 1.3 + Repository revision: 1.3 /home/ncvs/src/sys/dev/em/e1000_api.c,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: e1000_api.h Status: Up-to-date + + Working revision: 1.3 + Repository revision: 1.3 /home/ncvs/src/sys/dev/em/e1000_api.h,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: e1000_defines.h Status: Up-to-date + + Working revision: 1.3 + Repository revision: 1.3 /home/ncvs/src/sys/dev/em/e1000_defines.h,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: e1000_hw.h Status: Up-to-date + + Working revision: 1.3 + Repository revision: 1.3 /home/ncvs/src/sys/dev/em/e1000_hw.h,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: e1000_ich8lan.c Status: Up-to-date + + Working revision: 1.3 + Repository revision: 1.3 /home/ncvs/src/sys/dev/em/e1000_ich8lan.c,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: e1000_ich8lan.h Status: Up-to-date + + Working revision: 1.3 + Repository revision: 1.3 /home/ncvs/src/sys/dev/em/e1000_ich8lan.h,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: e1000_mac.c Status: Up-to-date + + Working revision: 1.3 + Repository revision: 1.3 /home/ncvs/src/sys/dev/em/e1000_mac.c,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: e1000_mac.h Status: Up-to-date + + Working revision: 1.3 + Repository revision: 1.3 /home/ncvs/src/sys/dev/em/e1000_mac.h,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: e1000_manage.c Status: Up-to-date + + Working revision: 1.3 + Repository revision: 1.3 /home/ncvs/src/sys/dev/em/e1000_manage.c,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: e1000_manage.h Status: Up-to-date + + Working revision: 1.3 + Repository revision: 1.3 /home/ncvs/src/sys/dev/em/e1000_manage.h,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: e1000_nvm.c Status: Up-to-date + + Working revision: 1.3 + Repository revision: 1.3 /home/ncvs/src/sys/dev/em/e1000_nvm.c,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: e1000_nvm.h Status: Up-to-date + + Working revision: 1.3 + Repository revision: 1.3 /home/ncvs/src/sys/dev/em/e1000_nvm.h,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: e1000_osdep.h Status: Up-to-date + + Working revision: 1.3 + Repository revision: 1.3 /home/ncvs/src/sys/dev/em/e1000_osdep.h,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: e1000_phy.c Status: Up-to-date + + Working revision: 1.3 + Repository revision: 1.3 /home/ncvs/src/sys/dev/em/e1000_phy.c,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: e1000_phy.h Status: Up-to-date + + Working revision: 1.3 + Repository revision: 1.3 /home/ncvs/src/sys/dev/em/e1000_phy.h,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: e1000_regs.h Status: Up-to-date + + Working revision: 1.3 + Repository revision: 1.3 /home/ncvs/src/sys/dev/em/e1000_regs.h,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: if_em.c Status: Up-to-date + + Working revision: 1.181 + Repository revision: 1.181 /home/ncvs/src/sys/dev/em/if_em.c,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: if_em.h Status: Up-to-date + + Working revision: 1.61 + Repository revision: 1.61 /home/ncvs/src/sys/dev/em/if_em.h,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + -- cgit v1.2.3