xref: /openbmc/linux/arch/powerpc/boot/redboot.h (revision b2441318)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
2b09c1644SScott Wood #ifndef _PPC_REDBOOT_H
3b09c1644SScott Wood #define _PPC_REDBOOT_H
4b09c1644SScott Wood 
5b09c1644SScott Wood //=========================================================================
6b09c1644SScott Wood // include/asm-ppc/redboot.h
7b09c1644SScott Wood //   Copyright (c) 2002, 2003 Gary Thomas (<gary@mlbassoc.com>
8b09c1644SScott Wood //   Copyright (c) 1997 Dan Malek (dmalek@jlc.net)
9b09c1644SScott Wood 
10b09c1644SScott Wood //
11b09c1644SScott Wood // Board specific details, as provided by RedBoot
12b09c1644SScott Wood //
13b09c1644SScott Wood 
14b09c1644SScott Wood /* A Board Information structure that is given to a program when
15b09c1644SScott Wood  * RedBoot starts it up.  Note: not all fields make sense for all
16b09c1644SScott Wood  * architectures and it's up to the platform specific code to fill
17b09c1644SScott Wood  * in the details.
18b09c1644SScott Wood  */
19b09c1644SScott Wood typedef struct bd_info {
20b09c1644SScott Wood     unsigned int   bi_tag;        /* Should be 0x42444944 "BDID" */
21b09c1644SScott Wood     unsigned int   bi_size;       /* Size of this structure */
22b09c1644SScott Wood     unsigned int   bi_revision;   /* revision of this structure */
23b09c1644SScott Wood     unsigned int   bi_bdate;      /* bootstrap date, i.e. 0x19971106 */
24b09c1644SScott Wood     unsigned int   bi_memstart;   /* Memory start address */
25b09c1644SScott Wood     unsigned int   bi_memsize;    /* Memory (end) size in bytes */
26b09c1644SScott Wood     unsigned int   bi_intfreq;    /* Internal Freq, in Hz */
27b09c1644SScott Wood     unsigned int   bi_busfreq;    /* Bus Freq, in Hz */
28b09c1644SScott Wood     unsigned int   bi_cpmfreq;    /* CPM Freq, in Hz */
29b09c1644SScott Wood     unsigned int   bi_brgfreq;    /* BRG Freq, in Hz */
30b09c1644SScott Wood     unsigned int   bi_vco;        /* VCO Out from PLL */
31b09c1644SScott Wood     unsigned int   bi_pci_freq;   /* PCI Freq, in Hz */
32b09c1644SScott Wood     unsigned int   bi_baudrate;   /* Default console baud rate */
33b09c1644SScott Wood     unsigned int   bi_immr;       /* IMMR when called from boot rom */
34b09c1644SScott Wood     unsigned char  bi_enetaddr[6];
35b09c1644SScott Wood     unsigned int   bi_flashbase;  /* Physical address of FLASH memory */
36b09c1644SScott Wood     unsigned int   bi_flashsize;  /* Length of FLASH memory */
37b09c1644SScott Wood     int            bi_flashwidth; /* Width (8,16,32,64) */
38b09c1644SScott Wood     unsigned char *bi_cmdline;    /* Pointer to command line */
39b09c1644SScott Wood     unsigned char  bi_esa[3][6];  /* Ethernet station addresses */
40b09c1644SScott Wood     unsigned int   bi_ramdisk_begin, bi_ramdisk_end;
41b09c1644SScott Wood     struct {                      /* Information about [main] video screen */
42b09c1644SScott Wood         short x_res;              /*   Horizontal resolution in pixels */
43b09c1644SScott Wood         short y_res;              /*   Vertical resolution in pixels */
44b09c1644SScott Wood         short bpp;                /*   Bits/pixel */
45b09c1644SScott Wood         short mode;               /*   Type of pixels (packed, indexed) */
46b09c1644SScott Wood         unsigned long fb;         /*   Pointer to frame buffer (pixel) memory */
47b09c1644SScott Wood     } bi_video;
48b09c1644SScott Wood     void         (*bi_cputc)(char);   /* Write a character to the RedBoot console */
49b09c1644SScott Wood     char         (*bi_cgetc)(void);   /* Read a character from the RedBoot console */
50b09c1644SScott Wood     int          (*bi_ctstc)(void);   /* Test for input on the RedBoot console */
51b09c1644SScott Wood } bd_t;
52b09c1644SScott Wood 
53b09c1644SScott Wood #define BI_REV 0x0102    /* Version 1.02 */
54b09c1644SScott Wood 
55b09c1644SScott Wood #define bi_pci_busfreq bi_pci_freq
56b09c1644SScott Wood #define bi_immr_base   bi_immr
57b09c1644SScott Wood #endif
58