es7000_32.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748
  1. /*
  2. * Written by: Garry Forsgren, Unisys Corporation
  3. * Natalie Protasevich, Unisys Corporation
  4. * This file contains the code to configure and interface
  5. * with Unisys ES7000 series hardware system manager.
  6. *
  7. * Copyright (c) 2003 Unisys Corporation. All Rights Reserved.
  8. *
  9. * This program is free software; you can redistribute it and/or modify it
  10. * under the terms of version 2 of the GNU General Public License as
  11. * published by the Free Software Foundation.
  12. *
  13. * This program is distributed in the hope that it would be useful, but
  14. * WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  16. *
  17. * You should have received a copy of the GNU General Public License along
  18. * with this program; if not, write the Free Software Foundation, Inc., 59
  19. * Temple Place - Suite 330, Boston MA 02111-1307, USA.
  20. *
  21. * Contact information: Unisys Corporation, Township Line & Union Meeting
  22. * Roads-A, Unisys Way, Blue Bell, Pennsylvania, 19424, or:
  23. *
  24. * http://www.unisys.com
  25. */
  26. #include <linux/notifier.h>
  27. #include <linux/spinlock.h>
  28. #include <linux/cpumask.h>
  29. #include <linux/threads.h>
  30. #include <linux/kernel.h>
  31. #include <linux/module.h>
  32. #include <linux/reboot.h>
  33. #include <linux/string.h>
  34. #include <linux/types.h>
  35. #include <linux/errno.h>
  36. #include <linux/acpi.h>
  37. #include <linux/init.h>
  38. #include <linux/smp.h>
  39. #include <asm/apicdef.h>
  40. #include <asm/atomic.h>
  41. #include <asm/fixmap.h>
  42. #include <asm/mpspec.h>
  43. #include <asm/setup.h>
  44. #include <asm/apic.h>
  45. #include <asm/ipi.h>
  46. #include <asm/nmi.h>
  47. #include <asm/smp.h>
  48. #include <asm/io.h>
  49. /*
  50. * ES7000 chipsets
  51. */
  52. #define NON_UNISYS 0
  53. #define ES7000_CLASSIC 1
  54. #define ES7000_ZORRO 2
  55. #define MIP_REG 1
  56. #define MIP_PSAI_REG 4
  57. #define MIP_BUSY 1
  58. #define MIP_SPIN 0xf0000
  59. #define MIP_VALID 0x0100000000000000ULL
  60. #define MIP_SW_APIC 0x1020b
  61. #define MIP_PORT(val) ((val >> 32) & 0xffff)
  62. #define MIP_RD_LO(val) (val & 0xffffffff)
  63. struct mip_reg {
  64. unsigned long long off_0x00;
  65. unsigned long long off_0x08;
  66. unsigned long long off_0x10;
  67. unsigned long long off_0x18;
  68. unsigned long long off_0x20;
  69. unsigned long long off_0x28;
  70. unsigned long long off_0x30;
  71. unsigned long long off_0x38;
  72. };
  73. struct mip_reg_info {
  74. unsigned long long mip_info;
  75. unsigned long long delivery_info;
  76. unsigned long long host_reg;
  77. unsigned long long mip_reg;
  78. };
  79. struct psai {
  80. unsigned long long entry_type;
  81. unsigned long long addr;
  82. unsigned long long bep_addr;
  83. };
  84. #ifdef CONFIG_ACPI
  85. struct es7000_oem_table {
  86. struct acpi_table_header Header;
  87. u32 OEMTableAddr;
  88. u32 OEMTableSize;
  89. };
  90. #endif
  91. /*
  92. * ES7000 Globals
  93. */
  94. static volatile unsigned long *psai = NULL;
  95. static struct mip_reg *mip_reg;
  96. static struct mip_reg *host_reg;
  97. static int mip_port;
  98. static unsigned long mip_addr, host_addr;
  99. int es7000_plat;
  100. /*
  101. * GSI override for ES7000 platforms.
  102. */
  103. static unsigned int base;
  104. static int
  105. es7000_rename_gsi(int ioapic, int gsi)
  106. {
  107. if (es7000_plat == ES7000_ZORRO)
  108. return gsi;
  109. if (!base) {
  110. int i;
  111. for (i = 0; i < nr_ioapics; i++)
  112. base += nr_ioapic_registers[i];
  113. }
  114. if (!ioapic && (gsi < 16))
  115. gsi += base;
  116. return gsi;
  117. }
  118. static int wakeup_secondary_cpu_via_mip(int cpu, unsigned long eip)
  119. {
  120. unsigned long vect = 0, psaival = 0;
  121. if (psai == NULL)
  122. return -1;
  123. vect = ((unsigned long)__pa(eip)/0x1000) << 16;
  124. psaival = (0x1000000 | vect | cpu);
  125. while (*psai & 0x1000000)
  126. ;
  127. *psai = psaival;
  128. return 0;
  129. }
  130. static int __init es7000_update_genapic(void)
  131. {
  132. apic->wakeup_cpu = wakeup_secondary_cpu_via_mip;
  133. /* MPENTIUMIII */
  134. if (boot_cpu_data.x86 == 6 &&
  135. (boot_cpu_data.x86_model >= 7 || boot_cpu_data.x86_model <= 11)) {
  136. es7000_update_genapic_to_cluster();
  137. apic->wait_for_init_deassert = NULL;
  138. apic->wakeup_cpu = wakeup_secondary_cpu_via_mip;
  139. }
  140. return 0;
  141. }
  142. static void __init setup_unisys(void)
  143. {
  144. /*
  145. * Determine the generation of the ES7000 currently running.
  146. *
  147. * es7000_plat = 1 if the machine is a 5xx ES7000 box
  148. * es7000_plat = 2 if the machine is a x86_64 ES7000 box
  149. *
  150. */
  151. if (!(boot_cpu_data.x86 <= 15 && boot_cpu_data.x86_model <= 2))
  152. es7000_plat = ES7000_ZORRO;
  153. else
  154. es7000_plat = ES7000_CLASSIC;
  155. ioapic_renumber_irq = es7000_rename_gsi;
  156. x86_quirks->update_genapic = es7000_update_genapic;
  157. }
  158. /*
  159. * Parse the OEM Table:
  160. */
  161. static int __init parse_unisys_oem(char *oemptr)
  162. {
  163. int i;
  164. int success = 0;
  165. unsigned char type, size;
  166. unsigned long val;
  167. char *tp = NULL;
  168. struct psai *psaip = NULL;
  169. struct mip_reg_info *mi;
  170. struct mip_reg *host, *mip;
  171. tp = oemptr;
  172. tp += 8;
  173. for (i = 0; i <= 6; i++) {
  174. type = *tp++;
  175. size = *tp++;
  176. tp -= 2;
  177. switch (type) {
  178. case MIP_REG:
  179. mi = (struct mip_reg_info *)tp;
  180. val = MIP_RD_LO(mi->host_reg);
  181. host_addr = val;
  182. host = (struct mip_reg *)val;
  183. host_reg = __va(host);
  184. val = MIP_RD_LO(mi->mip_reg);
  185. mip_port = MIP_PORT(mi->mip_info);
  186. mip_addr = val;
  187. mip = (struct mip_reg *)val;
  188. mip_reg = __va(mip);
  189. pr_debug("es7000_mipcfg: host_reg = 0x%lx \n",
  190. (unsigned long)host_reg);
  191. pr_debug("es7000_mipcfg: mip_reg = 0x%lx \n",
  192. (unsigned long)mip_reg);
  193. success++;
  194. break;
  195. case MIP_PSAI_REG:
  196. psaip = (struct psai *)tp;
  197. if (tp != NULL) {
  198. if (psaip->addr)
  199. psai = __va(psaip->addr);
  200. else
  201. psai = NULL;
  202. success++;
  203. }
  204. break;
  205. default:
  206. break;
  207. }
  208. tp += size;
  209. }
  210. if (success < 2)
  211. es7000_plat = NON_UNISYS;
  212. else
  213. setup_unisys();
  214. return es7000_plat;
  215. }
  216. #ifdef CONFIG_ACPI
  217. static unsigned long oem_addrX;
  218. static unsigned long oem_size;
  219. static int __init find_unisys_acpi_oem_table(unsigned long *oem_addr)
  220. {
  221. struct acpi_table_header *header = NULL;
  222. int i = 0;
  223. acpi_size tbl_size;
  224. while (ACPI_SUCCESS(acpi_get_table_with_size("OEM1", i++, &header, &tbl_size))) {
  225. if (!memcmp((char *) &header->oem_id, "UNISYS", 6)) {
  226. struct es7000_oem_table *t = (void *)header;
  227. oem_addrX = t->OEMTableAddr;
  228. oem_size = t->OEMTableSize;
  229. early_acpi_os_unmap_memory(header, tbl_size);
  230. *oem_addr = (unsigned long)__acpi_map_table(oem_addrX,
  231. oem_size);
  232. return 0;
  233. }
  234. early_acpi_os_unmap_memory(header, tbl_size);
  235. }
  236. return -1;
  237. }
  238. static void __init unmap_unisys_acpi_oem_table(unsigned long oem_addr)
  239. {
  240. if (!oem_addr)
  241. return;
  242. __acpi_unmap_table((char *)oem_addr, oem_size);
  243. }
  244. #endif
  245. static void es7000_spin(int n)
  246. {
  247. int i = 0;
  248. while (i++ < n)
  249. rep_nop();
  250. }
  251. static int __init
  252. es7000_mip_write(struct mip_reg *mip_reg)
  253. {
  254. int status = 0;
  255. int spin;
  256. spin = MIP_SPIN;
  257. while ((host_reg->off_0x38 & MIP_VALID) != 0) {
  258. if (--spin <= 0) {
  259. printk("es7000_mip_write: Timeout waiting for Host Valid Flag");
  260. return -1;
  261. }
  262. es7000_spin(MIP_SPIN);
  263. }
  264. memcpy(host_reg, mip_reg, sizeof(struct mip_reg));
  265. outb(1, mip_port);
  266. spin = MIP_SPIN;
  267. while ((mip_reg->off_0x38 & MIP_VALID) == 0) {
  268. if (--spin <= 0) {
  269. printk("es7000_mip_write: Timeout waiting for MIP Valid Flag");
  270. return -1;
  271. }
  272. es7000_spin(MIP_SPIN);
  273. }
  274. status = (mip_reg->off_0x00 & 0xffff0000000000ULL) >> 48;
  275. mip_reg->off_0x38 &= ~MIP_VALID;
  276. return status;
  277. }
  278. static void __init es7000_enable_apic_mode(void)
  279. {
  280. struct mip_reg es7000_mip_reg;
  281. int mip_status;
  282. if (!es7000_plat)
  283. return;
  284. printk("ES7000: Enabling APIC mode.\n");
  285. memset(&es7000_mip_reg, 0, sizeof(struct mip_reg));
  286. es7000_mip_reg.off_0x00 = MIP_SW_APIC;
  287. es7000_mip_reg.off_0x38 = MIP_VALID;
  288. while ((mip_status = es7000_mip_write(&es7000_mip_reg)) != 0) {
  289. printk("es7000_enable_apic_mode: command failed, status = %x\n",
  290. mip_status);
  291. }
  292. }
  293. static void es7000_vector_allocation_domain(int cpu, cpumask_t *retmask)
  294. {
  295. /* Careful. Some cpus do not strictly honor the set of cpus
  296. * specified in the interrupt destination when using lowest
  297. * priority interrupt delivery mode.
  298. *
  299. * In particular there was a hyperthreading cpu observed to
  300. * deliver interrupts to the wrong hyperthread when only one
  301. * hyperthread was specified in the interrupt desitination.
  302. */
  303. *retmask = (cpumask_t){ { [0] = APIC_ALL_CPUS, } };
  304. }
  305. static void es7000_wait_for_init_deassert(atomic_t *deassert)
  306. {
  307. #ifndef CONFIG_ES7000_CLUSTERED_APIC
  308. while (!atomic_read(deassert))
  309. cpu_relax();
  310. #endif
  311. return;
  312. }
  313. static unsigned int es7000_get_apic_id(unsigned long x)
  314. {
  315. return (x >> 24) & 0xFF;
  316. }
  317. #ifdef CONFIG_ACPI
  318. static int es7000_check_dsdt(void)
  319. {
  320. struct acpi_table_header header;
  321. if (ACPI_SUCCESS(acpi_get_table_header(ACPI_SIG_DSDT, 0, &header)) &&
  322. !strncmp(header.oem_id, "UNISYS", 6))
  323. return 1;
  324. return 0;
  325. }
  326. #endif
  327. static void es7000_send_IPI_mask(const struct cpumask *mask, int vector)
  328. {
  329. default_send_IPI_mask_sequence_phys(mask, vector);
  330. }
  331. static void es7000_send_IPI_allbutself(int vector)
  332. {
  333. default_send_IPI_mask_allbutself_phys(cpu_online_mask, vector);
  334. }
  335. static void es7000_send_IPI_all(int vector)
  336. {
  337. es7000_send_IPI_mask(cpu_online_mask, vector);
  338. }
  339. static int es7000_apic_id_registered(void)
  340. {
  341. return 1;
  342. }
  343. static const cpumask_t *target_cpus_cluster(void)
  344. {
  345. return &CPU_MASK_ALL;
  346. }
  347. static const cpumask_t *es7000_target_cpus(void)
  348. {
  349. return &cpumask_of_cpu(smp_processor_id());
  350. }
  351. static unsigned long
  352. es7000_check_apicid_used(physid_mask_t bitmap, int apicid)
  353. {
  354. return 0;
  355. }
  356. static unsigned long es7000_check_apicid_present(int bit)
  357. {
  358. return physid_isset(bit, phys_cpu_present_map);
  359. }
  360. static unsigned long calculate_ldr(int cpu)
  361. {
  362. unsigned long id = per_cpu(x86_bios_cpu_apicid, cpu);
  363. return SET_APIC_LOGICAL_ID(id);
  364. }
  365. /*
  366. * Set up the logical destination ID.
  367. *
  368. * Intel recommends to set DFR, LdR and TPR before enabling
  369. * an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel
  370. * document number 292116). So here it goes...
  371. */
  372. static void es7000_init_apic_ldr_cluster(void)
  373. {
  374. unsigned long val;
  375. int cpu = smp_processor_id();
  376. apic_write(APIC_DFR, APIC_DFR_CLUSTER);
  377. val = calculate_ldr(cpu);
  378. apic_write(APIC_LDR, val);
  379. }
  380. static void es7000_init_apic_ldr(void)
  381. {
  382. unsigned long val;
  383. int cpu = smp_processor_id();
  384. apic_write(APIC_DFR, APIC_DFR_FLAT);
  385. val = calculate_ldr(cpu);
  386. apic_write(APIC_LDR, val);
  387. }
  388. static void es7000_setup_apic_routing(void)
  389. {
  390. int apic = per_cpu(x86_bios_cpu_apicid, smp_processor_id());
  391. printk("Enabling APIC mode: %s. Using %d I/O APICs, target cpus %lx\n",
  392. (apic_version[apic] == 0x14) ?
  393. "Physical Cluster" : "Logical Cluster",
  394. nr_ioapics, cpus_addr(*es7000_target_cpus())[0]);
  395. }
  396. static int es7000_apicid_to_node(int logical_apicid)
  397. {
  398. return 0;
  399. }
  400. static int es7000_cpu_present_to_apicid(int mps_cpu)
  401. {
  402. if (!mps_cpu)
  403. return boot_cpu_physical_apicid;
  404. else if (mps_cpu < nr_cpu_ids)
  405. return per_cpu(x86_bios_cpu_apicid, mps_cpu);
  406. else
  407. return BAD_APICID;
  408. }
  409. static physid_mask_t es7000_apicid_to_cpu_present(int phys_apicid)
  410. {
  411. static int id = 0;
  412. physid_mask_t mask;
  413. mask = physid_mask_of_physid(id);
  414. ++id;
  415. return mask;
  416. }
  417. /* Mapping from cpu number to logical apicid */
  418. static int es7000_cpu_to_logical_apicid(int cpu)
  419. {
  420. #ifdef CONFIG_SMP
  421. if (cpu >= nr_cpu_ids)
  422. return BAD_APICID;
  423. return cpu_2_logical_apicid[cpu];
  424. #else
  425. return logical_smp_processor_id();
  426. #endif
  427. }
  428. static physid_mask_t es7000_ioapic_phys_id_map(physid_mask_t phys_map)
  429. {
  430. /* For clustered we don't have a good way to do this yet - hack */
  431. return physids_promote(0xff);
  432. }
  433. static int es7000_check_phys_apicid_present(int cpu_physical_apicid)
  434. {
  435. boot_cpu_physical_apicid = read_apic_id();
  436. return 1;
  437. }
  438. static unsigned int
  439. es7000_cpu_mask_to_apicid_cluster(const struct cpumask *cpumask)
  440. {
  441. int cpus_found = 0;
  442. int num_bits_set;
  443. int apicid;
  444. int cpu;
  445. num_bits_set = cpumask_weight(cpumask);
  446. /* Return id to all */
  447. if (num_bits_set == nr_cpu_ids)
  448. return 0xFF;
  449. /*
  450. * The cpus in the mask must all be on the apic cluster. If are not
  451. * on the same apicid cluster return default value of target_cpus():
  452. */
  453. cpu = cpumask_first(cpumask);
  454. apicid = es7000_cpu_to_logical_apicid(cpu);
  455. while (cpus_found < num_bits_set) {
  456. if (cpumask_test_cpu(cpu, cpumask)) {
  457. int new_apicid = es7000_cpu_to_logical_apicid(cpu);
  458. if (APIC_CLUSTER(apicid) != APIC_CLUSTER(new_apicid)) {
  459. printk("%s: Not a valid mask!\n", __func__);
  460. return 0xFF;
  461. }
  462. apicid = new_apicid;
  463. cpus_found++;
  464. }
  465. cpu++;
  466. }
  467. return apicid;
  468. }
  469. static unsigned int es7000_cpu_mask_to_apicid(const cpumask_t *cpumask)
  470. {
  471. int cpus_found = 0;
  472. int num_bits_set;
  473. int apicid;
  474. int cpu;
  475. num_bits_set = cpus_weight(*cpumask);
  476. /* Return id to all */
  477. if (num_bits_set == nr_cpu_ids)
  478. return es7000_cpu_to_logical_apicid(0);
  479. /*
  480. * The cpus in the mask must all be on the apic cluster. If are not
  481. * on the same apicid cluster return default value of target_cpus():
  482. */
  483. cpu = first_cpu(*cpumask);
  484. apicid = es7000_cpu_to_logical_apicid(cpu);
  485. while (cpus_found < num_bits_set) {
  486. if (cpu_isset(cpu, *cpumask)) {
  487. int new_apicid = es7000_cpu_to_logical_apicid(cpu);
  488. if (APIC_CLUSTER(apicid) != APIC_CLUSTER(new_apicid)) {
  489. printk("%s: Not a valid mask!\n", __func__);
  490. return es7000_cpu_to_logical_apicid(0);
  491. }
  492. apicid = new_apicid;
  493. cpus_found++;
  494. }
  495. cpu++;
  496. }
  497. return apicid;
  498. }
  499. static unsigned int
  500. es7000_cpu_mask_to_apicid_and(const struct cpumask *inmask,
  501. const struct cpumask *andmask)
  502. {
  503. int apicid = es7000_cpu_to_logical_apicid(0);
  504. cpumask_var_t cpumask;
  505. if (!alloc_cpumask_var(&cpumask, GFP_ATOMIC))
  506. return apicid;
  507. cpumask_and(cpumask, inmask, andmask);
  508. cpumask_and(cpumask, cpumask, cpu_online_mask);
  509. apicid = es7000_cpu_mask_to_apicid(cpumask);
  510. free_cpumask_var(cpumask);
  511. return apicid;
  512. }
  513. static int es7000_phys_pkg_id(int cpuid_apic, int index_msb)
  514. {
  515. return cpuid_apic >> index_msb;
  516. }
  517. void __init es7000_update_genapic_to_cluster(void)
  518. {
  519. apic->target_cpus = target_cpus_cluster;
  520. apic->irq_delivery_mode = dest_LowestPrio;
  521. /* logical delivery broadcast to all procs: */
  522. apic->irq_dest_mode = 1;
  523. apic->init_apic_ldr = es7000_init_apic_ldr_cluster;
  524. apic->cpu_mask_to_apicid = es7000_cpu_mask_to_apicid_cluster;
  525. }
  526. static int probe_es7000(void)
  527. {
  528. /* probed later in mptable/ACPI hooks */
  529. return 0;
  530. }
  531. static __init int
  532. es7000_mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
  533. {
  534. if (mpc->oemptr) {
  535. struct mpc_oemtable *oem_table =
  536. (struct mpc_oemtable *)mpc->oemptr;
  537. if (!strncmp(oem, "UNISYS", 6))
  538. return parse_unisys_oem((char *)oem_table);
  539. }
  540. return 0;
  541. }
  542. #ifdef CONFIG_ACPI
  543. /* Hook from generic ACPI tables.c */
  544. static int __init es7000_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
  545. {
  546. unsigned long oem_addr = 0;
  547. int check_dsdt;
  548. int ret = 0;
  549. /* check dsdt at first to avoid clear fix_map for oem_addr */
  550. check_dsdt = es7000_check_dsdt();
  551. if (!find_unisys_acpi_oem_table(&oem_addr)) {
  552. if (check_dsdt) {
  553. ret = parse_unisys_oem((char *)oem_addr);
  554. } else {
  555. setup_unisys();
  556. ret = 1;
  557. }
  558. /*
  559. * we need to unmap it
  560. */
  561. unmap_unisys_acpi_oem_table(oem_addr);
  562. }
  563. return ret;
  564. }
  565. #else
  566. static int __init es7000_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
  567. {
  568. return 0;
  569. }
  570. #endif
  571. struct genapic apic_es7000 = {
  572. .name = "es7000",
  573. .probe = probe_es7000,
  574. .acpi_madt_oem_check = es7000_acpi_madt_oem_check,
  575. .apic_id_registered = es7000_apic_id_registered,
  576. .irq_delivery_mode = dest_Fixed,
  577. /* phys delivery to target CPUs: */
  578. .irq_dest_mode = 0,
  579. .target_cpus = es7000_target_cpus,
  580. .disable_esr = 1,
  581. .dest_logical = 0,
  582. .check_apicid_used = es7000_check_apicid_used,
  583. .check_apicid_present = es7000_check_apicid_present,
  584. .vector_allocation_domain = es7000_vector_allocation_domain,
  585. .init_apic_ldr = es7000_init_apic_ldr,
  586. .ioapic_phys_id_map = es7000_ioapic_phys_id_map,
  587. .setup_apic_routing = es7000_setup_apic_routing,
  588. .multi_timer_check = NULL,
  589. .apicid_to_node = es7000_apicid_to_node,
  590. .cpu_to_logical_apicid = es7000_cpu_to_logical_apicid,
  591. .cpu_present_to_apicid = es7000_cpu_present_to_apicid,
  592. .apicid_to_cpu_present = es7000_apicid_to_cpu_present,
  593. .setup_portio_remap = NULL,
  594. .check_phys_apicid_present = es7000_check_phys_apicid_present,
  595. .enable_apic_mode = es7000_enable_apic_mode,
  596. .phys_pkg_id = es7000_phys_pkg_id,
  597. .mps_oem_check = es7000_mps_oem_check,
  598. .get_apic_id = es7000_get_apic_id,
  599. .set_apic_id = NULL,
  600. .apic_id_mask = 0xFF << 24,
  601. .cpu_mask_to_apicid = es7000_cpu_mask_to_apicid,
  602. .cpu_mask_to_apicid_and = es7000_cpu_mask_to_apicid_and,
  603. .send_IPI_mask = es7000_send_IPI_mask,
  604. .send_IPI_mask_allbutself = NULL,
  605. .send_IPI_allbutself = es7000_send_IPI_allbutself,
  606. .send_IPI_all = es7000_send_IPI_all,
  607. .send_IPI_self = default_send_IPI_self,
  608. .wakeup_cpu = NULL,
  609. .trampoline_phys_low = 0x467,
  610. .trampoline_phys_high = 0x469,
  611. .wait_for_init_deassert = es7000_wait_for_init_deassert,
  612. /* Nothing to do for most platforms, since cleared by the INIT cycle: */
  613. .smp_callin_clear_local_apic = NULL,
  614. .store_NMI_vector = NULL,
  615. .inquire_remote_apic = default_inquire_remote_apic,
  616. .read = native_apic_mem_read,
  617. .write = native_apic_mem_write,
  618. .icr_read = native_apic_icr_read,
  619. .icr_write = native_apic_icr_write,
  620. .wait_icr_idle = native_apic_wait_icr_idle,
  621. .safe_wait_icr_idle = native_safe_apic_wait_icr_idle,
  622. };