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