diff -ru etherboot-4.4.1/src/3c509.c etherboot-4.4.1.mca/src/3c509.c --- etherboot-4.4.1/src/3c509.c Thu Dec 9 14:18:42 1999 +++ etherboot-4.4.1.mca/src/3c509.c Sun Jan 16 22:26:43 2000 @@ -32,6 +32,28 @@ static unsigned short eth_nic_base, eth_asic_base; static char bnc=0, utp=0; /* for 3C509 */ +#ifdef MCA +/* + * This table and several other pieces of the MCA support + * code were shamelessly borrowed from the Linux kernel source. + * + * MCA support added by Adam Fritzler (mid@auk.cx) + * + */ +struct el3_mca_adapters_struct { + char* name; + int id; +}; +struct el3_mca_adapters_struct el3_mca_adapters[] = { + { "3Com 3c529 EtherLink III (10base2)", 0x627c }, + { "3Com 3c529 EtherLink III (10baseT)", 0x627d }, + { "3Com 3c529 EtherLink III (test mode)", 0x62db }, + { "3Com 3c529 EtherLink III (TP or coax)", 0x62f6 }, + { "3Com 3c529 EtherLink III (TP)", 0x62f7 }, + { NULL, 0 }, +}; +#endif + static void safetwiddle() { static int count=0; @@ -404,6 +426,11 @@ int i; int failcount; +#ifdef MCA + struct el3_mca_adapters_struct *mcafound = NULL; + int mca_pos4 = 0, mca_pos5 = 0, mca_irq = 0; +#endif + t509_disable(nic); /* in case board was active */ /* note that nic is not used */ @@ -412,6 +439,9 @@ unsigned short k; int ep_current_tag = EP_LAST_TAG + 1; short *p; +#ifdef MCA + int curboard; +#endif id_port = EP_ID_PORT; ep_current_tag = EP_LAST_TAG + 1; @@ -420,7 +450,59 @@ /********************************************************* Search for 3Com 509 card ***********************************************************/ +#ifdef MCA + /* + * XXX: We should really check to make sure we have an MCA + * bus controller before going ahead with this... + * + * For now, we avoid any hassle by making it a compile + * time option. + * + */ + printf("\nWarning: Assuming presence of MCA bus\n"); + + /* Make sure motherboard setup is off */ + outb_p(0xff, MCA_MOTHERBOARD_SETUP_REG); + + /* Cycle through slots */ + for(curboard=0; curboardid != k) { + printf("MCA: PROD_ID in EEPROM does not match MCA card ID! (%x != %x)\n", k, mcafound->id); + goto no3c509; + } + } else { /* for ISA/EISA */ + if ((k & 0xf0ff) != (PROD_ID & 0xf0ff)) + goto no3c509; + } +#else if ((k & 0xf0ff) != (PROD_ID & 0xf0ff)) goto no3c509; +#endif - if(eth_nic_base >= EP_EISA_START) { - printf("3C5x9 board on EISA at 0x%x - ",eth_nic_base); +#ifdef MCA + if (mcafound) { + printf("%s board found on MCA at 0x%x IRQ %d -", + mcafound->name, eth_nic_base, mca_irq); } else { - printf("3C5x9 board on ISA at 0x%x - ",eth_nic_base); +#endif + if(eth_nic_base >= EP_EISA_START) { + printf("3C5x9 board on EISA at 0x%x - ",eth_nic_base); + } else { + printf("3C5x9 board on ISA at 0x%x - ",eth_nic_base); + } +#ifdef MCA } +#endif /* test for presence of connectors */ i = inw(IS_BASE + EP_W0_CONFIG_CTRL); diff -ru etherboot-4.4.1/src/3c509.h etherboot-4.4.1.mca/src/3c509.h --- etherboot-4.4.1/src/3c509.h Tue Dec 7 09:10:06 1999 +++ etherboot-4.4.1.mca/src/3c509.h Sun Jan 16 22:21:38 2000 @@ -381,6 +381,15 @@ /* EISA support */ #define EP_EISA_START 0x1000 #define EP_EISA_W0 0x0c80 + +#ifdef MCA + /* MCA support */ +#define MCA_MOTHERBOARD_SETUP_REG 0x94 +#define MCA_ADAPTER_SETUP_REG 0x96 +#define MCA_MAX_SLOT_NR 8 +#define MCA_POS_REG(n) (0x100+(n)) +#endif + /* * Local variables: * c-basic-offset: 8 diff -ru etherboot-4.4.1/src/Config.16 etherboot-4.4.1.mca/src/Config.16 --- etherboot-4.4.1/src/Config.16 Wed Jan 12 16:36:46 2000 +++ etherboot-4.4.1.mca/src/Config.16 Sun Jan 16 22:44:31 2000 @@ -40,6 +40,7 @@ # reply to the first. Makes a 3c509 do bootp # quicker # -DT503_AUI - Use AUI by default on 3c503 cards. +# -DMCA - Probe for MCA cards # -DCONGESTED - turns on packet retransmission. Use it on a # congested network, where the normal operation # can't boot the image. diff -ru etherboot-4.4.1/src/Config.32 etherboot-4.4.1.mca/src/Config.32 --- etherboot-4.4.1/src/Config.32 Fri Jan 14 14:20:57 2000 +++ etherboot-4.4.1.mca/src/Config.32 Sun Jan 16 22:44:01 2000 @@ -40,6 +40,7 @@ # reply to the first. Makes a 3c509 do bootp # quicker # -DT503_AUI - Use AUI by default on 3c503 cards. +# -DMCA - Probe for MCA cards # -DCONGESTED - turns on packet retransmission. Use it on a # congested network, where the normal operation # can't boot the image. @@ -87,7 +88,7 @@ # These default settings compile Etherboot with a small number of options. # You may wish to enable more of the features if the size of your ROM allows. -CFLAGS+= -DMOTD -DIMAGE_MENU +CFLAGS+= -DNO_DHCP_SUPPORT -DMOTD -DIMAGE_MENU # Enable for FreeBSD boot image support # CFLAGS+= -DAOUT_IMAGE -DELF_IMAGE