blob: ef6bf81f846050feb948d6d33a6d348eaa8ccacd [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * Written by: Patricia Gaughen, IBM Corporation
3 *
4 * Copyright (C) 2002, IBM Corp.
5 *
Joe Perches5f4e4b72008-03-23 01:02:56 -07006 * All rights reserved.
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 *
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
H. Peter Anvin1965aae2008-10-22 22:26:29 -070026#ifndef _ASM_X86_NUMAQ_H
27#define _ASM_X86_NUMAQ_H
Linus Torvalds1da177e2005-04-16 15:20:36 -070028
29#ifdef CONFIG_X86_NUMAQ
30
Yinghai Luab530e12008-06-03 10:25:54 -070031extern int found_numaq;
Linus Torvalds1da177e2005-04-16 15:20:36 -070032extern int get_memcfg_numaq(void);
Thomas Gleixnerb72d0db2009-08-29 16:24:51 +020033extern int pci_numaq_init(void);
Linus Torvalds1da177e2005-04-16 15:20:36 -070034
Ingo Molnar4f179d12009-02-01 11:25:57 +010035extern void *xquad_portio;
36
Linus Torvalds1da177e2005-04-16 15:20:36 -070037/*
38 * SYS_CFG_DATA_PRIV_ADDR, struct eachquadmem, and struct sys_cfg_data are the
39 */
Joe Perches5f4e4b72008-03-23 01:02:56 -070040#define SYS_CFG_DATA_PRIV_ADDR 0x0009d000 /* place for scd in private
41 quad space */
Linus Torvalds1da177e2005-04-16 15:20:36 -070042
43/*
44 * Communication area for each processor on lynxer-processor tests.
45 *
46 * NOTE: If you change the size of this eachproc structure you need
47 * to change the definition for EACH_QUAD_SIZE.
48 */
49struct eachquadmem {
50 unsigned int priv_mem_start; /* Starting address of this */
51 /* quad's private memory. */
52 /* This is always 0. */
53 /* In MB. */
54 unsigned int priv_mem_size; /* Size of this quad's */
55 /* private memory. */
56 /* In MB. */
57 unsigned int low_shrd_mem_strp_start;/* Starting address of this */
58 /* quad's low shared block */
59 /* (untranslated). */
60 /* In MB. */
61 unsigned int low_shrd_mem_start; /* Starting address of this */
62 /* quad's low shared memory */
63 /* (untranslated). */
64 /* In MB. */
65 unsigned int low_shrd_mem_size; /* Size of this quad's low */
66 /* shared memory. */
67 /* In MB. */
68 unsigned int lmmio_copb_start; /* Starting address of this */
69 /* quad's local memory */
70 /* mapped I/O in the */
71 /* compatibility OPB. */
72 /* In MB. */
73 unsigned int lmmio_copb_size; /* Size of this quad's local */
74 /* memory mapped I/O in the */
75 /* compatibility OPB. */
76 /* In MB. */
77 unsigned int lmmio_nopb_start; /* Starting address of this */
78 /* quad's local memory */
79 /* mapped I/O in the */
80 /* non-compatibility OPB. */
81 /* In MB. */
82 unsigned int lmmio_nopb_size; /* Size of this quad's local */
83 /* memory mapped I/O in the */
84 /* non-compatibility OPB. */
85 /* In MB. */
86 unsigned int io_apic_0_start; /* Starting address of I/O */
87 /* APIC 0. */
88 unsigned int io_apic_0_sz; /* Size I/O APIC 0. */
89 unsigned int io_apic_1_start; /* Starting address of I/O */
90 /* APIC 1. */
91 unsigned int io_apic_1_sz; /* Size I/O APIC 1. */
92 unsigned int hi_shrd_mem_start; /* Starting address of this */
93 /* quad's high shared memory.*/
94 /* In MB. */
95 unsigned int hi_shrd_mem_size; /* Size of this quad's high */
96 /* shared memory. */
97 /* In MB. */
98 unsigned int mps_table_addr; /* Address of this quad's */
99 /* MPS tables from BIOS, */
100 /* in system space.*/
101 unsigned int lcl_MDC_pio_addr; /* Port-I/O address for */
102 /* local access of MDC. */
103 unsigned int rmt_MDC_mmpio_addr; /* MM-Port-I/O address for */
104 /* remote access of MDC. */
105 unsigned int mm_port_io_start; /* Starting address of this */
106 /* quad's memory mapped Port */
107 /* I/O space. */
108 unsigned int mm_port_io_size; /* Size of this quad's memory*/
109 /* mapped Port I/O space. */
110 unsigned int mm_rmt_io_apic_start; /* Starting address of this */
111 /* quad's memory mapped */
112 /* remote I/O APIC space. */
113 unsigned int mm_rmt_io_apic_size; /* Size of this quad's memory*/
114 /* mapped remote I/O APIC */
115 /* space. */
116 unsigned int mm_isa_start; /* Starting address of this */
117 /* quad's memory mapped ISA */
118 /* space (contains MDC */
119 /* memory space). */
120 unsigned int mm_isa_size; /* Size of this quad's memory*/
121 /* mapped ISA space (contains*/
122 /* MDC memory space). */
123 unsigned int rmt_qmi_addr; /* Remote addr to access QMI.*/
124 unsigned int lcl_qmi_addr; /* Local addr to access QMI. */
125};
126
127/*
128 * Note: This structure must be NOT be changed unless the multiproc and
129 * OS are changed to reflect the new structure.
130 */
131struct sys_cfg_data {
132 unsigned int quad_id;
133 unsigned int bsp_proc_id; /* Boot Strap Processor in this quad. */
134 unsigned int scd_version; /* Version number of this table. */
135 unsigned int first_quad_id;
136 unsigned int quads_present31_0; /* 1 bit for each quad */
137 unsigned int quads_present63_32; /* 1 bit for each quad */
138 unsigned int config_flags;
139 unsigned int boot_flags;
140 unsigned int csr_start_addr; /* Absolute value (not in MB) */
141 unsigned int csr_size; /* Absolute value (not in MB) */
142 unsigned int lcl_apic_start_addr; /* Absolute value (not in MB) */
143 unsigned int lcl_apic_size; /* Absolute value (not in MB) */
144 unsigned int low_shrd_mem_base; /* 0 or 512MB or 1GB */
145 unsigned int low_shrd_mem_quad_offset; /* 0,128M,256M,512M,1G */
146 /* may not be totally populated */
Joe Perches5f4e4b72008-03-23 01:02:56 -0700147 unsigned int split_mem_enbl; /* 0 for no low shared memory */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700148 unsigned int mmio_sz; /* Size of total system memory mapped I/O */
149 /* (in MB). */
150 unsigned int quad_spin_lock; /* Spare location used for quad */
151 /* bringup. */
152 unsigned int nonzero55; /* For checksumming. */
153 unsigned int nonzeroaa; /* For checksumming. */
154 unsigned int scd_magic_number;
155 unsigned int system_type;
156 unsigned int checksum;
157 /*
158 * memory configuration area for each quad
159 */
Joe Perches5f4e4b72008-03-23 01:02:56 -0700160 struct eachquadmem eq[MAX_NUMNODES]; /* indexed by quad id */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700161};
162
Yinghai Lu3d88cca2008-07-12 22:52:55 -0700163void numaq_tsc_disable(void);
164
Yinghai Lud49c4282008-06-08 18:31:54 -0700165#else
166static inline int get_memcfg_numaq(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700167{
Yinghai Lud49c4282008-06-08 18:31:54 -0700168 return 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700169}
170#endif /* CONFIG_X86_NUMAQ */
H. Peter Anvin1965aae2008-10-22 22:26:29 -0700171#endif /* _ASM_X86_NUMAQ_H */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700172