/* $Id: hysdn_pof.h,v 1.2.6.1 2001/09/23 22:24:54 kai Exp $1*2* Linux driver for HYSDN cards, definitions used for handling pof-files.3*4* Author Werner Cornelius ([email protected]) for Hypercope GmbH5* Copyright 1999 by Werner Cornelius ([email protected])6*7* This software may be used and distributed according to the terms8* of the GNU General Public License, incorporated herein by reference.9*10*/1112/************************/13/* POF specific defines */14/************************/15#define BOOT_BUF_SIZE 0x1000 /* =4096, maybe moved to other h file */16#define CRYPT_FEEDTERM 0x814217#define CRYPT_STARTTERM 0x81a518/* max. timeout time in seconds19* from end of booting to POF is ready20*/21#define POF_READY_TIME_OUT_SEC 102223/**********************************/24/* defines for 1.stage boot image */25/**********************************/2627/* the POF file record containing the boot loader image28* has 2 pages a 16KB:29* 1. page contains the high 16-bit part of the 32-bit E1 words30* 2. page contains the low 16-bit part of the 32-bit E1 words31*32* In each 16KB page we assume the start of the boot loader code33* in the highest 2KB part (at offset 0x3800);34* the rest (0x0000..0x37FF) is assumed to contain 0 bytes.35*/3637#define POF_BOOT_LOADER_PAGE_SIZE 0x4000 /* =16384U */38#define POF_BOOT_LOADER_TOTAL_SIZE (2U*POF_BOOT_LOADER_PAGE_SIZE)3940#define POF_BOOT_LOADER_CODE_SIZE 0x0800 /* =2KB =2048U */4142/* offset in boot page, where loader code may start */43/* =0x3800= 14336U */44#define POF_BOOT_LOADER_OFF_IN_PAGE (POF_BOOT_LOADER_PAGE_SIZE-POF_BOOT_LOADER_CODE_SIZE)454647/*--------------------------------------POF file record structs------------*/48typedef struct PofFileHdr_tag { /* Pof file header */49/*00 */ unsigned long Magic __attribute__((packed));50/*04 */ unsigned long N_PofRecs __attribute__((packed));51/*08 */52} tPofFileHdr;5354typedef struct PofRecHdr_tag { /* Pof record header */55/*00 */ unsigned short PofRecId __attribute__((packed));56/*02 */ unsigned long PofRecDataLen __attribute__((packed));57/*06 */58} tPofRecHdr;5960typedef struct PofTimeStamp_tag {61/*00 */ unsigned long UnixTime __attribute__((packed));62/*04 */ unsigned char DateTimeText[0x28];63/* =40 */64/*2C */65} tPofTimeStamp;6667/* tPofFileHdr.Magic value: */68#define TAGFILEMAGIC 0x464F501AUL69/* tPofRecHdr.PofRecId values: */70#define TAG_ABSDATA 0x1000 /* abs. data */71#define TAG_BOOTDTA 0x1001 /* boot data */72#define TAG_COMMENT 0x002073#define TAG_SYSCALL 0x002174#define TAG_FLOWCTRL 0x002275#define TAG_TIMESTMP 0x0010 /* date/time stamp of version */76#define TAG_CABSDATA 0x1100 /* crypted abs. data */77#define TAG_CBOOTDTA 0x1101 /* crypted boot data */787980