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