1 |
786 |
skrzyp |
//==========================================================================
|
2 |
|
|
//
|
3 |
|
|
// redboot_linux_boot.h
|
4 |
|
|
//
|
5 |
|
|
// RedBoot interfaces with Linux kernel
|
6 |
|
|
//
|
7 |
|
|
//==========================================================================
|
8 |
|
|
// ####ECOSGPLCOPYRIGHTBEGIN####
|
9 |
|
|
// -------------------------------------------
|
10 |
|
|
// This file is part of eCos, the Embedded Configurable Operating System.
|
11 |
|
|
// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
12 |
|
|
//
|
13 |
|
|
// eCos is free software; you can redistribute it and/or modify it under
|
14 |
|
|
// the terms of the GNU General Public License as published by the Free
|
15 |
|
|
// Software Foundation; either version 2 or (at your option) any later
|
16 |
|
|
// version.
|
17 |
|
|
//
|
18 |
|
|
// eCos is distributed in the hope that it will be useful, but WITHOUT
|
19 |
|
|
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
20 |
|
|
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
21 |
|
|
// for more details.
|
22 |
|
|
//
|
23 |
|
|
// You should have received a copy of the GNU General Public License
|
24 |
|
|
// along with eCos; if not, write to the Free Software Foundation, Inc.,
|
25 |
|
|
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
26 |
|
|
//
|
27 |
|
|
// As a special exception, if other files instantiate templates or use
|
28 |
|
|
// macros or inline functions from this file, or you compile this file
|
29 |
|
|
// and link it with other works to produce a work based on this file,
|
30 |
|
|
// this file does not by itself cause the resulting work to be covered by
|
31 |
|
|
// the GNU General Public License. However the source code for this file
|
32 |
|
|
// must still be made available in accordance with section (3) of the GNU
|
33 |
|
|
// General Public License v2.
|
34 |
|
|
//
|
35 |
|
|
// This exception does not invalidate any other reasons why a work based
|
36 |
|
|
// on this file might be covered by the GNU General Public License.
|
37 |
|
|
// -------------------------------------------
|
38 |
|
|
// ####ECOSGPLCOPYRIGHTEND####
|
39 |
|
|
//####OTHERCOPYRIGHTBEGIN####
|
40 |
|
|
//
|
41 |
|
|
// The structure definitions below are taken from include/asm-/redboot.h in
|
42 |
|
|
// the Linux kernel, Copyright (c) 2002, 2003 Gary Thomas, Copyright (c) 1997 Dan Malek.
|
43 |
|
|
// Their presence here is for the express purpose of communication with the Linux
|
44 |
|
|
// kernel being booted and is considered 'fair use' by the original author and
|
45 |
|
|
// are included with their permission.
|
46 |
|
|
//
|
47 |
|
|
//####OTHERCOPYRIGHTEND####
|
48 |
|
|
//==========================================================================
|
49 |
|
|
//#####DESCRIPTIONBEGIN####
|
50 |
|
|
//
|
51 |
|
|
// Author(s): gthomas
|
52 |
|
|
// Contributors:
|
53 |
|
|
// Date: 2003-08-28
|
54 |
|
|
// Purpose:
|
55 |
|
|
// Description:
|
56 |
|
|
//
|
57 |
|
|
// This code is part of RedBoot (tm).
|
58 |
|
|
//
|
59 |
|
|
//####DESCRIPTIONEND####
|
60 |
|
|
//
|
61 |
|
|
//==========================================================================
|
62 |
|
|
|
63 |
|
|
//=========================================================================
|
64 |
|
|
// Imported from Linux kernel include/asm-ppc/redboot.h
|
65 |
|
|
// Copyright (c) 2002, 2003 Gary Thomas (<gary@mlbassoc.com>
|
66 |
|
|
// Copyright (c) 1997 Dan Malek (dmalek@jlc.net)
|
67 |
|
|
// Used with permission of author(s).
|
68 |
|
|
|
69 |
|
|
|
70 |
|
|
/* A Board Information structure that is given to a program when
|
71 |
|
|
* RedBoot starts it up. Note: not all fields make sense for all
|
72 |
|
|
* architectures and it's up to the platform specific code to fill
|
73 |
|
|
* in the details.
|
74 |
|
|
*/
|
75 |
|
|
typedef struct bd_info {
|
76 |
|
|
unsigned int bi_tag; /* Should be 0x42444944 "BDID" */
|
77 |
|
|
unsigned int bi_size; /* Size of this structure */
|
78 |
|
|
unsigned int bi_revision; /* revision of this structure */
|
79 |
|
|
unsigned int bi_bdate; /* bootstrap date, i.e. 0x11061997 */
|
80 |
|
|
unsigned int bi_memstart; /* Memory start address */
|
81 |
|
|
unsigned int bi_memsize; /* Memory (end) size in bytes */
|
82 |
|
|
unsigned int bi_intfreq; /* Internal Freq, in Hz */
|
83 |
|
|
unsigned int bi_busfreq; /* Bus Freq, in Hz */
|
84 |
|
|
unsigned int bi_cpmfreq; /* CPM Freq, in Hz */
|
85 |
|
|
unsigned int bi_brgfreq; /* BRG Freq, in Hz */
|
86 |
|
|
unsigned int bi_vco; /* VCO Out from PLL */
|
87 |
|
|
unsigned int bi_pci_freq; /* PCI Freq, in Hz */
|
88 |
|
|
unsigned int bi_baudrate; /* Default console baud rate */
|
89 |
|
|
unsigned int bi_immr; /* IMMR when called from boot rom */
|
90 |
|
|
unsigned char bi_enetaddr[6];
|
91 |
|
|
unsigned int bi_flashbase; /* Physical address of FLASH memory */
|
92 |
|
|
unsigned int bi_flashsize; /* Length of FLASH memory */
|
93 |
|
|
int bi_flashwidth; /* Width (8,16,32,64) */
|
94 |
|
|
unsigned char *bi_cmdline; /* Pointer to command line */
|
95 |
|
|
} bd_t;
|
96 |
|
|
|
97 |
|
|
externC void plf_redboot_linux_exec(bd_t *info);
|
98 |
|
|
|