gda.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Derived from IRIX <sys/SN/gda.h>.
  7. *
  8. * Copyright (C) 1992 - 1997, 2000 Silicon Graphics, Inc.
  9. *
  10. * gda.h -- Contains the data structure for the global data area,
  11. * The GDA contains information communicated between the
  12. * PROM, SYMMON, and the kernel.
  13. */
  14. #ifndef _ASM_SN_GDA_H
  15. #define _ASM_SN_GDA_H
  16. #include <asm/sn/addrs.h>
  17. #define GDA_MAGIC 0x58464552
  18. /*
  19. * GDA Version History
  20. *
  21. * Version # | Change
  22. * -------------+-------------------------------------------------------
  23. * 1 | Initial SN0 version
  24. * 2 | Prom sets g_partid field to the partition number. 0 IS
  25. * | a valid partition #.
  26. */
  27. #define GDA_VERSION 2 /* Current GDA version # */
  28. #define G_MAGICOFF 0
  29. #define G_VERSIONOFF 4
  30. #define G_PROMOPOFF 6
  31. #define G_MASTEROFF 8
  32. #define G_VDSOFF 12
  33. #define G_HKDNORMOFF 16
  34. #define G_HKDUTLBOFF 24
  35. #define G_HKDXUTLBOFF 32
  36. #define G_PARTIDOFF 40
  37. #define G_TABLEOFF 128
  38. #ifndef __ASSEMBLY__
  39. typedef struct gda {
  40. u32 g_magic; /* GDA magic number */
  41. u16 g_version; /* Version of this structure */
  42. u16 g_masterid; /* The NASID:CPUNUM of the master cpu */
  43. u32 g_promop; /* Passes requests from the kernel to prom */
  44. u32 g_vds; /* Store the virtual dipswitches here */
  45. void **g_hooked_norm;/* ptr to pda loc for norm hndlr */
  46. void **g_hooked_utlb;/* ptr to pda loc for utlb hndlr */
  47. void **g_hooked_xtlb;/* ptr to pda loc for xtlb hndlr */
  48. int g_partid; /* partition id */
  49. int g_symmax; /* Max symbols in name table. */
  50. void *g_dbstab; /* Address of idbg symbol table */
  51. char *g_nametab; /* Address of idbg name table */
  52. void *g_ktext_repmask;
  53. /* Pointer to a mask of nodes with copies
  54. * of the kernel. */
  55. char g_padding[56]; /* pad out to 128 bytes */
  56. nasid_t g_nasidtable[MAX_COMPACT_NODES]; /* NASID of each node,
  57. * indexed by cnodeid.
  58. */
  59. } gda_t;
  60. #define GDA ((gda_t*) GDA_ADDR(get_nasid()))
  61. #endif /* !__ASSEMBLY__ */
  62. /*
  63. * Define: PART_GDA_VERSION
  64. * Purpose: Define the minimum version of the GDA required, lower
  65. * revisions assume GDA is NOT set up, and read partition
  66. * information from the board info.
  67. */
  68. #define PART_GDA_VERSION 2
  69. /*
  70. * The following requests can be sent to the PROM during startup.
  71. */
  72. #define PROMOP_MAGIC 0x0ead0000
  73. #define PROMOP_MAGIC_MASK 0x0fff0000
  74. #define PROMOP_BIST_SHIFT 11
  75. #define PROMOP_BIST_MASK (0x3 << 11)
  76. #define PROMOP_REG PI_ERR_STACK_ADDR_A
  77. #define PROMOP_INVALID (PROMOP_MAGIC | 0x00)
  78. #define PROMOP_HALT (PROMOP_MAGIC | 0x10)
  79. #define PROMOP_POWERDOWN (PROMOP_MAGIC | 0x20)
  80. #define PROMOP_RESTART (PROMOP_MAGIC | 0x30)
  81. #define PROMOP_REBOOT (PROMOP_MAGIC | 0x40)
  82. #define PROMOP_IMODE (PROMOP_MAGIC | 0x50)
  83. #define PROMOP_CMD_MASK 0x00f0
  84. #define PROMOP_OPTIONS_MASK 0xfff0
  85. #define PROMOP_SKIP_DIAGS 0x0100 /* don't bother running diags */
  86. #define PROMOP_SKIP_MEMINIT 0x0200 /* don't bother initing memory */
  87. #define PROMOP_SKIP_DEVINIT 0x0400 /* don't bother initing devices */
  88. #define PROMOP_BIST1 0x0800 /* keep track of which BIST ran */
  89. #define PROMOP_BIST2 0x1000 /* keep track of which BIST ran */
  90. #endif /* _ASM_SN_GDA_H */