OpenCores
URL https://opencores.org/ocsvn/amber/amber/trunk

Subversion Repositories amber

[/] [amber/] [trunk/] [sw/] [boot-loader-ethmac/] [tftp.h] - Blame information for rev 80

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 80 csantifort
/*----------------------------------------------------------------
2
//                                                              //
3
//  boot-loader.h                                               //
4
//                                                              //
5
//  This file is part of the Amber project                      //
6
//  http://www.opencores.org/project,amber                      //
7
//                                                              //
8
//  Description                                                 //
9
//  Defines for the boot-loader application.                    //
10
//                                                              //
11
//  Author(s):                                                  //
12
//      - Conor Santifort, csantifort.amber@gmail.com           //
13
//                                                              //
14
//////////////////////////////////////////////////////////////////
15
//                                                              //
16
// Copyright (C) 2010 Authors and OPENCORES.ORG                 //
17
//                                                              //
18
// This source file may be used and distributed without         //
19
// restriction provided that this copyright statement is not    //
20
// removed from the file and that any derivative work contains  //
21
// the original copyright notice and the associated disclaimer. //
22
//                                                              //
23
// This source file is free software; you can redistribute it   //
24
// and/or modify it under the terms of the GNU Lesser General   //
25
// Public License as published by the Free Software Foundation; //
26
// either version 2.1 of the License, or (at your option) any   //
27
// later version.                                               //
28
//                                                              //
29
// This source is distributed in the hope that it will be       //
30
// useful, but WITHOUT ANY WARRANTY; without even the implied   //
31
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      //
32
// PURPOSE.  See the GNU Lesser General Public License for more //
33
// details.                                                     //
34
//                                                              //
35
// You should have received a copy of the GNU Lesser General    //
36
// Public License along with this source; if not, download it   //
37
// from http://www.opencores.org/lgpl.shtml                     //
38
//                                                              //
39
----------------------------------------------------------------*/
40
#define LINUX_JUMP_ADR  0x00080000
41
 
42
 
43
typedef struct {
44
    char *          buf512;
45
    void *          next;
46
    unsigned int    bytes;
47
    unsigned int    last_block;
48
    unsigned int    total_bytes;
49
    unsigned int    total_blocks;
50
    unsigned int    ready;
51
    unsigned int    linux_boot;
52
    char*           filename;
53
} block_t;
54
 
55
 
56
/* Global variables */
57
extern time_t*  reboot_timer_g;
58
extern int      reboot_stage_g;
59
 
60
/* Function prototypes */
61
void        process_tftp ();
62
void        init_tftp ();
63
block_t*    init_buffer_512 ();
64
int         process_file ();
65
void        reboot ();
66
void        parse_tftp_packet(char*, packet_t*, int, unsigned int, unsigned int);
67
 
68
 
69
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.