update the network support to etherboot-4.6.4.

This commit is contained in:
okuji 2000-07-29 19:22:54 +00:00
parent 8d3a5e79b9
commit 558f2f176e
16 changed files with 308 additions and 209 deletions

View file

@ -1,3 +1,25 @@
2000-07-30 OKUJI Yoshinori <okuji@gnu.org>
Update the network support to Etherboot-4.6.4.
From Daniel Wagner <wagi@gmx.ch>:
* netboot/3c509.c: Copied from Etherboot-4.6.4.
* netboot/3c509.h: Likewise.
* netboot/cards.h: Likewise.
* netboot/ns8390.c: Likewise.
* netboot/sk_g16.c: Likewise.
* netboot/sk_g16.h: Likewise.
* netboot/tulip.c: Likewise.
* netboot/pci.h: Likewise.
* netboot/main.c (dhcpdiscover): Updated.
(dhcprequest): Likewise.
(bootp): Likewise.
* netboot/README.netboot: Added the information about the new
option --enable-ns8390-force-16bit.
* configure.in (--enable-ns8390-force-16bit): New option.
* netboot/config.c: Updated.
2000-07-29 OKUJI Yoshinori <okuji@gnu.org> 2000-07-29 OKUJI Yoshinori <okuji@gnu.org>
The Linux zImage support is working now. The Linux zImage support is working now.

1
NEWS
View file

@ -7,6 +7,7 @@ New in 0.5.96 - XXXX-XX-XX:
* You can specify `--no-mem-option' to the command "kernel", if you want * You can specify `--no-mem-option' to the command "kernel", if you want
GRUB not to pass a Linux's mem option automatically. GRUB not to pass a Linux's mem option automatically.
* Now GRUB is compliant with the Linux/i386 boot protocol version 2.02. * Now GRUB is compliant with the Linux/i386 boot protocol version 2.02.
* The network support is updated to Etherboot-4.6.4.
New in 0.5.95 - 2000-06-27: New in 0.5.95 - 2000-06-27:
* NetBSD ELF kernel support is added. You have to specify the new option * NetBSD ELF kernel support is added. You have to specify the new option

1
THANKS
View file

@ -14,6 +14,7 @@ Bryan Ford <baford@cs.utah.edu>
Chip Salzenberg <chip@valinux.com> Chip Salzenberg <chip@valinux.com>
Christoph Plattner <Christoph.Plattner@dot.at> Christoph Plattner <Christoph.Plattner@dot.at>
Dan J. Walters <djw@cs.utexas.edu> Dan J. Walters <djw@cs.utexas.edu>
Daniel Wagner <wagi@gmx.ch>
Edmund GRIMLEY EVANS <edmundo@rano.demon.co.uk> Edmund GRIMLEY EVANS <edmundo@rano.demon.co.uk>
Edward Killips <ekillips@triton.net> Edward Killips <ekillips@triton.net>
Eric Hanchrow <erich@microsoft.com> Eric Hanchrow <erich@microsoft.com>

173
configure vendored
View file

@ -99,6 +99,9 @@ ac_help="$ac_help
ac_help="$ac_help ac_help="$ac_help
--enable-compex-rl2000-fix --enable-compex-rl2000-fix
specify this if you have a Compex RL2000 PCI" specify this if you have a Compex RL2000 PCI"
ac_help="$ac_help
--enable-ns8390-force-16bit
specify this if falsely 8 bit is detected"
ac_help="$ac_help ac_help="$ac_help
--enable-smc9000-scan=LIST --enable-smc9000-scan=LIST
probe for SMC9000 I/O addresses using LIST" probe for SMC9000 I/O addresses using LIST"
@ -652,7 +655,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh. # ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:656: checking for a BSD compatible install" >&5 echo "configure:659: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -705,7 +708,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
echo "configure:709: checking whether build environment is sane" >&5 echo "configure:712: checking whether build environment is sane" >&5
# Just in case # Just in case
sleep 1 sleep 1
echo timestamp > conftestfile echo timestamp > conftestfile
@ -777,7 +780,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args. # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2 set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:781: checking for $ac_word" >&5 echo "configure:784: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -807,7 +810,7 @@ test -n "$AWK" && break
done done
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:811: checking whether ${MAKE-make} sets \${MAKE}" >&5 echo "configure:814: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -933,7 +936,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi fi
echo $ac_n "checking host system type""... $ac_c" 1>&6 echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:937: checking host system type" >&5 echo "configure:940: checking host system type" >&5
host_alias=$host host_alias=$host
case "$host_alias" in case "$host_alias" in
@ -967,7 +970,7 @@ esac
# #
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
echo "configure:971: checking whether to enable maintainer-specific portions of Makefiles" >&5 echo "configure:974: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode" enableval="$enable_maintainer_mode"
@ -993,7 +996,7 @@ if test "x$enable_maintainer_mode" = xyes; then
# Extract the first word of "perl", so it can be a program name with args. # Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2 set dummy perl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:997: checking for $ac_word" >&5 echo "configure:1000: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1040,7 +1043,7 @@ fi
# #
echo $ac_n "checking build system type""... $ac_c" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:1044: checking build system type" >&5 echo "configure:1047: checking build system type" >&5
build_alias=$build build_alias=$build
case "$build_alias" in case "$build_alias" in
@ -1066,7 +1069,7 @@ fi
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2 set dummy ${ac_tool_prefix}gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1070: checking for $ac_word" >&5 echo "configure:1073: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1098,7 +1101,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args. # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2 set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1102: checking for $ac_word" >&5 echo "configure:1105: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1128,7 +1131,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args. # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2 set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1132: checking for $ac_word" >&5 echo "configure:1135: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1179,7 +1182,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args. # Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2 set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1183: checking for $ac_word" >&5 echo "configure:1186: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1211,7 +1214,7 @@ fi
fi fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1215: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 echo "configure:1218: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@ -1222,12 +1225,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF cat > conftest.$ac_ext << EOF
#line 1226 "configure" #line 1229 "configure"
#include "confdefs.h" #include "confdefs.h"
main(){return(0);} main(){return(0);}
EOF EOF
if { (eval echo configure:1231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler. # If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then if (./conftest; exit) 2>/dev/null; then
@ -1253,12 +1256,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:1257: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "configure:1260: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:1262: checking whether we are using GNU C" >&5 echo "configure:1265: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1267,7 +1270,7 @@ else
yes; yes;
#endif #endif
EOF EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes ac_cv_prog_gcc=yes
else else
ac_cv_prog_gcc=no ac_cv_prog_gcc=no
@ -1286,7 +1289,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS" ac_save_CFLAGS="$CFLAGS"
CFLAGS= CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:1290: checking whether ${CC-cc} accepts -g" >&5 echo "configure:1293: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1319,7 +1322,7 @@ fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1323: checking how to run the C preprocessor" >&5 echo "configure:1326: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory. # On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then if test -n "$CPP" && test -d "$CPP"; then
CPP= CPP=
@ -1334,13 +1337,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser, # On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. # not just through cpp.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1338 "configure" #line 1341 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
Syntax Error Syntax Error
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
: :
@ -1351,13 +1354,13 @@ else
rm -rf conftest* rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp" CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1355 "configure" #line 1358 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
Syntax Error Syntax Error
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
: :
@ -1368,13 +1371,13 @@ else
rm -rf conftest* rm -rf conftest*
CPP="${CC-cc} -nologo -E" CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1372 "configure" #line 1375 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
Syntax Error Syntax Error
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1378: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
: :
@ -1407,7 +1410,7 @@ echo "$ac_t""$CPP" 1>&6
depcc="$CC" depcc="$CC"
depcpp="$CPP" depcpp="$CPP"
echo $ac_n "checking dependency style of $depcc""... $ac_c" 1>&6 echo $ac_n "checking dependency style of $depcc""... $ac_c" 1>&6
echo "configure:1411: checking dependency style of $depcc" >&5 echo "configure:1414: checking dependency style of $depcc" >&5
if eval "test \"`echo '$''{'am_cv_CC_dependencies_compiler_type'+set}'`\" = set"; then if eval "test \"`echo '$''{'am_cv_CC_dependencies_compiler_type'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1463,7 +1466,7 @@ if test "x$with_binutils" != x; then
# Extract the first word of "ranlib", so it can be a program name with args. # Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2 set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1467: checking for $ac_word" >&5 echo "configure:1470: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_RANLIB'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1500,7 +1503,7 @@ else
# Extract the first word of "ranlib", so it can be a program name with args. # Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2 set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1504: checking for $ac_word" >&5 echo "configure:1507: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1540,7 +1543,7 @@ if test "x$ac_cv_prog_gcc" = xyes; then
STAGE1_CFLAGS="-O2" STAGE1_CFLAGS="-O2"
GRUB_CFLAGS="-O2" GRUB_CFLAGS="-O2"
echo $ac_n "checking whether optimization for size works""... $ac_c" 1>&6 echo $ac_n "checking whether optimization for size works""... $ac_c" 1>&6
echo "configure:1544: checking whether optimization for size works" >&5 echo "configure:1547: checking whether optimization for size works" >&5
if eval "test \"`echo '$''{'size_flag'+set}'`\" = set"; then if eval "test \"`echo '$''{'size_flag'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1548,14 +1551,14 @@ else
saved_CFLAGS=$CFLAGS saved_CFLAGS=$CFLAGS
CFLAGS="-Os -g" CFLAGS="-Os -g"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1552 "configure" #line 1555 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
size_flag=yes size_flag=yes
else else
@ -1590,7 +1593,7 @@ if test "x$with_binutils" != x; then
# Extract the first word of "objcopy", so it can be a program name with args. # Extract the first word of "objcopy", so it can be a program name with args.
set dummy objcopy; ac_word=$2 set dummy objcopy; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1594: checking for $ac_word" >&5 echo "configure:1597: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_OBJCOPY'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_OBJCOPY'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1626,7 +1629,7 @@ else
# Extract the first word of "${ac_tool_prefix}objcopy", so it can be a program name with args. # Extract the first word of "${ac_tool_prefix}objcopy", so it can be a program name with args.
set dummy ${ac_tool_prefix}objcopy; ac_word=$2 set dummy ${ac_tool_prefix}objcopy; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1630: checking for $ac_word" >&5 echo "configure:1633: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1660,7 +1663,7 @@ fi
# Defined in acinclude.m4. # Defined in acinclude.m4.
echo $ac_n "checking if C symbols get an underscore after compilation""... $ac_c" 1>&6 echo $ac_n "checking if C symbols get an underscore after compilation""... $ac_c" 1>&6
echo "configure:1664: checking if C symbols get an underscore after compilation" >&5 echo "configure:1667: checking if C symbols get an underscore after compilation" >&5
if eval "test \"`echo '$''{'grub_cv_asm_uscore'+set}'`\" = set"; then if eval "test \"`echo '$''{'grub_cv_asm_uscore'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1673,7 +1676,7 @@ func (int *list)
} }
EOF EOF
if { ac_try='${CC-cc} ${CFLAGS} -S conftest.c'; { (eval echo configure:1677: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.s; then if { ac_try='${CC-cc} ${CFLAGS} -S conftest.c'; { (eval echo configure:1680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.s; then
true true
else else
{ echo "configure: error: ${CC-cc} failed to produce assembly code" 1>&2; exit 1; } { echo "configure: error: ${CC-cc} failed to produce assembly code" 1>&2; exit 1; }
@ -1699,7 +1702,7 @@ fi
echo "$ac_t""$grub_cv_asm_uscore" 1>&6 echo "$ac_t""$grub_cv_asm_uscore" 1>&6
echo $ac_n "checking whether ${OBJCOPY} works for absolute addresses""... $ac_c" 1>&6 echo $ac_n "checking whether ${OBJCOPY} works for absolute addresses""... $ac_c" 1>&6
echo "configure:1703: checking whether ${OBJCOPY} works for absolute addresses" >&5 echo "configure:1706: checking whether ${OBJCOPY} works for absolute addresses" >&5
if eval "test \"`echo '$''{'grub_cv_prog_objcopy_absolute'+set}'`\" = set"; then if eval "test \"`echo '$''{'grub_cv_prog_objcopy_absolute'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1711,21 +1714,21 @@ cmain (void)
} }
EOF EOF
if { (eval echo configure:1715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then : if { (eval echo configure:1718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then :
else else
{ echo "configure: error: ${CC-cc} cannot compile C source code" 1>&2; exit 1; } { echo "configure: error: ${CC-cc} cannot compile C source code" 1>&2; exit 1; }
fi fi
grub_cv_prog_objcopy_absolute=yes grub_cv_prog_objcopy_absolute=yes
for link_addr in 2000 8000 7C00; do for link_addr in 2000 8000 7C00; do
if { ac_try='${CC-cc} ${CFLAGS} -nostdlib -Wl,-N -Wl,-Ttext -Wl,$link_addr conftest.o -o conftest.exec'; { (eval echo configure:1721: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then : if { ac_try='${CC-cc} ${CFLAGS} -nostdlib -Wl,-N -Wl,-Ttext -Wl,$link_addr conftest.o -o conftest.exec'; { (eval echo configure:1724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then :
else else
{ echo "configure: error: ${CC-cc} cannot link at address $link_addr" 1>&2; exit 1; } { echo "configure: error: ${CC-cc} cannot link at address $link_addr" 1>&2; exit 1; }
fi fi
if { ac_try='${OBJCOPY-objcopy} -O binary conftest.exec conftest'; { (eval echo configure:1725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then : if { ac_try='${OBJCOPY-objcopy} -O binary conftest.exec conftest'; { (eval echo configure:1728: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then :
else else
{ echo "configure: error: ${OBJCOPY-objcopy} cannot create binary files" 1>&2; exit 1; } { echo "configure: error: ${OBJCOPY-objcopy} cannot create binary files" 1>&2; exit 1; }
fi fi
if test ! -f conftest.old || { ac_try='cmp -s conftest.old conftest'; { (eval echo configure:1729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then if test ! -f conftest.old || { ac_try='cmp -s conftest.old conftest'; { (eval echo configure:1732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
mv -f conftest conftest.old mv -f conftest conftest.old
else else
grub_cv_prog_objcopy_absolute=no grub_cv_prog_objcopy_absolute=no
@ -1742,7 +1745,7 @@ fi
echo $ac_n "checking whether addr32 must be in the same line as the instruction""... $ac_c" 1>&6 echo $ac_n "checking whether addr32 must be in the same line as the instruction""... $ac_c" 1>&6
echo "configure:1746: checking whether addr32 must be in the same line as the instruction" >&5 echo "configure:1749: checking whether addr32 must be in the same line as the instruction" >&5
if eval "test \"`echo '$''{'grub_cv_asm_prefix_requirement'+set}'`\" = set"; then if eval "test \"`echo '$''{'grub_cv_asm_prefix_requirement'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1751,7 +1754,7 @@ else
l1: addr32 movb %al, l1 l1: addr32 movb %al, l1
EOF EOF
if { ac_try='${CC-cc} ${CFLAGS} -c conftest.s'; { (eval echo configure:1755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then if { ac_try='${CC-cc} ${CFLAGS} -c conftest.s'; { (eval echo configure:1758: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then
grub_cv_asm_prefix_requirement=yes grub_cv_asm_prefix_requirement=yes
else else
grub_cv_asm_prefix_requirement=no grub_cv_asm_prefix_requirement=no
@ -1783,7 +1786,7 @@ echo "$ac_t""$grub_cv_asm_prefix_requirement" 1>&6
echo $ac_n "checking for .code16 addr32 assembler support""... $ac_c" 1>&6 echo $ac_n "checking for .code16 addr32 assembler support""... $ac_c" 1>&6
echo "configure:1787: checking for .code16 addr32 assembler support" >&5 echo "configure:1790: checking for .code16 addr32 assembler support" >&5
if eval "test \"`echo '$''{'grub_cv_asm_addr32'+set}'`\" = set"; then if eval "test \"`echo '$''{'grub_cv_asm_addr32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1798,7 +1801,7 @@ else
sed -e s/@ADDR32@/addr32\;/ < conftest.s.in > conftest.s sed -e s/@ADDR32@/addr32\;/ < conftest.s.in > conftest.s
fi fi
if { ac_try='${CC-cc} ${CFLAGS} -c conftest.s'; { (eval echo configure:1802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then if { ac_try='${CC-cc} ${CFLAGS} -c conftest.s'; { (eval echo configure:1805: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then
grub_cv_asm_addr32=yes grub_cv_asm_addr32=yes
else else
grub_cv_asm_addr32=no grub_cv_asm_addr32=no
@ -1815,7 +1818,7 @@ fi
echo $ac_n "checking whether an absolute indirect call/jump must not be prefixed with an asterisk""... $ac_c" 1>&6 echo $ac_n "checking whether an absolute indirect call/jump must not be prefixed with an asterisk""... $ac_c" 1>&6
echo "configure:1819: checking whether an absolute indirect call/jump must not be prefixed with an asterisk" >&5 echo "configure:1822: checking whether an absolute indirect call/jump must not be prefixed with an asterisk" >&5
if eval "test \"`echo '$''{'grub_cv_asm_absolute_without_asterisk'+set}'`\" = set"; then if eval "test \"`echo '$''{'grub_cv_asm_absolute_without_asterisk'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1826,7 +1829,7 @@ offset:
.word 0 .word 0
EOF EOF
if { ac_try='${CC-cc} ${CFLAGS} -c conftest.s'; { (eval echo configure:1830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then if { ac_try='${CC-cc} ${CFLAGS} -c conftest.s'; { (eval echo configure:1833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then
grub_cv_asm_absolute_without_asterisk=no grub_cv_asm_absolute_without_asterisk=no
else else
grub_cv_asm_absolute_without_asterisk=yes grub_cv_asm_absolute_without_asterisk=yes
@ -1847,19 +1850,19 @@ echo "$ac_t""$grub_cv_asm_absolute_without_asterisk" 1>&6
echo $ac_n "checking if start is defined by the compiler""... $ac_c" 1>&6 echo $ac_n "checking if start is defined by the compiler""... $ac_c" 1>&6
echo "configure:1851: checking if start is defined by the compiler" >&5 echo "configure:1854: checking if start is defined by the compiler" >&5
if eval "test \"`echo '$''{'grub_cv_check_start_symbol'+set}'`\" = set"; then if eval "test \"`echo '$''{'grub_cv_check_start_symbol'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1856 "configure" #line 1859 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
asm ("incl start") asm ("incl start")
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
grub_cv_check_start_symbol=yes grub_cv_check_start_symbol=yes
else else
@ -1883,19 +1886,19 @@ echo "$ac_t""$grub_cv_check_start_symbol" 1>&6
echo $ac_n "checking if _start is defined by the compiler""... $ac_c" 1>&6 echo $ac_n "checking if _start is defined by the compiler""... $ac_c" 1>&6
echo "configure:1887: checking if _start is defined by the compiler" >&5 echo "configure:1890: checking if _start is defined by the compiler" >&5
if eval "test \"`echo '$''{'grub_cv_check_uscore_start_symbol'+set}'`\" = set"; then if eval "test \"`echo '$''{'grub_cv_check_uscore_start_symbol'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1892 "configure" #line 1895 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
asm ("incl _start") asm ("incl _start")
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
grub_cv_check_uscore_start_symbol=yes grub_cv_check_uscore_start_symbol=yes
else else
@ -1924,19 +1927,19 @@ fi
echo $ac_n "checking if __bss_start is defined by the compiler""... $ac_c" 1>&6 echo $ac_n "checking if __bss_start is defined by the compiler""... $ac_c" 1>&6
echo "configure:1928: checking if __bss_start is defined by the compiler" >&5 echo "configure:1931: checking if __bss_start is defined by the compiler" >&5
if eval "test \"`echo '$''{'grub_cv_check_uscore_uscore_bss_start_symbol'+set}'`\" = set"; then if eval "test \"`echo '$''{'grub_cv_check_uscore_uscore_bss_start_symbol'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1933 "configure" #line 1936 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
asm ("incl __bss_start") asm ("incl __bss_start")
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
grub_cv_check_uscore_uscore_bss_start_symbol=yes grub_cv_check_uscore_uscore_bss_start_symbol=yes
else else
@ -1960,19 +1963,19 @@ echo "$ac_t""$grub_cv_check_uscore_uscore_bss_start_symbol" 1>&6
echo $ac_n "checking if _edata is defined by the compiler""... $ac_c" 1>&6 echo $ac_n "checking if _edata is defined by the compiler""... $ac_c" 1>&6
echo "configure:1964: checking if _edata is defined by the compiler" >&5 echo "configure:1967: checking if _edata is defined by the compiler" >&5
if eval "test \"`echo '$''{'grub_cv_check_uscore_edata_symbol'+set}'`\" = set"; then if eval "test \"`echo '$''{'grub_cv_check_uscore_edata_symbol'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1969 "configure" #line 1972 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
asm ("incl _edata") asm ("incl _edata")
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
grub_cv_check_uscore_edata_symbol=yes grub_cv_check_uscore_edata_symbol=yes
else else
@ -1996,19 +1999,19 @@ echo "$ac_t""$grub_cv_check_uscore_edata_symbol" 1>&6
echo $ac_n "checking if edata is defined by the compiler""... $ac_c" 1>&6 echo $ac_n "checking if edata is defined by the compiler""... $ac_c" 1>&6
echo "configure:2000: checking if edata is defined by the compiler" >&5 echo "configure:2003: checking if edata is defined by the compiler" >&5
if eval "test \"`echo '$''{'grub_cv_check_edata_symbol'+set}'`\" = set"; then if eval "test \"`echo '$''{'grub_cv_check_edata_symbol'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2005 "configure" #line 2008 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
asm ("incl edata") asm ("incl edata")
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
grub_cv_check_edata_symbol=yes grub_cv_check_edata_symbol=yes
else else
@ -2038,19 +2041,19 @@ fi
echo $ac_n "checking if end is defined by the compiler""... $ac_c" 1>&6 echo $ac_n "checking if end is defined by the compiler""... $ac_c" 1>&6
echo "configure:2042: checking if end is defined by the compiler" >&5 echo "configure:2045: checking if end is defined by the compiler" >&5
if eval "test \"`echo '$''{'grub_cv_check_end_symbol'+set}'`\" = set"; then if eval "test \"`echo '$''{'grub_cv_check_end_symbol'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2047 "configure" #line 2050 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
asm ("incl end") asm ("incl end")
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
grub_cv_check_end_symbol=yes grub_cv_check_end_symbol=yes
else else
@ -2074,19 +2077,19 @@ echo "$ac_t""$grub_cv_check_end_symbol" 1>&6
echo $ac_n "checking if _end is defined by the compiler""... $ac_c" 1>&6 echo $ac_n "checking if _end is defined by the compiler""... $ac_c" 1>&6
echo "configure:2078: checking if _end is defined by the compiler" >&5 echo "configure:2081: checking if _end is defined by the compiler" >&5
if eval "test \"`echo '$''{'grub_cv_check_uscore_end_symbol'+set}'`\" = set"; then if eval "test \"`echo '$''{'grub_cv_check_uscore_end_symbol'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2083 "configure" #line 2086 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
asm ("incl _end") asm ("incl _end")
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
grub_cv_check_uscore_end_symbol=yes grub_cv_check_uscore_end_symbol=yes
else else
@ -2124,7 +2127,7 @@ fi
# Get the filename or the whole disk and open it. # Get the filename or the whole disk and open it.
# Known to work on NetBSD. # Known to work on NetBSD.
echo $ac_n "checking for opendisk in -lutil""... $ac_c" 1>&6 echo $ac_n "checking for opendisk in -lutil""... $ac_c" 1>&6
echo "configure:2128: checking for opendisk in -lutil" >&5 echo "configure:2131: checking for opendisk in -lutil" >&5
ac_lib_var=`echo util'_'opendisk | sed 'y%./+-%__p_%'` ac_lib_var=`echo util'_'opendisk | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -2132,7 +2135,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lutil $LIBS" LIBS="-lutil $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2136 "configure" #line 2139 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -2143,7 +2146,7 @@ int main() {
opendisk() opendisk()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -2171,7 +2174,7 @@ fi
# Unless the user specify --without-curses, check for curses. # Unless the user specify --without-curses, check for curses.
if test "x$with_curses" != "xno"; then if test "x$with_curses" != "xno"; then
echo $ac_n "checking for wgetch in -lncurses""... $ac_c" 1>&6 echo $ac_n "checking for wgetch in -lncurses""... $ac_c" 1>&6
echo "configure:2175: checking for wgetch in -lncurses" >&5 echo "configure:2178: checking for wgetch in -lncurses" >&5
ac_lib_var=`echo ncurses'_'wgetch | sed 'y%./+-%__p_%'` ac_lib_var=`echo ncurses'_'wgetch | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -2179,7 +2182,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lncurses $LIBS" LIBS="-lncurses $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2183 "configure" #line 2186 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -2190,7 +2193,7 @@ int main() {
wgetch() wgetch()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -2213,7 +2216,7 @@ EOF
else else
echo "$ac_t""no" 1>&6 echo "$ac_t""no" 1>&6
echo $ac_n "checking for wgetch in -lcurses""... $ac_c" 1>&6 echo $ac_n "checking for wgetch in -lcurses""... $ac_c" 1>&6
echo "configure:2217: checking for wgetch in -lcurses" >&5 echo "configure:2220: checking for wgetch in -lcurses" >&5
ac_lib_var=`echo curses'_'wgetch | sed 'y%./+-%__p_%'` ac_lib_var=`echo curses'_'wgetch | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -2221,7 +2224,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lcurses $LIBS" LIBS="-lcurses $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2225 "configure" #line 2228 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -2232,7 +2235,7 @@ int main() {
wgetch() wgetch()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -2267,17 +2270,17 @@ for ac_hdr in string.h strings.h ncurses/curses.h ncurses.h curses.h
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2271: checking for $ac_hdr" >&5 echo "configure:2274: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2276 "configure" #line 2279 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:2284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
@ -2734,6 +2737,16 @@ if test "x$enable_compex_rl2000_fix" = xyes; then
NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCOMPEX_RL2000_FIX=1" NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCOMPEX_RL2000_FIX=1"
fi fi
# Check whether --enable-ns8390-force-16bit or --disable-ns8390-force-16bit was given.
if test "${enable_ns8390_force_16bit+set}" = set; then
enableval="$enable_ns8390_force_16bit"
:
fi
if test "x$enable_ns8390_force_16bit" = xyes; then
NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DNS8390_FORCE_16BIT=1"
fi
# Check whether --enable-smc9000-scan or --disable-smc9000-scan was given. # Check whether --enable-smc9000-scan or --disable-smc9000-scan was given.
if test "${enable_smc9000_scan+set}" = set; then if test "${enable_smc9000_scan+set}" = set; then
enableval="$enable_smc9000_scan" enableval="$enable_smc9000_scan"

View file

@ -447,6 +447,13 @@ if test "x$enable_compex_rl2000_fix" = xyes; then
NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCOMPEX_RL2000_FIX=1" NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCOMPEX_RL2000_FIX=1"
fi fi
AC_ARG_ENABLE(ns8390-force-16bit,
[ --enable-ns8390-force-16bit
specify this if falsely 8 bit is detected])
if test "x$enable_ns8390_force_16bit" = xyes; then
NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DNS8390_FORCE_16BIT=1"
fi
AC_ARG_ENABLE(smc9000-scan, AC_ARG_ENABLE(smc9000-scan,
[ --enable-smc9000-scan=LIST [ --enable-smc9000-scan=LIST
probe for SMC9000 I/O addresses using LIST], probe for SMC9000 I/O addresses using LIST],

View file

@ -26,13 +26,14 @@ $Id$
#include "etherboot.h" #include "etherboot.h"
#include "nic.h" #include "nic.h"
#include "cards.h"
#include "3c509.h" #include "3c509.h"
static unsigned char eth_vendor, eth_flags, eth_laar; static unsigned char eth_vendor, eth_flags, eth_laar;
static unsigned short eth_nic_base, eth_asic_base; static unsigned short eth_nic_base, eth_asic_base;
static char bnc=0, utp=0; /* for 3C509 */ static char bnc=0, utp=0; /* for 3C509 */
#ifdef INCLUDE_3C529 #ifdef INCLUDE_3C529
/* /*
* This table and several other pieces of the MCA support * This table and several other pieces of the MCA support
* code were shamelessly borrowed from the Linux kernel source. * code were shamelessly borrowed from the Linux kernel source.
@ -41,10 +42,10 @@ static char bnc=0, utp=0; /* for 3C509 */
* *
*/ */
struct el3_mca_adapters_struct { struct el3_mca_adapters_struct {
char* name; const char *name;
int id; int id;
}; };
struct el3_mca_adapters_struct el3_mca_adapters[] = { static struct el3_mca_adapters_struct el3_mca_adapters[] = {
{ "3Com 3c529 EtherLink III (10base2)", 0x627c }, { "3Com 3c529 EtherLink III (10base2)", 0x627c },
{ "3Com 3c529 EtherLink III (10baseT)", 0x627d }, { "3Com 3c529 EtherLink III (10baseT)", 0x627d },
{ "3Com 3c529 EtherLink III (test mode)", 0x62db }, { "3Com 3c529 EtherLink III (test mode)", 0x62db },
@ -54,15 +55,6 @@ struct el3_mca_adapters_struct el3_mca_adapters[] = {
}; };
#endif #endif
static void safetwiddle()
{
static int count=0;
static int count2=0;
static char tiddles[]="-\\|/";
putchar(tiddles[(count2++)&0xfff?count&3:(count++)&3]);
putchar('\b');
}
/* a surrogate */ /* a surrogate */
static void DELAY(int val) static void DELAY(int val)
@ -74,15 +66,6 @@ static void DELAY(int val)
} }
} }
static void SAFEDELAY(int val)
{
int c;
for (c=0; c<val; c+=20) {
safetwiddle();
}
}
/************************************************************************** /**************************************************************************
ETH_RESET - Reset adapter ETH_RESET - Reset adapter
***************************************************************************/ ***************************************************************************/
@ -147,13 +130,12 @@ static void t509_reset(struct nic *nic)
outw(SET_INTR_MASK, BASE + EP_COMMAND); outw(SET_INTR_MASK, BASE + EP_COMMAND);
outw(SET_RX_FILTER | FIL_INDIVIDUAL | outw(SET_RX_FILTER | FIL_INDIVIDUAL | FIL_BRDCST, BASE + EP_COMMAND);
FIL_BRDCST, BASE + EP_COMMAND);
/* configure BNC */ /* configure BNC */
if (bnc) { if (bnc) {
outw(START_TRANSCEIVER, BASE + EP_COMMAND); outw(START_TRANSCEIVER, BASE + EP_COMMAND);
SAFEDELAY(10000); DELAY(10000);
} }
/* configure UTP */ /* configure UTP */
if (utp) { if (utp) {
@ -180,10 +162,10 @@ static char padmap[] = {
static void t509_transmit( static void t509_transmit(
struct nic *nic, struct nic *nic,
char *d, /* Destination */ const char *d, /* Destination */
unsigned int t, /* Type */ unsigned int t, /* Type */
unsigned int s, /* size */ unsigned int s, /* size */
char *p) /* Packet */ const char *p) /* Packet */
{ {
register unsigned int len; register unsigned int len;
int pad; int pad;
@ -192,7 +174,7 @@ char *p) /* Packet */
if(eth_vendor != VENDOR_3C509) if(eth_vendor != VENDOR_3C509)
return; return;
#ifdef EDEBUG #ifdef EDEBUG
printf("{l=%d,t=%x}",s+ETHER_HDR_SIZE,t); printf("{l=%d,t=%x}",s+ETHER_HDR_SIZE,t);
#endif #endif
@ -221,7 +203,7 @@ char *p) /* Packet */
outb(0x0, BASE + EP_W1_TX_STATUS); outb(0x0, BASE + EP_W1_TX_STATUS);
} }
while (inw(BASE + EP_W1_FREE_TX) < len + pad + 4) { while (inw(BASE + EP_W1_FREE_TX) < (unsigned short)len + pad + 4) {
/* no room in FIFO */ /* no room in FIFO */
} }
@ -259,7 +241,7 @@ static int t509_poll(struct nic *nic)
cst=inw(BASE + EP_STATUS); cst=inw(BASE + EP_STATUS);
#ifdef EDEBUG #ifdef EDEBUG
if(cst & 0x1FFF) if(cst & 0x1FFF)
printf("-%x-",cst); printf("-%x-",cst);
#endif #endif
@ -273,7 +255,7 @@ static int t509_poll(struct nic *nic)
} }
status = inw(BASE + EP_W1_RX_STATUS); status = inw(BASE + EP_W1_RX_STATUS);
#ifdef EDEBUG #ifdef EDEBUG
printf("*%x*",status); printf("*%x*",status);
#endif #endif
@ -287,7 +269,7 @@ static int t509_poll(struct nic *nic)
return 0; return 0;
/* read packet */ /* read packet */
#ifdef EDEBUG #ifdef EDEBUG
printf("[l=%d",rx_fifo); printf("[l=%d",rx_fifo);
#endif #endif
insw(BASE + EP_W1_RX_PIO_RD_1, nic->packet, rx_fifo / 2); insw(BASE + EP_W1_RX_PIO_RD_1, nic->packet, rx_fifo / 2);
@ -297,7 +279,7 @@ static int t509_poll(struct nic *nic)
while(1) { while(1) {
status = inw(BASE + EP_W1_RX_STATUS); status = inw(BASE + EP_W1_RX_STATUS);
#ifdef EDEBUG #ifdef EDEBUG
printf("*%x*",status); printf("*%x*",status);
#endif #endif
rx_fifo = status & RX_BYTES_MASK; rx_fifo = status & RX_BYTES_MASK;
@ -307,13 +289,13 @@ static int t509_poll(struct nic *nic)
if(rx_fifo & 1) if(rx_fifo & 1)
nic->packet[nic->packetlen+rx_fifo-1]=inb(BASE + EP_W1_RX_PIO_RD_1); nic->packet[nic->packetlen+rx_fifo-1]=inb(BASE + EP_W1_RX_PIO_RD_1);
nic->packetlen+=rx_fifo; nic->packetlen+=rx_fifo;
#ifdef EDEBUG #ifdef EDEBUG
printf("+%d",rx_fifo); printf("+%d",rx_fifo);
#endif #endif
} }
if(( status & RX_INCOMPLETE )==0) { if(( status & RX_INCOMPLETE )==0) {
#ifdef EDEBUG #ifdef EDEBUG
printf("=%d",nic->packetlen); printf("=%d",nic->packetlen);
#endif #endif
break; break;
@ -325,7 +307,7 @@ static int t509_poll(struct nic *nic)
/* acknowledge reception of packet */ /* acknowledge reception of packet */
outw(RX_DISCARD_TOP_PACK, BASE + EP_COMMAND); outw(RX_DISCARD_TOP_PACK, BASE + EP_COMMAND);
while (inw(BASE + EP_STATUS) & S_COMMAND_IN_PROGRESS); while (inw(BASE + EP_STATUS) & S_COMMAND_IN_PROGRESS);
#ifdef EDEBUG #ifdef EDEBUG
type = (nic->packet[12]<<8) | nic->packet[13]; type = (nic->packet[12]<<8) | nic->packet[13];
if(nic->packet[0]+nic->packet[1]+nic->packet[2]+nic->packet[3]+nic->packet[4]+ if(nic->packet[0]+nic->packet[1]+nic->packet[2]+nic->packet[3]+nic->packet[4]+
nic->packet[5] == 0xFF*ETHER_ADDR_SIZE) nic->packet[5] == 0xFF*ETHER_ADDR_SIZE)
@ -342,14 +324,14 @@ static int t509_poll(struct nic *nic)
**************************************************************************/ **************************************************************************/
static int static int
eeprom_rdy() eeprom_rdy(void)
{ {
int i; int i;
for (i = 0; is_eeprom_busy(IS_BASE) && i < MAX_EEPROMBUSY; i++); for (i = 0; is_eeprom_busy(IS_BASE) && i < MAX_EEPROMBUSY; i++);
if (i >= MAX_EEPROMBUSY) { if (i >= MAX_EEPROMBUSY) {
/* printf("3c509: eeprom failed to come ready.\n"); */ /* printf("3c509: eeprom failed to come ready.\n"); */
printf("3c509: eeprom is busy.\n"); /* memory in EPROM is tight */ printf("3c509: eeprom busy.\n"); /* memory in EPROM is tight */
return (0); return (0);
} }
return (1); return (1);
@ -360,8 +342,7 @@ eeprom_rdy()
* before * before
*/ */
static int static int
get_e(offset) get_e(int offset)
int offset;
{ {
if (!eeprom_rdy()) if (!eeprom_rdy())
return (0xffff); return (0xffff);
@ -372,8 +353,7 @@ int offset;
} }
static int static int
send_ID_sequence(port) send_ID_sequence(int port)
int port;
{ {
int cx, al; int cx, al;
@ -400,9 +380,7 @@ int port;
* read 16 times getting one bit of data with each read. * read 16 times getting one bit of data with each read.
*/ */
static int static int
get_eeprom_data(id_port, offset) get_eeprom_data(int id_port, int offset)
int id_port;
int offset;
{ {
int i, data = 0; int i, data = 0;
outb(0x80 + offset, id_port); outb(0x80 + offset, id_port);
@ -430,7 +408,7 @@ struct nic *t509_probe(struct nic *nic, unsigned short *probe_addrs)
int i; int i;
int failcount; int failcount;
#ifdef INCLUDE_3C529 #ifdef INCLUDE_3C529
struct el3_mca_adapters_struct *mcafound = NULL; struct el3_mca_adapters_struct *mcafound = NULL;
int mca_pos4 = 0, mca_pos5 = 0, mca_irq = 0; int mca_pos4 = 0, mca_pos5 = 0, mca_irq = 0;
#endif #endif
@ -443,7 +421,7 @@ struct nic *t509_probe(struct nic *nic, unsigned short *probe_addrs)
unsigned short k; unsigned short k;
int ep_current_tag = EP_LAST_TAG + 1; int ep_current_tag = EP_LAST_TAG + 1;
short *p; short *p;
#ifdef INCLUDE_3C529 #ifdef INCLUDE_3C529
int curboard; int curboard;
#endif #endif
@ -454,9 +432,9 @@ struct nic *t509_probe(struct nic *nic, unsigned short *probe_addrs)
/********************************************************* /*********************************************************
Search for 3Com 509 card Search for 3Com 509 card
***********************************************************/ ***********************************************************/
#ifdef INCLUDE_3C529 #ifdef INCLUDE_3C529
/* /*
* XXX: We should really check to make sure we have an MCA * XXX: We should really check to make sure we have an MCA
* bus controller before going ahead with this... * bus controller before going ahead with this...
* *
* For now, we avoid any hassle by making it a compile * For now, we avoid any hassle by making it a compile
@ -496,7 +474,7 @@ struct nic *t509_probe(struct nic *nic, unsigned short *probe_addrs)
donewithdetect: donewithdetect:
/* Kill all setup modes */ /* Kill all setup modes */
outb_p(0, MCA_ADAPTER_SETUP_REG); outb_p(0, MCA_ADAPTER_SETUP_REG);
if (mcafound) { if (mcafound) {
eth_vendor = VENDOR_3C509; eth_vendor = VENDOR_3C509;
@ -520,13 +498,13 @@ struct nic *t509_probe(struct nic *nic, unsigned short *probe_addrs)
/* Reset and Enable the card */ /* Reset and Enable the card */
outb(W0_P4_CMD_RESET_ADAPTER, io_base + EP_W0_CONFIG_CTRL); outb(W0_P4_CMD_RESET_ADAPTER, io_base + EP_W0_CONFIG_CTRL);
SAFEDELAY(10000); /* we must wait at least 10 ms */ DELAY(10000); /* we must wait at least 10 ms */
outb(W0_P4_CMD_ENABLE_ADAPTER, io_base + EP_W0_CONFIG_CTRL); outb(W0_P4_CMD_ENABLE_ADAPTER, io_base + EP_W0_CONFIG_CTRL);
/* /*
* Once activated, all the registers are mapped in the range * Once activated, all the registers are mapped in the range
* x000 - x00F, where x is the slot number. * x000 - x00F, where x is the slot number.
*/ */
eth_nic_base = j * EP_EISA_START; eth_nic_base = j * EP_EISA_START;
eth_vendor = VENDOR_3C509; eth_vendor = VENDOR_3C509;
} }
@ -535,7 +513,7 @@ struct nic *t509_probe(struct nic *nic, unsigned short *probe_addrs)
/* Look for the ISA boards. Init and leave them actived */ /* Look for the ISA boards. Init and leave them actived */
/* search for the first card, ignore all others */ /* search for the first card, ignore all others */
outb(0xc0, id_port); /* Global reset */ outb(0xc0, id_port); /* Global reset */
SAFEDELAY(10000); DELAY(10000);
for (i = 0; i < EP_MAX_BOARDS && eth_vendor==VENDOR_NONE; i++) { for (i = 0; i < EP_MAX_BOARDS && eth_vendor==VENDOR_NONE; i++) {
outb(0, id_port); outb(0, id_port);
outb(0, id_port); outb(0, id_port);
@ -566,7 +544,7 @@ struct nic *t509_probe(struct nic *nic, unsigned short *probe_addrs)
*/ */
GO_WINDOW(0); GO_WINDOW(0);
k = get_e(EEPROM_PROD_ID); k = get_e(EEPROM_PROD_ID);
#ifdef INCLUDE_3C529 #ifdef INCLUDE_3C529
/* /*
* On MCA, the PROD_ID matches the MCA card ID (POS0+POS1) * On MCA, the PROD_ID matches the MCA card ID (POS0+POS1)
*/ */
@ -577,16 +555,16 @@ struct nic *t509_probe(struct nic *nic, unsigned short *probe_addrs)
} }
} else { /* for ISA/EISA */ } else { /* for ISA/EISA */
if ((k & 0xf0ff) != (PROD_ID & 0xf0ff)) if ((k & 0xf0ff) != (PROD_ID & 0xf0ff))
goto no3c509; goto no3c509;
} }
#else #else
if ((k & 0xf0ff) != (PROD_ID & 0xf0ff)) if ((k & 0xf0ff) != (PROD_ID & 0xf0ff))
goto no3c509; goto no3c509;
#endif #endif
#ifdef INCLUDE_3C529 #ifdef INCLUDE_3C529
if (mcafound) { if (mcafound) {
printf("%s board found on MCA at 0x%x IRQ %d -", printf("%s board found on MCA at 0x%x IRQ %d -",
mcafound->name, eth_nic_base, mca_irq); mcafound->name, eth_nic_base, mca_irq);
} else { } else {
#endif #endif
@ -595,7 +573,7 @@ struct nic *t509_probe(struct nic *nic, unsigned short *probe_addrs)
} else { } else {
printf("3C5x9 board on ISA at 0x%x - ",eth_nic_base); printf("3C5x9 board on ISA at 0x%x - ",eth_nic_base);
} }
#ifdef INCLUDE_3C529 #ifdef INCLUDE_3C529
} }
#endif #endif

View file

@ -38,33 +38,33 @@
* Some global constants * Some global constants
*/ */
#define TX_INIT_RATE 16 #define TX_INIT_RATE 16
#define TX_INIT_MAX_RATE 64 #define TX_INIT_MAX_RATE 64
#define RX_INIT_LATENCY 64 #define RX_INIT_LATENCY 64
#define RX_INIT_EARLY_THRESH 64 #define RX_INIT_EARLY_THRESH 64
#define MIN_RX_EARLY_THRESHF 16 /* not less than ether_header */ #define MIN_RX_EARLY_THRESHF 16 /* not less than ether_header */
#define MIN_RX_EARLY_THRESHL 4 #define MIN_RX_EARLY_THRESHL 4
#define EEPROMSIZE 0x40 #define EEPROMSIZE 0x40
#define MAX_EEPROMBUSY 1000 #define MAX_EEPROMBUSY 1000
#define EP_LAST_TAG 0xd7 #define EP_LAST_TAG 0xd7
#define EP_MAX_BOARDS 16 #define EP_MAX_BOARDS 16
#define EP_ID_PORT 0x100 #define EP_ID_PORT 0x100
/* /*
* some macros to acces long named fields * some macros to acces long named fields
*/ */
#define IS_BASE (eth_nic_base) #define IS_BASE (eth_nic_base)
#define BASE (eth_nic_base) #define BASE (eth_nic_base)
/* /*
* Commands to read/write EEPROM trough EEPROM command register (Window 0, * Commands to read/write EEPROM trough EEPROM command register (Window 0,
* Offset 0xa) * Offset 0xa)
*/ */
#define EEPROM_CMD_RD 0x0080 /* Read: Address required (5 bits) */ #define EEPROM_CMD_RD 0x0080 /* Read: Address required (5 bits) */
#define EEPROM_CMD_WR 0x0040 /* Write: Address required (5 bits) */ #define EEPROM_CMD_WR 0x0040 /* Write: Address required (5 bits) */
#define EEPROM_CMD_ERASE 0x00c0 /* Erase: Address required (5 bits) */ #define EEPROM_CMD_ERASE 0x00c0 /* Erase: Address required (5 bits) */
#define EEPROM_CMD_EWEN 0x0030 /* Erase/Write Enable: No data required */ #define EEPROM_CMD_EWEN 0x0030 /* Erase/Write Enable: No data required */
#define EEPROM_BUSY (1<<15) #define EEPROM_BUSY (1<<15)
#define EEPROM_TST_MODE (1<<14) #define EEPROM_TST_MODE (1<<14)
@ -73,10 +73,10 @@
* Some short functions, worth to let them be a macro * Some short functions, worth to let them be a macro
*/ */
#define is_eeprom_busy(b) (inw((b)+EP_W0_EEPROM_COMMAND)&EEPROM_BUSY) #define is_eeprom_busy(b) (inw((b)+EP_W0_EEPROM_COMMAND)&EEPROM_BUSY)
#define GO_WINDOW(x) outw(WINDOW_SELECT|(x), BASE+EP_COMMAND) #define GO_WINDOW(x) outw(WINDOW_SELECT|(x), BASE+EP_COMMAND)
/************************************************************************** /**************************************************************************
* * *
* These define the EEPROM data structure. They are used in the probe * These define the EEPROM data structure. They are used in the probe
* function to verify the existance of the adapter after having sent * function to verify the existance of the adapter after having sent
* the ID_Sequence. * the ID_Sequence.
@ -94,12 +94,12 @@
#define EEPROM_RESOURCE_CFG 0x9 /* IRQ. Bits 12-15 */ #define EEPROM_RESOURCE_CFG 0x9 /* IRQ. Bits 12-15 */
/************************************************************************** /**************************************************************************
* * *
* These are the registers for the 3Com 3c509 and their bit patterns when * * These are the registers for the 3Com 3c509 and their bit patterns when
* applicable. They have been taken out the the "EtherLink III Parallel * * applicable. They have been taken out the the "EtherLink III Parallel
* Tasking EISA and ISA Technical Reference" "Beta Draft 10/30/92" manual * * Tasking EISA and ISA Technical Reference" "Beta Draft 10/30/92" manual
* from 3com. * * from 3com.
* * *
**************************************************************************/ **************************************************************************/
#define EP_COMMAND 0x0e /* Write. BASE+0x0e is always a #define EP_COMMAND 0x0e /* Write. BASE+0x0e is always a
@ -276,7 +276,7 @@
#define S_RX_EARLY (unsigned short) (0x20) #define S_RX_EARLY (unsigned short) (0x20)
#define S_INT_RQD (unsigned short) (0x40) #define S_INT_RQD (unsigned short) (0x40)
#define S_UPD_STATS (unsigned short) (0x80) #define S_UPD_STATS (unsigned short) (0x80)
#define S_5_INTS (S_CARD_FAILURE|S_TX_COMPLETE|\ #define S_5_INTS (S_CARD_FAILURE|S_TX_COMPLETE|\
S_TX_AVAIL|S_RX_COMPLETE|S_RX_EARLY) S_TX_AVAIL|S_RX_COMPLETE|S_RX_EARLY)
#define S_COMMAND_IN_PROGRESS (unsigned short) (0x1000) #define S_COMMAND_IN_PROGRESS (unsigned short) (0x1000)
@ -297,14 +297,14 @@
* *
* 10-0: RX Bytes (0-1514) * 10-0: RX Bytes (0-1514)
*/ */
#define ERR_RX_INCOMPLETE (unsigned short) (0x1<<15) #define ERR_RX_INCOMPLETE (unsigned short) (0x1<<15)
#define ERR_RX (unsigned short) (0x1<<14) #define ERR_RX (unsigned short) (0x1<<14)
#define ERR_RX_OVERRUN (unsigned short) (0x8<<11) #define ERR_RX_OVERRUN (unsigned short) (0x8<<11)
#define ERR_RX_RUN_PKT (unsigned short) (0xb<<11) #define ERR_RX_RUN_PKT (unsigned short) (0xb<<11)
#define ERR_RX_ALIGN (unsigned short) (0xc<<11) #define ERR_RX_ALIGN (unsigned short) (0xc<<11)
#define ERR_RX_CRC (unsigned short) (0xd<<11) #define ERR_RX_CRC (unsigned short) (0xd<<11)
#define ERR_RX_OVERSIZE (unsigned short) (0x9<<11) #define ERR_RX_OVERSIZE (unsigned short) (0x9<<11)
#define ERR_RX_DRIBBLE (unsigned short) (0x2<<11) #define ERR_RX_DRIBBLE (unsigned short) (0x2<<11)
/* /*
* FIFO Registers. * FIFO Registers.
@ -336,13 +336,13 @@
* Window 0/Port 04 * Window 0/Port 04
*/ */
/* Read */ /* Read */
#define IS_AUI (1<<13) #define IS_AUI (1<<13)
#define IS_BNC (1<<12) #define IS_BNC (1<<12)
#define IS_UTP (1<<9) #define IS_UTP (1<<9)
/* Write */ /* Write */
#define ENABLE_DRQ_IRQ 0x0001 #define ENABLE_DRQ_IRQ 0x0001
#define W0_P4_CMD_RESET_ADAPTER 0x4 #define W0_P4_CMD_RESET_ADAPTER 0x4
#define W0_P4_CMD_ENABLE_ADAPTER 0x1 #define W0_P4_CMD_ENABLE_ADAPTER 0x1
/* /*
* Media type and status. * Media type and status.
* Window 4/Port 0A * Window 4/Port 0A
@ -368,26 +368,26 @@
/* /*
* Misc defines for various things. * Misc defines for various things.
*/ */
#define ACTIVATE_ADAPTER_TO_CONFIG 0xff /* to the id_port */ #define ACTIVATE_ADAPTER_TO_CONFIG 0xff /* to the id_port */
#define MFG_ID 0x6d50 /* in EEPROM and W0 ADDR_CONFIG */ #define MFG_ID 0x6d50 /* in EEPROM and W0 ADDR_CONFIG */
#define PROD_ID 0x9150 #define PROD_ID 0x9150
#define AUI 0x1 #define AUI 0x1
#define BNC 0x2 #define BNC 0x2
#define UTP 0x4 #define UTP 0x4
#define RX_BYTES_MASK (unsigned short) (0x07ff) #define RX_BYTES_MASK (unsigned short) (0x07ff)
/* EISA support */ /* EISA support */
#define EP_EISA_START 0x1000 #define EP_EISA_START 0x1000
#define EP_EISA_W0 0x0c80 #define EP_EISA_W0 0x0c80
#ifdef INCLUDE_3C529 #ifdef INCLUDE_3C529
/* MCA support */ /* MCA support */
#define MCA_MOTHERBOARD_SETUP_REG 0x94 #define MCA_MOTHERBOARD_SETUP_REG 0x94
#define MCA_ADAPTER_SETUP_REG 0x96 #define MCA_ADAPTER_SETUP_REG 0x96
#define MCA_MAX_SLOT_NR 8 #define MCA_MAX_SLOT_NR 8
#define MCA_POS_REG(n) (0x100+(n)) #define MCA_POS_REG(n) (0x100+(n))
#endif #endif
/* /*

View file

@ -84,6 +84,7 @@ Lance PCI PCNet/32
Linksys LNE100TX and other NICs using this Tulip clone chip Linksys LNE100TX and other NICs using this Tulip clone chip
Netgear FA310TX and other NICs using this Tulip clone chip Netgear FA310TX and other NICs using this Tulip clone chip
Tulip clones based on the ADMtek Centaur-P
Tulip clones based on the Macronix 987x5 Tulip clones based on the Macronix 987x5
Tulip-Fast Tulip-Fast
Tulip+ Tulip+
@ -109,6 +110,11 @@ NetVin 5000SC
If you have a Compex RL2000 PCI 32-bit (11F6:1401), and the probe If you have a Compex RL2000 PCI 32-bit (11F6:1401), and the probe
hangs in "Probing...[NE*000/PCI]", try enabling this fix... it hangs in "Probing...[NE*000/PCI]", try enabling this fix... it
worked for me :). worked for me :).
--enable-ns8390-force-16bit
It seems that forcing 16 bit bus width for NEPCI causes
Etherboot/GRUB to fail on the RTL8029. Therefore
--enable-ns8390-force-16bit should only be turned on for those NEPCI
NICs that falsely detect 8 bit bus width when it should be 16.
Racal-Interlan NI5210 Racal-Interlan NI5210
--enable-ni5210 --enable-ni5210

View file

@ -55,6 +55,11 @@ extern struct nic *t529_probe(struct nic *, unsigned short *
PCI_ARG(struct pci_device *)); PCI_ARG(struct pci_device *));
#endif #endif
#ifdef INCLUDE_3C595
extern struct nic *t595_probe(struct nic *, unsigned short *
PCI_ARG(struct pci_device *));
#endif
#ifdef INCLUDE_3C90X #ifdef INCLUDE_3C90X
extern struct nic *a3c90x_probe(struct nic *, unsigned short * extern struct nic *a3c90x_probe(struct nic *, unsigned short *
PCI_ARG(struct pci_device *)); PCI_ARG(struct pci_device *));

View file

@ -17,7 +17,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* Based on "src/config.c" in etherboot-4.5.8. */ /* Based on "src/config.c" in etherboot-4.6.4. */
/* /*
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
@ -30,7 +30,7 @@
#include "nic.h" #include "nic.h"
#undef INCLUDE_PCI #undef INCLUDE_PCI
#if defined(INCLUDE_NS8390) || defined(INCLUDE_EEPRO100) || defined(INCLUDE_LANCE) || defined(INCLUDE_EPIC100) || defined(INCLUDE_TULIP) || defined(INCLUDE_OTULIP) || defined(INCLUDE_3C90X) || defined(INCLUDE_RTL8139) || defined(INCLUDE_VIA_RHINE) #if defined(INCLUDE_NS8390) || defined(INCLUDE_EEPRO100) || defined(INCLUDE_LANCE) || defined(INCLUDE_EPIC100) || defined(INCLUDE_TULIP) || defined(INCLUDE_OTULIP) || defined(INCLUDE_3C90X) || defined(INCLUDE_3C595) || defined(INCLUDE_RTL8139) || defined(INCLUDE_VIA_RHINE)
/* || others later */ /* || others later */
#if defined(ETHERBOOT32) /* only for 32 bit machines */ #if defined(ETHERBOOT32) /* only for 32 bit machines */
#define INCLUDE_PCI #define INCLUDE_PCI
@ -78,6 +78,16 @@ static struct pci_device pci_nic_list[] = {
"3Com905C-TXM", 0, 0, 0}, "3Com905C-TXM", 0, 0, 0},
#endif #endif
#ifdef INCLUDE_3C595
{ PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C590,
"3Com590", 0, 0, 0},
{ PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C595,
"3Com595", 0, 0, 0},
{ PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C595_1,
"3Com595", 0, 0, 0},
{ PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C595_2,
"3Com595", 0, 0, 0},
#endif
#ifdef INCLUDE_EEPRO100 #ifdef INCLUDE_EEPRO100
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82557, { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82557,
"Intel EtherExpressPro100", 0, 0, 0}, "Intel EtherExpressPro100", 0, 0, 0},
@ -123,6 +133,8 @@ static struct pci_device pci_nic_list[] = {
"Netgear FA310TX", 0, 0, 0}, "Netgear FA310TX", 0, 0, 0},
{ PCI_VENDOR_ID_DAVICOM, PCI_DEVICE_ID_DM9102, { PCI_VENDOR_ID_DAVICOM, PCI_DEVICE_ID_DM9102,
"Davicom 9102", 0, 0, 0}, "Davicom 9102", 0, 0, 0},
{ PCI_VENDOR_ID_ADMTEK, PCI_DEVICE_ID_ADMTEK_0985,
"ADMtek Centaur-P", 0, 0, 0},
#endif #endif
#ifdef INCLUDE_VIA_RHINE #ifdef INCLUDE_VIA_RHINE
{ PCI_VENDOR_ID_VIATEC, PCI_DEVICE_ID_VIA_RHINE_I, { PCI_VENDOR_ID_VIATEC, PCI_DEVICE_ID_VIA_RHINE_I,
@ -176,6 +188,9 @@ static struct dispatch_table NIC[] =
#ifdef INCLUDE_3C529 #ifdef INCLUDE_3C529
{ "3C5x9", t529_probe, 0 }, { "3C5x9", t529_probe, 0 },
#endif #endif
#ifdef INCLUDE_3C595
{ "3C595", t595_probe, pci_ioaddrs },
#endif
#ifdef INCLUDE_3C90X #ifdef INCLUDE_3C90X
{ "3C90X", a3c90x_probe, pci_ioaddrs }, { "3C90X", a3c90x_probe, pci_ioaddrs },
#endif #endif

View file

@ -10,8 +10,8 @@
#undef virt_to_bus #undef virt_to_bus
#define virt_to_bus(x) ((unsigned long)x) #define virt_to_bus(x) ((unsigned long)x)
#define TX_RING_SIZE 2 /* use at least 2 buffers for TX */ #define TX_RING_SIZE 2 /* use at least 2 buffers for TX */
#define RX_RING_SIZE 2 #define RX_RING_SIZE 2
#define PKT_BUF_SZ 1536 /* Size of each temporary Tx/Rx buffer.*/ #define PKT_BUF_SZ 1536 /* Size of each temporary Tx/Rx buffer.*/

View file

@ -17,7 +17,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* Based on "src/main.c" in etherboot-4.5.8. */ /* Based on "src/main.c" in etherboot-4.6.4. */
/************************************************************************** /**************************************************************************
ETHERBOOT - BOOTP/TFTP Bootstrap Program ETHERBOOT - BOOTP/TFTP Bootstrap Program
@ -77,8 +77,9 @@ static char rfc1533_end[] = {RFC1533_END};
static const char dhcpdiscover[] = static const char dhcpdiscover[] =
{ {
RFC2132_MSG_TYPE, 1, DHCPDISCOVER, RFC2132_MSG_TYPE, 1, DHCPDISCOVER,
RFC2132_MAX_SIZE, 2, 2, 64, RFC2132_MAX_SIZE,2, /* request as much as we can */
sizeof(struct bootpd_t) / 256, sizeof(struct bootpd_t) % 256,
RFC2132_PARAM_LIST, 4, RFC1533_NETMASK, RFC1533_GATEWAY, RFC2132_PARAM_LIST, 4, RFC1533_NETMASK, RFC1533_GATEWAY,
RFC1533_HOSTNAME, RFC1533_EXTENSIONPATH RFC1533_HOSTNAME, RFC1533_EXTENSIONPATH
}; };
@ -88,7 +89,8 @@ static const char dhcprequest[] =
RFC2132_MSG_TYPE, 1, DHCPREQUEST, RFC2132_MSG_TYPE, 1, DHCPREQUEST,
RFC2132_SRV_ID, 4, 0, 0, 0, 0, RFC2132_SRV_ID, 4, 0, 0, 0, 0,
RFC2132_REQ_ADDR, 4, 0, 0, 0, 0, RFC2132_REQ_ADDR, 4, 0, 0, 0, 0,
RFC2132_MAX_SIZE, 2, 2, 64, RFC2132_MAX_SIZE,2, /* request as much as we can */
sizeof(struct bootpd_t) / 256, sizeof(struct bootpd_t) % 256,
/* request parameters */ /* request parameters */
RFC2132_PARAM_LIST, RFC2132_PARAM_LIST,
#ifdef GRUB #ifdef GRUB
@ -585,7 +587,7 @@ bootp (void)
* lost immediately. Not very clever. */ * lost immediately. Not very clever. */
await_reply (AWAIT_QDRAIN, 0, NULL, 0); await_reply (AWAIT_QDRAIN, 0, NULL, 0);
udp_transmit (IP_BROADCAST, 0, BOOTP_SERVER, udp_transmit (IP_BROADCAST, BOOTP_CLIENT, BOOTP_SERVER,
sizeof (struct bootp_t), &bp); sizeof (struct bootp_t), &bp);
#ifdef T509HACK #ifdef T509HACK
if (flag) if (flag)

View file

@ -879,7 +879,7 @@ struct nic *eth_probe(struct nic *nic, unsigned short *probe_addrs)
outb(D8390_DCR_FT1 | D8390_DCR_LS, eth_nic_base + D8390_P0_DCR); outb(D8390_DCR_FT1 | D8390_DCR_LS, eth_nic_base + D8390_P0_DCR);
outb(MEM_8192, eth_nic_base + D8390_P0_PSTART); outb(MEM_8192, eth_nic_base + D8390_P0_PSTART);
outb(MEM_16384, eth_nic_base + D8390_P0_PSTOP); outb(MEM_16384, eth_nic_base + D8390_P0_PSTOP);
#ifdef INCLUDE_NS8390 #ifdef NS8390_FORCE_16BIT
eth_flags |= FLAG_16BIT; /* force 16-bit mode */ eth_flags |= FLAG_16BIT; /* force 16-bit mode */
#endif #endif

View file

@ -94,6 +94,8 @@ __asm__ __volatile__("pushfl ; popl %0":"=g" (x): /* no input */ :"memory")
#define restore_flags(x) \ #define restore_flags(x) \
__asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory") __asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory")
#define PCI_VENDOR_ID_ADMTEK 0x1317
#define PCI_DEVICE_ID_ADMTEK_0985 0x0985
#define PCI_VENDOR_ID_REALTEK 0x10ec #define PCI_VENDOR_ID_REALTEK 0x10ec
#define PCI_DEVICE_ID_REALTEK_8029 0x8029 #define PCI_DEVICE_ID_REALTEK_8029 0x8029
#define PCI_DEVICE_ID_REALTEK_8139 0x8139 #define PCI_DEVICE_ID_REALTEK_8139 0x8139
@ -106,6 +108,10 @@ __asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory")
#define PCI_VENDOR_ID_NETVIN 0x4a14 #define PCI_VENDOR_ID_NETVIN 0x4a14
#define PCI_DEVICE_ID_NETVIN_NV5000SC 0x5000 #define PCI_DEVICE_ID_NETVIN_NV5000SC 0x5000
#define PCI_VENDOR_ID_3COM 0x10b7 #define PCI_VENDOR_ID_3COM 0x10b7
#define PCI_DEVICE_ID_3COM_3C590 0x5900
#define PCI_DEVICE_ID_3COM_3C595 0x5950
#define PCI_DEVICE_ID_3COM_3C595_1 0x5951
#define PCI_DEVICE_ID_3COM_3C595_2 0x5952
#define PCI_DEVICE_ID_3COM_3C900TPO 0x9000 #define PCI_DEVICE_ID_3COM_3C900TPO 0x9000
#define PCI_DEVICE_ID_3COM_3C900COMBO 0x9001 #define PCI_DEVICE_ID_3COM_3C900COMBO 0x9001
#define PCI_DEVICE_ID_3COM_3C905TX 0x9050 #define PCI_DEVICE_ID_3COM_3C905TX 0x9050
@ -134,8 +140,8 @@ __asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory")
#define PCI_VENDOR_ID_VIATEC 0x1106 #define PCI_VENDOR_ID_VIATEC 0x1106
#define PCI_DEVICE_ID_VIA_RHINE_I 0x3043 #define PCI_DEVICE_ID_VIA_RHINE_I 0x3043
#define PCI_DEVICE_ID_VIA_86C100A 0x6100 #define PCI_DEVICE_ID_VIA_86C100A 0x6100
#define PCI_VENDOR_ID_DAVICOM 0x1282 #define PCI_VENDOR_ID_DAVICOM 0x1282
#define PCI_DEVICE_ID_DM9102 0x9102 #define PCI_DEVICE_ID_DM9102 0x9102
struct pci_device { struct pci_device {
unsigned short vendor, dev_id; unsigned short vendor, dev_id;

View file

@ -16,8 +16,8 @@
* network device driver which uses this chip * network device driver which uses this chip
* *
* $Log$ * $Log$
* Revision 1.2 2000-04-22 01:17:09 okuji * Revision 1.3 2000-07-29 19:22:54 okuji
* update the network support to etherboot-4.5.8. * update the network support to etherboot-4.6.4.
* *
-*/ -*/

View file

@ -40,6 +40,14 @@
/*********************************************************************/ /*********************************************************************/
/* /*
16 Jul 2000 mdc 0.75b11
Added support for ADMtek 0985 Centaur-P, a "Comet" tulip clone
which is used on the LinkSYS LNE100TX v4.x cards. We already
support LNE100TX v2.0 cards, which use a different controller.
04 Jul 2000 jam ?
Added test of status after receiving a packet from the card.
Also uncommented the tulip_disable routine. Stray packets
seemed to be causing problems.
27 Apr 2000 njl ? 27 Apr 2000 njl ?
29 Feb 2000 mdc 0.75b7 29 Feb 2000 mdc 0.75b7
Increased reset delay to 3 seconds because Macronix cards seem to Increased reset delay to 3 seconds because Macronix cards seem to
@ -409,6 +417,7 @@ static void tulip_init_ring(struct nic *nic)
static void tulip_reset(struct nic *nic) static void tulip_reset(struct nic *nic)
{ {
unsigned long to, csr6; unsigned long to, csr6;
u32 addr_low, addr_high;
whereami("tulip_reset\n"); whereami("tulip_reset\n");
@ -443,6 +452,10 @@ static void tulip_reset(struct nic *nic)
} else if (vendor == PCI_VENDOR_ID_DEC && dev_id == PCI_DEVICE_ID_DEC_21142) { } else if (vendor == PCI_VENDOR_ID_DEC && dev_id == PCI_DEVICE_ID_DEC_21142) {
/* nothing */ /* nothing */
} else if (vendor == PCI_VENDOR_ID_ADMTEK && dev_id == PCI_DEVICE_ID_ADMTEK_0985) {
/* nothing */
} else { } else {
/* If we don't know what to do with the card, set to 10Mbps half-duplex */ /* If we don't know what to do with the card, set to 10Mbps half-duplex */
@ -468,6 +481,18 @@ static void tulip_reset(struct nic *nic)
/* set up transmit and receive descriptors */ /* set up transmit and receive descriptors */
tulip_init_ring(nic); tulip_init_ring(nic);
/* set up multicast hash address for Comet (ADKTEK 0985) */
/* possibly not needed for Etherboot, but seems to do no harm -mdc */
if (vendor == PCI_VENDOR_ID_ADMTEK && dev_id == PCI_DEVICE_ID_ADMTEK_0985) {
addr_low = nic->node_addr[0] + (nic->node_addr[1] << 8)
+ (nic->node_addr[2] << 16) + (nic->node_addr[3] << 24);
addr_high = nic->node_addr[4] + (nic->node_addr[5] << 8);
outl(addr_low, ioaddr + 0xA4);
outl(addr_high, ioaddr + 0xA8);
outl(0, ioaddr + 0xAC);
outl(0, ioaddr + 0xB0);
}
/* Point to receive descriptor */ /* Point to receive descriptor */
outl((unsigned long)&rxd[0], ioaddr + CSR3); outl((unsigned long)&rxd[0], ioaddr + CSR3);
outl((unsigned long)&txd , ioaddr + CSR4); outl((unsigned long)&txd , ioaddr + CSR4);
@ -513,6 +538,10 @@ static void tulip_reset(struct nic *nic)
outl(0x180, ioaddr + CSR12); /* Let bit 7 output port */ outl(0x180, ioaddr + CSR12); /* Let bit 7 output port */
outl(0x80, ioaddr + CSR12); /* RESET DM9102 phyxcer */ outl(0x80, ioaddr + CSR12); /* RESET DM9102 phyxcer */
outl(0x0, ioaddr + CSR12); /* Clear RESET signal */ outl(0x0, ioaddr + CSR12); /* Clear RESET signal */
} else if (vendor == PCI_VENDOR_ID_ADMTEK && dev_id == PCI_DEVICE_ID_ADMTEK_0985) {
/* nothing */
} }
/* set the chip's operating mode */ /* set the chip's operating mode */
@ -604,6 +633,13 @@ static int tulip_poll(struct nic *nic)
nic->packetlen = (rxd[rxd_tail].status & 0x3FFF0000) >> 16; nic->packetlen = (rxd[rxd_tail].status & 0x3FFF0000) >> 16;
if( rxd[rxd_tail].status & 0x00008000){
rxd[rxd_tail].status = 0x80000000;
rxd_tail++;
if (rxd_tail == NRXD) rxd_tail = 0;
return 0;
}
/* copy packet to working buffer */ /* copy packet to working buffer */
/* XXX - this copy could be avoided with a little more work /* XXX - this copy could be avoided with a little more work
but for now we are content with it because the optimised but for now we are content with it because the optimised
@ -626,9 +662,6 @@ static void tulip_disable(struct nic *nic)
{ {
whereami("tulip_disable\n"); whereami("tulip_disable\n");
/* The other Etherboot drivers don't seem to do anything here,
so for now, we will not either */
#if 0
/* disable interrupts */ /* disable interrupts */
outl(0x00000000, ioaddr + CSR7); outl(0x00000000, ioaddr + CSR7);
@ -637,7 +670,6 @@ static void tulip_disable(struct nic *nic)
/* Clear the missed-packet counter. */ /* Clear the missed-packet counter. */
(volatile unsigned long)inl(ioaddr + CSR8); (volatile unsigned long)inl(ioaddr + CSR8);
#endif
} }
/*********************************************************************/ /*********************************************************************/
@ -647,6 +679,7 @@ struct nic *tulip_probe(struct nic *nic, unsigned short *io_addrs,
struct pci_device *pci) struct pci_device *pci)
{ {
unsigned int i; unsigned int i;
u32 l1, l2;
whereami("tulip_probe\n"); whereami("tulip_probe\n");
@ -679,6 +712,16 @@ struct nic *tulip_probe(struct nic *nic, unsigned short *io_addrs,
nic->node_addr[i*2] = (u8)((value >> 8) & 0xFF); nic->node_addr[i*2] = (u8)((value >> 8) & 0xFF);
nic->node_addr[i*2 + 1] = (u8)( value & 0xFF); nic->node_addr[i*2 + 1] = (u8)( value & 0xFF);
} }
} else if (vendor == PCI_VENDOR_ID_ADMTEK &&
dev_id == PCI_DEVICE_ID_ADMTEK_0985) {
l1 = inl(ioaddr + 0xA4);
l2 = inl(ioaddr + 0xA8);
nic->node_addr[0] = (l1 ) & 0xFF;
nic->node_addr[1] = (l1 >> 8) & 0xFF;
nic->node_addr[2] = (l1 >> 16) & 0xFF;
nic->node_addr[3] = (l1 >> 24) & 0xFF;
nic->node_addr[4] = (l2 ) & 0xFF;
nic->node_addr[5] = (l2 >> 8) & 0xFF;
} else { } else {
/* read EEPROM data */ /* read EEPROM data */
for (i = 0; i < sizeof(ee_data)/2; i++) for (i = 0; i < sizeof(ee_data)/2; i++)