redboot.h 2.7 KB

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