From 00ed485bc4c42638c9c15d0d4f2f51c27c6e0dfb Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Sat, 31 Dec 1994 17:16:50 +0000 Subject: [PATCH] Really provide support for 3COM cards now. Submitted by: wpaul --- sys/i386/boot/netboot/Makefile | 6 +++--- sys/i386/boot/netboot/ether.c | 8 ++++++++ sys/i386/boot/netboot/ether.h | 4 ++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/sys/i386/boot/netboot/Makefile b/sys/i386/boot/netboot/Makefile index bce4acf3b719..403840329359 100644 --- a/sys/i386/boot/netboot/Makefile +++ b/sys/i386/boot/netboot/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.2 1994/10/28 22:13:22 phk Exp $ +# $Id: Makefile,v 1.3 1994/11/17 12:16:01 jkh Exp $ # # Makefile for NETBOOT # @@ -23,8 +23,8 @@ SRCS= start2.S main.c misc.c ether.c bootmenu.c rpc.c BINDIR= /usr/mdec BINMODE= 555 CFLAGS= -O2 -DNFS -DROMSIZE=${ROMSIZE} -DRELOC=${RELOCADDR} -#CFLAGS+= -DINCLUDE_WD -DWD_DEFAULT_MEM=0xD0000 -#CFLAGS+= -DINCLUDE_NE -DNE_BASE=0x320 +CFLAGS+= -DINCLUDE_WD -DWD_DEFAULT_MEM=0xD0000 +CFLAGS+= -DINCLUDE_NE -DNE_BASE=0x320 CFLAGS+= -DINCLUDE_3COM -D_3COM_BASE=0x300 CLEANFILES+= netboot.com.nohdr netboot.com.strip CLEANFILES+= netboot.rom.nohdr netboot.rom.strip netboot.rom diff --git a/sys/i386/boot/netboot/ether.c b/sys/i386/boot/netboot/ether.c index f61123d20844..a5cbd2e19181 100644 --- a/sys/i386/boot/netboot/ether.c +++ b/sys/i386/boot/netboot/ether.c @@ -15,6 +15,7 @@ Author: Martin Renters responsibility for damages incurred with its use. 3c503 support added by Bill Paul (wpaul@ctr.columbia.edu) on 11/15/94 +SMC8416 support added by Bill Paul (wpaul@ctr.columbia.edu) on 12/25/94 **************************************************************************/ @@ -87,6 +88,13 @@ eth_probe() ((inb(eth_asic_base + WD_MSR) & 0x3F) << 13)); } else eth_bmem = (char *)WD_DEFAULT_MEM; + if (brd->id == TYPE_SMC8216T || brd->id == TYPE_SMC8216C) { + (unsigned int) *(eth_bmem + 8192) = (unsigned int)0; + if ((unsigned int) *(eth_bmem + 8192)) { + brd += 2; + eth_memsize = brd->memsize; + } + } outb(eth_asic_base + WD_MSR, 0x80); /* Reset */ printf("\r\n%s base 0x%x, memory 0x%X, addr ", brd->name, eth_asic_base, eth_bmem); diff --git a/sys/i386/boot/netboot/ether.h b/sys/i386/boot/netboot/ether.h index e4996c2619ab..70a9378c19fa 100644 --- a/sys/i386/boot/netboot/ether.h +++ b/sys/i386/boot/netboot/ether.h @@ -72,6 +72,8 @@ Western Digital/SMC Board Types #define TYPE_WD8013EPC 0x29 #define TYPE_SMC8216T 0x2a #define TYPE_SMC8216C 0x2b +#define TYPE_SMC8416T 0x00 /* Bogus entries: the 8416 generates the */ +#define TYPE_SMC8416C 0x00 /* the same codes as the 8216. */ #define TYPE_SMC8013EBP 0x2c #ifdef INCLUDE_WD @@ -93,6 +95,8 @@ struct wd_board { {"WD8013EPC", TYPE_WD8013EPC, FLAG_16BIT, MEM_16384}, {"SMC8216T", TYPE_SMC8216T, FLAG_16BIT | FLAG_790, MEM_16384}, {"SMC8216C", TYPE_SMC8216C, FLAG_16BIT | FLAG_790, MEM_16384}, + {"SMC8416T", TYPE_SMC8416T, FLAG_16BIT | FLAG_790, MEM_8192}, + {"SMC8416C/BT", TYPE_SMC8416C, FLAG_16BIT | FLAG_790, MEM_8192}, {"SMC8013EBP", TYPE_SMC8013EBP,FLAG_16BIT, MEM_16384}, {NULL, 0, 0} };