aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hysdn/hysdn_pof.h
blob: 3a72b908900f2e65812b8711a0910a51b7577c70 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/* $Id: hysdn_pof.h,v 1.2.6.1 2001/09/23 22:24:54 kai Exp $
 *
 * Linux driver for HYSDN cards, definitions used for handling pof-files.
 *
 * Author    Werner Cornelius (werner@titro.de) for Hypercope GmbH
 * Copyright 1999 by Werner Cornelius (werner@titro.de)
 *
 * This software may be used and distributed according to the terms
 * of the GNU General Public License, incorporated herein by reference.
 *
 */

/************************/
/* POF specific defines */
/************************/
#define BOOT_BUF_SIZE   0x1000	/* =4096, maybe moved to other h file */
#define CRYPT_FEEDTERM  0x8142
#define CRYPT_STARTTERM 0x81a5
				    /*  max. timeout time in seconds
				     *  from end of booting to POF is ready
				     */
#define POF_READY_TIME_OUT_SEC  10

/**********************************/
/* defines for 1.stage boot image */
/**********************************/

/*  the POF file record containing the boot loader image
 *  has 2 pages a 16KB:
 *  1. page contains the high 16-bit part of the 32-bit E1 words
 *  2. page contains the low  16-bit part of the 32-bit E1 words
 *
 *  In each 16KB page we assume the start of the boot loader code
 *  in the highest 2KB part (at offset 0x3800);
 *  the rest (0x0000..0x37FF) is assumed to contain 0 bytes.
 */

#define POF_BOOT_LOADER_PAGE_SIZE   0x4000	/* =16384U */
#define POF_BOOT_LOADER_TOTAL_SIZE  (2U*POF_BOOT_LOADER_PAGE_SIZE)

#define POF_BOOT_LOADER_CODE_SIZE   0x0800	/* =2KB =2048U */

		    /* offset in boot page, where loader code may start */
					    /* =0x3800= 14336U */
#define POF_BOOT_LOADER_OFF_IN_PAGE (POF_BOOT_LOADER_PAGE_SIZE-POF_BOOT_LOADER_CODE_SIZE)


/*--------------------------------------POF file record structs------------*/
typedef struct PofFileHdr_tag {	/* Pof file header */
/*00 */ unsigned long Magic __attribute__((packed));
/*04 */ unsigned long N_PofRecs __attribute__((packed));
/*08 */
} tPofFileHdr;

typedef struct PofRecHdr_tag {	/* Pof record header */
/*00 */ unsigned short PofRecId __attribute__((packed));
/*02 */ unsigned long PofRecDataLen __attribute__((packed));
/*06 */
} tPofRecHdr;

typedef struct PofTimeStamp_tag {
/*00 */ unsigned long UnixTime __attribute__((packed));
	/*04 */ unsigned char DateTimeText[0x28];
	/* =40 */
/*2C */
} tPofTimeStamp;

				    /* tPofFileHdr.Magic value: */
#define TAGFILEMAGIC 0x464F501AUL
				    /* tPofRecHdr.PofRecId values: */
#define TAG_ABSDATA  0x1000	/* abs. data */
#define TAG_BOOTDTA  0x1001	/* boot data */
#define TAG_COMMENT  0x0020
#define TAG_SYSCALL  0x0021
#define TAG_FLOWCTRL 0x0022
#define TAG_TIMESTMP 0x0010	/* date/time stamp of version */
#define TAG_CABSDATA 0x1100	/* crypted abs. data */
#define TAG_CBOOTDTA 0x1101	/* crypted boot data */
9' href='#n419'>419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731


























































































































































































































































































































































































































































































































































































































































































































































                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
ÿØÿà