1 /***************************************************************************** 2 * sdlasfm.h WANPIPE(tm) Multiprotocol WAN Link Driver. 3 * Definitions for the SDLA Firmware Module (SFM). 4 * 5 * Author: Gideon Hack 6 * 7 * Copyright: (c) 1995-1999 Sangoma Technologies Inc. 8 * 9 * This program is free software; you can redistribute it and/or 10 * modify it under the terms of the GNU General Public License 11 * as published by the Free Software Foundation; either version 12 * 2 of the License, or (at your option) any later version. 13 * ============================================================================ 14 * Jun 02, 1999 Gideon Hack Added support for the S514 adapter. 15 * Dec 11, 1996 Gene Kozin Cosmetic changes 16 * Apr 16, 1996 Gene Kozin Changed adapter & firmware IDs. Version 2 17 * Dec 15, 1995 Gene Kozin Structures chaned 18 * Nov 09, 1995 Gene Kozin Initial version. 19 *****************************************************************************/ 20 #ifndef _SDLASFM_H 21 #define _SDLASFM_H 22 23 /****** Defines *************************************************************/ 24 25 #define SFM_VERSION 2 26 #define SFM_SIGNATURE "SFM - Sangoma SDLA Firmware Module" 27 28 /* min/max */ 29 #define SFM_IMAGE_SIZE 0x8000 /* max size of SDLA code image file */ 30 #define SFM_DESCR_LEN 256 /* max length of description string */ 31 #define SFM_MAX_SDLA 16 /* max number of compatible adapters */ 32 33 /* Adapter types */ 34 #define SDLA_S502A 5020 35 #define SDLA_S502E 5021 36 #define SDLA_S503 5030 37 #define SDLA_S508 5080 38 #define SDLA_S507 5070 39 #define SDLA_S509 5090 40 #define SDLA_S514 5140 41 42 /* S514 PCI adapter CPU numbers */ 43 #define S514_CPU_A 'A' 44 #define S514_CPU_B 'B' 45 46 47 /* Firmware identification numbers: 48 * 0 .. 999 Test & Diagnostics 49 * 1000 .. 1999 Streaming HDLC 50 * 2000 .. 2999 Bisync 51 * 3000 .. 3999 SDLC 52 * 4000 .. 4999 HDLC 53 * 5000 .. 5999 X.25 54 * 6000 .. 6999 Frame Relay 55 * 7000 .. 7999 PPP 56 * 8000 .. 8999 Cisco HDLC 57 */ 58 #define SFID_CALIB502 200 59 #define SFID_STRM502 1200 60 #define SFID_STRM508 1800 61 #define SFID_BSC502 2200 62 #define SFID_SDLC502 3200 63 #define SFID_HDLC502 4200 64 #define SFID_HDLC508 4800 65 #define SFID_X25_502 5200 66 #define SFID_X25_508 5800 67 #define SFID_FR502 6200 68 #define SFID_FR508 6800 69 #define SFID_PPP502 7200 70 #define SFID_PPP508 7800 71 #define SFID_PPP514 7140 72 #define SFID_CHDLC508 8800 73 #define SFID_CHDLC514 8140 74 75 /****** Data Types **********************************************************/ 76 77 typedef struct sfm_info /* firmware module information */ 78 { 79 unsigned short codeid; /* firmware ID */ 80 unsigned short version; /* firmaware version number */ 81 unsigned short adapter[SFM_MAX_SDLA]; /* compatible adapter types */ 82 unsigned long memsize; /* minimum memory size */ 83 unsigned short reserved[2]; /* reserved */ 84 unsigned short startoffs; /* entry point offset */ 85 unsigned short winoffs; /* dual-port memory window offset */ 86 unsigned short codeoffs; /* code load offset */ 87 unsigned short codesize; /* code size */ 88 unsigned short dataoffs; /* configuration data load offset */ 89 unsigned short datasize; /* configuration data size */ 90 } sfm_info_t; 91 92 typedef struct sfm /* SDLA firmware file structire */ 93 { 94 char signature[80]; /* SFM file signature */ 95 unsigned short version; /* file format version */ 96 unsigned short checksum; /* info + image */ 97 unsigned short reserved[6]; /* reserved */ 98 char descr[SFM_DESCR_LEN]; /* description string */ 99 sfm_info_t info; /* firmware module info */ 100 unsigned char image[1]; /* code image (variable size) */ 101 } sfm_t; 102 103 #endif /* _SDLASFM_H */ 104 105