numaq.h 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. /*
  2. * Written by: Patricia Gaughen, IBM Corporation
  3. *
  4. * Copyright (C) 2002, IBM Corp.
  5. *
  6. * All rights reserved.
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful, but
  14. * WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
  16. * NON INFRINGEMENT. See the GNU General Public License for more
  17. * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
  22. *
  23. * Send feedback to <gone@us.ibm.com>
  24. */
  25. #ifndef _ASM_X86_NUMAQ_H
  26. #define _ASM_X86_NUMAQ_H
  27. #ifdef CONFIG_X86_NUMAQ
  28. extern int found_numaq;
  29. extern int get_memcfg_numaq(void);
  30. extern void *xquad_portio;
  31. /*
  32. * SYS_CFG_DATA_PRIV_ADDR, struct eachquadmem, and struct sys_cfg_data are the
  33. */
  34. #define SYS_CFG_DATA_PRIV_ADDR 0x0009d000 /* place for scd in private
  35. quad space */
  36. /*
  37. * Communication area for each processor on lynxer-processor tests.
  38. *
  39. * NOTE: If you change the size of this eachproc structure you need
  40. * to change the definition for EACH_QUAD_SIZE.
  41. */
  42. struct eachquadmem {
  43. unsigned int priv_mem_start; /* Starting address of this */
  44. /* quad's private memory. */
  45. /* This is always 0. */
  46. /* In MB. */
  47. unsigned int priv_mem_size; /* Size of this quad's */
  48. /* private memory. */
  49. /* In MB. */
  50. unsigned int low_shrd_mem_strp_start;/* Starting address of this */
  51. /* quad's low shared block */
  52. /* (untranslated). */
  53. /* In MB. */
  54. unsigned int low_shrd_mem_start; /* Starting address of this */
  55. /* quad's low shared memory */
  56. /* (untranslated). */
  57. /* In MB. */
  58. unsigned int low_shrd_mem_size; /* Size of this quad's low */
  59. /* shared memory. */
  60. /* In MB. */
  61. unsigned int lmmio_copb_start; /* Starting address of this */
  62. /* quad's local memory */
  63. /* mapped I/O in the */
  64. /* compatibility OPB. */
  65. /* In MB. */
  66. unsigned int lmmio_copb_size; /* Size of this quad's local */
  67. /* memory mapped I/O in the */
  68. /* compatibility OPB. */
  69. /* In MB. */
  70. unsigned int lmmio_nopb_start; /* Starting address of this */
  71. /* quad's local memory */
  72. /* mapped I/O in the */
  73. /* non-compatibility OPB. */
  74. /* In MB. */
  75. unsigned int lmmio_nopb_size; /* Size of this quad's local */
  76. /* memory mapped I/O in the */
  77. /* non-compatibility OPB. */
  78. /* In MB. */
  79. unsigned int io_apic_0_start; /* Starting address of I/O */
  80. /* APIC 0. */
  81. unsigned int io_apic_0_sz; /* Size I/O APIC 0. */
  82. unsigned int io_apic_1_start; /* Starting address of I/O */
  83. /* APIC 1. */
  84. unsigned int io_apic_1_sz; /* Size I/O APIC 1. */
  85. unsigned int hi_shrd_mem_start; /* Starting address of this */
  86. /* quad's high shared memory.*/
  87. /* In MB. */
  88. unsigned int hi_shrd_mem_size; /* Size of this quad's high */
  89. /* shared memory. */
  90. /* In MB. */
  91. unsigned int mps_table_addr; /* Address of this quad's */
  92. /* MPS tables from BIOS, */
  93. /* in system space.*/
  94. unsigned int lcl_MDC_pio_addr; /* Port-I/O address for */
  95. /* local access of MDC. */
  96. unsigned int rmt_MDC_mmpio_addr; /* MM-Port-I/O address for */
  97. /* remote access of MDC. */
  98. unsigned int mm_port_io_start; /* Starting address of this */
  99. /* quad's memory mapped Port */
  100. /* I/O space. */
  101. unsigned int mm_port_io_size; /* Size of this quad's memory*/
  102. /* mapped Port I/O space. */
  103. unsigned int mm_rmt_io_apic_start; /* Starting address of this */
  104. /* quad's memory mapped */
  105. /* remote I/O APIC space. */
  106. unsigned int mm_rmt_io_apic_size; /* Size of this quad's memory*/
  107. /* mapped remote I/O APIC */
  108. /* space. */
  109. unsigned int mm_isa_start; /* Starting address of this */
  110. /* quad's memory mapped ISA */
  111. /* space (contains MDC */
  112. /* memory space). */
  113. unsigned int mm_isa_size; /* Size of this quad's memory*/
  114. /* mapped ISA space (contains*/
  115. /* MDC memory space). */
  116. unsigned int rmt_qmi_addr; /* Remote addr to access QMI.*/
  117. unsigned int lcl_qmi_addr; /* Local addr to access QMI. */
  118. };
  119. /*
  120. * Note: This structure must be NOT be changed unless the multiproc and
  121. * OS are changed to reflect the new structure.
  122. */
  123. struct sys_cfg_data {
  124. unsigned int quad_id;
  125. unsigned int bsp_proc_id; /* Boot Strap Processor in this quad. */
  126. unsigned int scd_version; /* Version number of this table. */
  127. unsigned int first_quad_id;
  128. unsigned int quads_present31_0; /* 1 bit for each quad */
  129. unsigned int quads_present63_32; /* 1 bit for each quad */
  130. unsigned int config_flags;
  131. unsigned int boot_flags;
  132. unsigned int csr_start_addr; /* Absolute value (not in MB) */
  133. unsigned int csr_size; /* Absolute value (not in MB) */
  134. unsigned int lcl_apic_start_addr; /* Absolute value (not in MB) */
  135. unsigned int lcl_apic_size; /* Absolute value (not in MB) */
  136. unsigned int low_shrd_mem_base; /* 0 or 512MB or 1GB */
  137. unsigned int low_shrd_mem_quad_offset; /* 0,128M,256M,512M,1G */
  138. /* may not be totally populated */
  139. unsigned int split_mem_enbl; /* 0 for no low shared memory */
  140. unsigned int mmio_sz; /* Size of total system memory mapped I/O */
  141. /* (in MB). */
  142. unsigned int quad_spin_lock; /* Spare location used for quad */
  143. /* bringup. */
  144. unsigned int nonzero55; /* For checksumming. */
  145. unsigned int nonzeroaa; /* For checksumming. */
  146. unsigned int scd_magic_number;
  147. unsigned int system_type;
  148. unsigned int checksum;
  149. /*
  150. * memory configuration area for each quad
  151. */
  152. struct eachquadmem eq[MAX_NUMNODES]; /* indexed by quad id */
  153. };
  154. void numaq_tsc_disable(void);
  155. #else
  156. static inline int get_memcfg_numaq(void)
  157. {
  158. return 0;
  159. }
  160. #endif /* CONFIG_X86_NUMAQ */
  161. #endif /* _ASM_X86_NUMAQ_H */