machines.h 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /* machines.h: Defines for taking apart the machine type value in the
  2. * idprom and determining the kind of machine we are on.
  3. *
  4. * Taken from the SPARC port of Linux.
  5. *
  6. * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
  7. * Copyright (C) 2007 Daniel Hellstrom (daniel@gaisler.com)
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation; either version 2 of
  12. * the License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  22. * MA 02111-1307 USA
  23. *
  24. */
  25. #ifndef __SPARC_MACHINES_H__
  26. #define __SPARC_MACHINES_H__
  27. struct Sun_Machine_Models {
  28. char *name;
  29. unsigned char id_machtype;
  30. };
  31. /* Current number of machines we know about that has an IDPROM
  32. * machtype entry including one entry for the 0x80 OBP machines.
  33. */
  34. #define NUM_SUN_MACHINES 16
  35. extern struct Sun_Machine_Models Sun_Machines[NUM_SUN_MACHINES];
  36. /* The machine type in the idprom area looks like this:
  37. *
  38. * ---------------
  39. * | ARCH | MACH |
  40. * ---------------
  41. * 7 4 3 0
  42. *
  43. * The ARCH field determines the architecture line (sun4, sun4c, etc).
  44. * The MACH field determines the machine make within that architecture.
  45. */
  46. #define SM_ARCH_MASK 0xf0
  47. #define SM_SUN4 0x20
  48. #define M_LEON2 0x30
  49. #define SM_SUN4C 0x50
  50. #define SM_SUN4M 0x70
  51. #define SM_SUN4M_OBP 0x80
  52. #define SM_TYP_MASK 0x0f
  53. /* Sun4 machines */
  54. #define SM_4_260 0x01 /* Sun 4/200 series */
  55. #define SM_4_110 0x02 /* Sun 4/100 series */
  56. #define SM_4_330 0x03 /* Sun 4/300 series */
  57. #define SM_4_470 0x04 /* Sun 4/400 series */
  58. /* Leon machines */
  59. #define M_LEON2_SOC 0x01 /* Leon2 SoC */
  60. /* Sun4c machines Full Name - PROM NAME */
  61. #define SM_4C_SS1 0x01 /* Sun4c SparcStation 1 - Sun 4/60 */
  62. #define SM_4C_IPC 0x02 /* Sun4c SparcStation IPC - Sun 4/40 */
  63. #define SM_4C_SS1PLUS 0x03 /* Sun4c SparcStation 1+ - Sun 4/65 */
  64. #define SM_4C_SLC 0x04 /* Sun4c SparcStation SLC - Sun 4/20 */
  65. #define SM_4C_SS2 0x05 /* Sun4c SparcStation 2 - Sun 4/75 */
  66. #define SM_4C_ELC 0x06 /* Sun4c SparcStation ELC - Sun 4/25 */
  67. #define SM_4C_IPX 0x07 /* Sun4c SparcStation IPX - Sun 4/50 */
  68. /* Sun4m machines, these predate the OpenBoot. These values only mean
  69. * something if the value in the ARCH field is SM_SUN4M, if it is
  70. * SM_SUN4M_OBP then you have the following situation:
  71. * 1) You either have a sun4d, a sun4e, or a recently made sun4m.
  72. * 2) You have to consult OpenBoot to determine which machine this is.
  73. */
  74. #define SM_4M_SS60 0x01 /* Sun4m SparcSystem 600 */
  75. #define SM_4M_SS50 0x02 /* Sun4m SparcStation 10 */
  76. #define SM_4M_SS40 0x03 /* Sun4m SparcStation 5 */
  77. /* Sun4d machines -- N/A */
  78. /* Sun4e machines -- N/A */
  79. /* Sun4u machines -- N/A */
  80. #endif /* !(_SPARC_MACHINES_H) */