]> git.karo-electronics.de Git - mv-sheeva.git/blob - arch/x86/kernel/es7000_32.c
c7cc9776ccae149c8fea00731e631e35dca6e13f
[mv-sheeva.git] / arch / x86 / kernel / es7000_32.c
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
27 #include <linux/notifier.h>
28 #include <linux/spinlock.h>
29 #include <linux/cpumask.h>
30 #include <linux/threads.h>
31 #include <linux/kernel.h>
32 #include <linux/module.h>
33 #include <linux/reboot.h>
34 #include <linux/string.h>
35 #include <linux/types.h>
36 #include <linux/errno.h>
37 #include <linux/acpi.h>
38 #include <linux/init.h>
39 #include <linux/smp.h>
40
41 #include <asm/apicdef.h>
42 #include <asm/atomic.h>
43 #include <asm/fixmap.h>
44 #include <asm/mpspec.h>
45 #include <asm/setup.h>
46 #include <asm/apic.h>
47 #include <asm/ipi.h>
48 #include <asm/nmi.h>
49 #include <asm/smp.h>
50 #include <asm/io.h>
51
52 /*
53  * ES7000 chipsets
54  */
55
56 #define NON_UNISYS                      0
57 #define ES7000_CLASSIC                  1
58 #define ES7000_ZORRO                    2
59
60 #define MIP_REG                         1
61 #define MIP_PSAI_REG                    4
62
63 #define MIP_BUSY                        1
64 #define MIP_SPIN                        0xf0000
65 #define MIP_VALID                       0x0100000000000000ULL
66
67 #define MIP_PORT(val)                   ((val >> 32) & 0xffff)
68
69 #define MIP_RD_LO(val)                  (val & 0xffffffff)
70
71 struct mip_reg_info {
72         unsigned long long              mip_info;
73         unsigned long long              delivery_info;
74         unsigned long long              host_reg;
75         unsigned long long              mip_reg;
76 };
77
78 struct part_info {
79         unsigned char                   type;
80         unsigned char                   length;
81         unsigned char                   part_id;
82         unsigned char                   apic_mode;
83         unsigned long                   snum;
84         char                            ptype[16];
85         char                            sname[64];
86         char                            pname[64];
87 };
88
89 struct psai {
90         unsigned long long              entry_type;
91         unsigned long long              addr;
92         unsigned long long              bep_addr;
93 };
94
95 struct es7000_mem_info {
96         unsigned char                   type;
97         unsigned char                   length;
98         unsigned char                   resv[6];
99         unsigned long long              start;
100         unsigned long long              size;
101 };
102
103 struct es7000_oem_table {
104         unsigned long long              hdr;
105         struct mip_reg_info             mip;
106         struct part_info                pif;
107         struct es7000_mem_info          shm;
108         struct psai                     psai;
109 };
110
111 #ifdef CONFIG_ACPI
112
113 struct oem_table {
114         struct acpi_table_header        Header;
115         u32                             OEMTableAddr;
116         u32                             OEMTableSize;
117 };
118
119 extern int find_unisys_acpi_oem_table(unsigned long *oem_addr);
120 extern void unmap_unisys_acpi_oem_table(unsigned long oem_addr);
121 #endif
122
123 struct mip_reg {
124         unsigned long long              off_0x00;
125         unsigned long long              off_0x08;
126         unsigned long long              off_0x10;
127         unsigned long long              off_0x18;
128         unsigned long long              off_0x20;
129         unsigned long long              off_0x28;
130         unsigned long long              off_0x30;
131         unsigned long long              off_0x38;
132 };
133
134 #define MIP_SW_APIC                     0x1020b
135 #define MIP_FUNC(VALUE)                 (VALUE & 0xff)
136
137 #define APIC_DFR_VALUE_CLUSTER          (APIC_DFR_CLUSTER)
138 #define INT_DELIVERY_MODE_CLUSTER       (dest_LowestPrio)
139 #define INT_DEST_MODE_CLUSTER           (1) /* logical delivery broadcast to all procs */
140
141 #define APIC_DFR_VALUE                  (APIC_DFR_FLAT)
142
143 extern void es7000_enable_apic_mode(void);
144 extern int parse_unisys_oem (char *oemptr);
145 extern int find_unisys_acpi_oem_table(unsigned long *oem_addr);
146 extern void unmap_unisys_acpi_oem_table(unsigned long oem_addr);
147 extern void setup_unisys(void);
148
149 #define apicid_cluster(apicid)          (apicid & 0xF0)
150
151 /*
152  * ES7000 Globals
153  */
154
155 static volatile unsigned long           *psai = NULL;
156 static struct mip_reg                   *mip_reg;
157 static struct mip_reg                   *host_reg;
158 static int                              mip_port;
159 static unsigned long                    mip_addr, host_addr;
160
161 int                                     es7000_plat;
162
163 /*
164  * GSI override for ES7000 platforms.
165  */
166
167 static unsigned int                     base;
168
169 static int
170 es7000_rename_gsi(int ioapic, int gsi)
171 {
172         if (es7000_plat == ES7000_ZORRO)
173                 return gsi;
174
175         if (!base) {
176                 int i;
177                 for (i = 0; i < nr_ioapics; i++)
178                         base += nr_ioapic_registers[i];
179         }
180
181         if (!ioapic && (gsi < 16))
182                 gsi += base;
183
184         return gsi;
185 }
186
187 static int wakeup_secondary_cpu_via_mip(int cpu, unsigned long eip)
188 {
189         unsigned long vect = 0, psaival = 0;
190
191         if (psai == NULL)
192                 return -1;
193
194         vect = ((unsigned long)__pa(eip)/0x1000) << 16;
195         psaival = (0x1000000 | vect | cpu);
196
197         while (*psai & 0x1000000)
198                 ;
199
200         *psai = psaival;
201
202         return 0;
203 }
204
205 static int __init es7000_update_genapic(void)
206 {
207         apic->wakeup_cpu = wakeup_secondary_cpu_via_mip;
208
209         /* MPENTIUMIII */
210         if (boot_cpu_data.x86 == 6 &&
211             (boot_cpu_data.x86_model >= 7 || boot_cpu_data.x86_model <= 11)) {
212                 es7000_update_genapic_to_cluster();
213                 apic->wait_for_init_deassert = NULL;
214                 apic->wakeup_cpu = wakeup_secondary_cpu_via_mip;
215         }
216
217         return 0;
218 }
219
220 void __init setup_unisys(void)
221 {
222         /*
223          * Determine the generation of the ES7000 currently running.
224          *
225          * es7000_plat = 1 if the machine is a 5xx ES7000 box
226          * es7000_plat = 2 if the machine is a x86_64 ES7000 box
227          *
228          */
229         if (!(boot_cpu_data.x86 <= 15 && boot_cpu_data.x86_model <= 2))
230                 es7000_plat = ES7000_ZORRO;
231         else
232                 es7000_plat = ES7000_CLASSIC;
233         ioapic_renumber_irq = es7000_rename_gsi;
234
235         x86_quirks->update_genapic = es7000_update_genapic;
236 }
237
238 /*
239  * Parse the OEM Table
240  */
241
242 int __init parse_unisys_oem (char *oemptr)
243 {
244         int                     i;
245         int                     success = 0;
246         unsigned char           type, size;
247         unsigned long           val;
248         char                    *tp = NULL;
249         struct psai             *psaip = NULL;
250         struct mip_reg_info     *mi;
251         struct mip_reg          *host, *mip;
252
253         tp = oemptr;
254
255         tp += 8;
256
257         for (i=0; i <= 6; i++) {
258                 type = *tp++;
259                 size = *tp++;
260                 tp -= 2;
261                 switch (type) {
262                 case MIP_REG:
263                         mi = (struct mip_reg_info *)tp;
264                         val = MIP_RD_LO(mi->host_reg);
265                         host_addr = val;
266                         host = (struct mip_reg *)val;
267                         host_reg = __va(host);
268                         val = MIP_RD_LO(mi->mip_reg);
269                         mip_port = MIP_PORT(mi->mip_info);
270                         mip_addr = val;
271                         mip = (struct mip_reg *)val;
272                         mip_reg = __va(mip);
273                         pr_debug("es7000_mipcfg: host_reg = 0x%lx \n",
274                                  (unsigned long)host_reg);
275                         pr_debug("es7000_mipcfg: mip_reg = 0x%lx \n",
276                                  (unsigned long)mip_reg);
277                         success++;
278                         break;
279                 case MIP_PSAI_REG:
280                         psaip = (struct psai *)tp;
281                         if (tp != NULL) {
282                                 if (psaip->addr)
283                                         psai = __va(psaip->addr);
284                                 else
285                                         psai = NULL;
286                                 success++;
287                         }
288                         break;
289                 default:
290                         break;
291                 }
292                 tp += size;
293         }
294
295         if (success < 2) {
296                 es7000_plat = NON_UNISYS;
297         } else
298                 setup_unisys();
299
300         return es7000_plat;
301 }
302
303 #ifdef CONFIG_ACPI
304
305 static unsigned long                    oem_addrX;
306 static unsigned long                    oem_size;
307
308 int __init find_unisys_acpi_oem_table(unsigned long *oem_addr)
309 {
310         struct acpi_table_header *header = NULL;
311         int i = 0;
312         acpi_size tbl_size;
313
314         while (ACPI_SUCCESS(acpi_get_table_with_size("OEM1", i++, &header, &tbl_size))) {
315                 if (!memcmp((char *) &header->oem_id, "UNISYS", 6)) {
316                         struct oem_table *t = (struct oem_table *)header;
317
318                         oem_addrX = t->OEMTableAddr;
319                         oem_size = t->OEMTableSize;
320                         early_acpi_os_unmap_memory(header, tbl_size);
321
322                         *oem_addr = (unsigned long)__acpi_map_table(oem_addrX,
323                                                                     oem_size);
324                         return 0;
325                 }
326                 early_acpi_os_unmap_memory(header, tbl_size);
327         }
328         return -1;
329 }
330
331 void __init unmap_unisys_acpi_oem_table(unsigned long oem_addr)
332 {
333         if (!oem_addr)
334                 return;
335
336         __acpi_unmap_table((char *)oem_addr, oem_size);
337 }
338 #endif
339
340 static void es7000_spin(int n)
341 {
342         int i = 0;
343
344         while (i++ < n)
345                 rep_nop();
346 }
347
348 static int __init
349 es7000_mip_write(struct mip_reg *mip_reg)
350 {
351         int status = 0;
352         int spin;
353
354         spin = MIP_SPIN;
355         while ((host_reg->off_0x38 & MIP_VALID) != 0) {
356                 if (--spin <= 0) {
357                         printk("es7000_mip_write: Timeout waiting for Host Valid Flag");
358                         return -1;
359                 }
360                 es7000_spin(MIP_SPIN);
361         }
362
363         memcpy(host_reg, mip_reg, sizeof(struct mip_reg));
364         outb(1, mip_port);
365
366         spin = MIP_SPIN;
367
368         while ((mip_reg->off_0x38 & MIP_VALID) == 0) {
369                 if (--spin <= 0) {
370                         printk("es7000_mip_write: Timeout waiting for MIP Valid Flag");
371                         return -1;
372                 }
373                 es7000_spin(MIP_SPIN);
374         }
375
376         status = (mip_reg->off_0x00 & 0xffff0000000000ULL) >> 48;
377         mip_reg->off_0x38 &= ~MIP_VALID;
378
379         return status;
380 }
381
382 void __init es7000_enable_apic_mode(void)
383 {
384         struct mip_reg es7000_mip_reg;
385         int mip_status;
386
387         if (!es7000_plat)
388                 return;
389
390         printk("ES7000: Enabling APIC mode.\n");
391         memset(&es7000_mip_reg, 0, sizeof(struct mip_reg));
392         es7000_mip_reg.off_0x00 = MIP_SW_APIC;
393         es7000_mip_reg.off_0x38 = MIP_VALID;
394
395         while ((mip_status = es7000_mip_write(&es7000_mip_reg)) != 0) {
396                 printk("es7000_enable_apic_mode: command failed, status = %x\n",
397                         mip_status);
398         }
399 }
400
401 static void es7000_vector_allocation_domain(int cpu, cpumask_t *retmask)
402 {
403         /* Careful. Some cpus do not strictly honor the set of cpus
404          * specified in the interrupt destination when using lowest
405          * priority interrupt delivery mode.
406          *
407          * In particular there was a hyperthreading cpu observed to
408          * deliver interrupts to the wrong hyperthread when only one
409          * hyperthread was specified in the interrupt desitination.
410          */
411         *retmask = (cpumask_t){ { [0] = APIC_ALL_CPUS, } };
412 }
413
414
415 static void es7000_wait_for_init_deassert(atomic_t *deassert)
416 {
417 #ifndef CONFIG_ES7000_CLUSTERED_APIC
418         while (!atomic_read(deassert))
419                 cpu_relax();
420 #endif
421         return;
422 }
423
424 static unsigned int es7000_get_apic_id(unsigned long x)
425 {
426         return (x >> 24) & 0xFF;
427 }
428
429 #ifdef CONFIG_ACPI
430 static int es7000_check_dsdt(void)
431 {
432         struct acpi_table_header header;
433
434         if (ACPI_SUCCESS(acpi_get_table_header(ACPI_SIG_DSDT, 0, &header)) &&
435             !strncmp(header.oem_id, "UNISYS", 6))
436                 return 1;
437         return 0;
438 }
439 #endif
440
441 static void es7000_send_IPI_mask(const struct cpumask *mask, int vector)
442 {
443         default_send_IPI_mask_sequence_phys(mask, vector);
444 }
445
446 static void es7000_send_IPI_allbutself(int vector)
447 {
448         default_send_IPI_mask_allbutself_phys(cpu_online_mask, vector);
449 }
450
451 static void es7000_send_IPI_all(int vector)
452 {
453         es7000_send_IPI_mask(cpu_online_mask, vector);
454 }
455
456 static int es7000_apic_id_registered(void)
457 {
458                 return 1;
459 }
460
461 static const cpumask_t *target_cpus_cluster(void)
462 {
463         return &CPU_MASK_ALL;
464 }
465
466 static const cpumask_t *es7000_target_cpus(void)
467 {
468         return &cpumask_of_cpu(smp_processor_id());
469 }
470
471 static unsigned long
472 es7000_check_apicid_used(physid_mask_t bitmap, int apicid)
473 {
474         return 0;
475 }
476 static unsigned long es7000_check_apicid_present(int bit)
477 {
478         return physid_isset(bit, phys_cpu_present_map);
479 }
480
481 static unsigned long calculate_ldr(int cpu)
482 {
483         unsigned long id = per_cpu(x86_bios_cpu_apicid, cpu);
484
485         return SET_APIC_LOGICAL_ID(id);
486 }
487
488 /*
489  * Set up the logical destination ID.
490  *
491  * Intel recommends to set DFR, LdR and TPR before enabling
492  * an APIC.  See e.g. "AP-388 82489DX User's Manual" (Intel
493  * document number 292116).  So here it goes...
494  */
495 static void es7000_init_apic_ldr_cluster(void)
496 {
497         unsigned long val;
498         int cpu = smp_processor_id();
499
500         apic_write(APIC_DFR, APIC_DFR_VALUE_CLUSTER);
501         val = calculate_ldr(cpu);
502         apic_write(APIC_LDR, val);
503 }
504
505 static void es7000_init_apic_ldr(void)
506 {
507         unsigned long val;
508         int cpu = smp_processor_id();
509
510         apic_write(APIC_DFR, APIC_DFR_VALUE);
511         val = calculate_ldr(cpu);
512         apic_write(APIC_LDR, val);
513 }
514
515 static void es7000_setup_apic_routing(void)
516 {
517         int apic = per_cpu(x86_bios_cpu_apicid, smp_processor_id());
518         printk("Enabling APIC mode:  %s. Using %d I/O APICs, target cpus %lx\n",
519                 (apic_version[apic] == 0x14) ?
520                         "Physical Cluster" : "Logical Cluster",
521                         nr_ioapics, cpus_addr(*es7000_target_cpus())[0]);
522 }
523
524 static int es7000_apicid_to_node(int logical_apicid)
525 {
526         return 0;
527 }
528
529
530 static int es7000_cpu_present_to_apicid(int mps_cpu)
531 {
532         if (!mps_cpu)
533                 return boot_cpu_physical_apicid;
534         else if (mps_cpu < nr_cpu_ids)
535                 return per_cpu(x86_bios_cpu_apicid, mps_cpu);
536         else
537                 return BAD_APICID;
538 }
539
540 static physid_mask_t es7000_apicid_to_cpu_present(int phys_apicid)
541 {
542         static int id = 0;
543         physid_mask_t mask;
544
545         mask = physid_mask_of_physid(id);
546         ++id;
547
548         return mask;
549 }
550
551 /* Mapping from cpu number to logical apicid */
552 static int es7000_cpu_to_logical_apicid(int cpu)
553 {
554 #ifdef CONFIG_SMP
555         if (cpu >= nr_cpu_ids)
556                 return BAD_APICID;
557         return cpu_2_logical_apicid[cpu];
558 #else
559         return logical_smp_processor_id();
560 #endif
561 }
562
563 static physid_mask_t es7000_ioapic_phys_id_map(physid_mask_t phys_map)
564 {
565         /* For clustered we don't have a good way to do this yet - hack */
566         return physids_promote(0xff);
567 }
568
569 static int es7000_check_phys_apicid_present(int cpu_physical_apicid)
570 {
571         boot_cpu_physical_apicid = read_apic_id();
572         return 1;
573 }
574
575 static unsigned int
576 es7000_cpu_mask_to_apicid_cluster(const struct cpumask *cpumask)
577 {
578         int cpus_found = 0;
579         int num_bits_set;
580         int apicid;
581         int cpu;
582
583         num_bits_set = cpumask_weight(cpumask);
584         /* Return id to all */
585         if (num_bits_set == nr_cpu_ids)
586                 return 0xFF;
587         /*
588          * The cpus in the mask must all be on the apic cluster.  If are not
589          * on the same apicid cluster return default value of target_cpus():
590          */
591         cpu = cpumask_first(cpumask);
592         apicid = es7000_cpu_to_logical_apicid(cpu);
593
594         while (cpus_found < num_bits_set) {
595                 if (cpumask_test_cpu(cpu, cpumask)) {
596                         int new_apicid = es7000_cpu_to_logical_apicid(cpu);
597
598                         if (apicid_cluster(apicid) !=
599                                         apicid_cluster(new_apicid)) {
600                                 printk ("%s: Not a valid mask!\n", __func__);
601
602                                 return 0xFF;
603                         }
604                         apicid = new_apicid;
605                         cpus_found++;
606                 }
607                 cpu++;
608         }
609         return apicid;
610 }
611
612 static unsigned int es7000_cpu_mask_to_apicid(const cpumask_t *cpumask)
613 {
614         int cpus_found = 0;
615         int num_bits_set;
616         int apicid;
617         int cpu;
618
619         num_bits_set = cpus_weight(*cpumask);
620         /* Return id to all */
621         if (num_bits_set == nr_cpu_ids)
622                 return es7000_cpu_to_logical_apicid(0);
623         /*
624          * The cpus in the mask must all be on the apic cluster.  If are not
625          * on the same apicid cluster return default value of target_cpus():
626          */
627         cpu = first_cpu(*cpumask);
628         apicid = es7000_cpu_to_logical_apicid(cpu);
629         while (cpus_found < num_bits_set) {
630                 if (cpu_isset(cpu, *cpumask)) {
631                         int new_apicid = es7000_cpu_to_logical_apicid(cpu);
632
633                         if (apicid_cluster(apicid) !=
634                                         apicid_cluster(new_apicid)) {
635                                 printk ("%s: Not a valid mask!\n", __func__);
636
637                                 return es7000_cpu_to_logical_apicid(0);
638                         }
639                         apicid = new_apicid;
640                         cpus_found++;
641                 }
642                 cpu++;
643         }
644         return apicid;
645 }
646
647 static unsigned int
648 es7000_cpu_mask_to_apicid_and(const struct cpumask *inmask,
649                               const struct cpumask *andmask)
650 {
651         int apicid = es7000_cpu_to_logical_apicid(0);
652         cpumask_var_t cpumask;
653
654         if (!alloc_cpumask_var(&cpumask, GFP_ATOMIC))
655                 return apicid;
656
657         cpumask_and(cpumask, inmask, andmask);
658         cpumask_and(cpumask, cpumask, cpu_online_mask);
659         apicid = es7000_cpu_mask_to_apicid(cpumask);
660
661         free_cpumask_var(cpumask);
662
663         return apicid;
664 }
665
666 static int es7000_phys_pkg_id(int cpuid_apic, int index_msb)
667 {
668         return cpuid_apic >> index_msb;
669 }
670
671 void __init es7000_update_genapic_to_cluster(void)
672 {
673         apic->target_cpus = target_cpus_cluster;
674         apic->irq_delivery_mode = INT_DELIVERY_MODE_CLUSTER;
675         apic->irq_dest_mode = INT_DEST_MODE_CLUSTER;
676
677         apic->init_apic_ldr = es7000_init_apic_ldr_cluster;
678
679         apic->cpu_mask_to_apicid = es7000_cpu_mask_to_apicid_cluster;
680 }
681
682 static int probe_es7000(void)
683 {
684         /* probed later in mptable/ACPI hooks */
685         return 0;
686 }
687
688 static __init int
689 es7000_mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
690 {
691         if (mpc->oemptr) {
692                 struct mpc_oemtable *oem_table =
693                         (struct mpc_oemtable *)mpc->oemptr;
694
695                 if (!strncmp(oem, "UNISYS", 6))
696                         return parse_unisys_oem((char *)oem_table);
697         }
698         return 0;
699 }
700
701 #ifdef CONFIG_ACPI
702 /* Hook from generic ACPI tables.c */
703 static int __init es7000_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
704 {
705         unsigned long oem_addr = 0;
706         int check_dsdt;
707         int ret = 0;
708
709         /* check dsdt at first to avoid clear fix_map for oem_addr */
710         check_dsdt = es7000_check_dsdt();
711
712         if (!find_unisys_acpi_oem_table(&oem_addr)) {
713                 if (check_dsdt)
714                         ret = parse_unisys_oem((char *)oem_addr);
715                 else {
716                         setup_unisys();
717                         ret = 1;
718                 }
719                 /*
720                  * we need to unmap it
721                  */
722                 unmap_unisys_acpi_oem_table(oem_addr);
723         }
724         return ret;
725 }
726 #else
727 static int __init es7000_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
728 {
729         return 0;
730 }
731 #endif
732
733
734 struct genapic apic_es7000 = {
735
736         .name                           = "es7000",
737         .probe                          = probe_es7000,
738         .acpi_madt_oem_check            = es7000_acpi_madt_oem_check,
739         .apic_id_registered             = es7000_apic_id_registered,
740
741         .irq_delivery_mode              = dest_Fixed,
742         /* phys delivery to target CPUs: */
743         .irq_dest_mode                  = 0,
744
745         .target_cpus                    = es7000_target_cpus,
746         .disable_esr                    = 1,
747         .dest_logical                   = 0,
748         .check_apicid_used              = es7000_check_apicid_used,
749         .check_apicid_present           = es7000_check_apicid_present,
750
751         .vector_allocation_domain       = es7000_vector_allocation_domain,
752         .init_apic_ldr                  = es7000_init_apic_ldr,
753
754         .ioapic_phys_id_map             = es7000_ioapic_phys_id_map,
755         .setup_apic_routing             = es7000_setup_apic_routing,
756         .multi_timer_check              = NULL,
757         .apicid_to_node                 = es7000_apicid_to_node,
758         .cpu_to_logical_apicid          = es7000_cpu_to_logical_apicid,
759         .cpu_present_to_apicid          = es7000_cpu_present_to_apicid,
760         .apicid_to_cpu_present          = es7000_apicid_to_cpu_present,
761         .setup_portio_remap             = NULL,
762         .check_phys_apicid_present      = es7000_check_phys_apicid_present,
763         .enable_apic_mode               = es7000_enable_apic_mode,
764         .phys_pkg_id                    = es7000_phys_pkg_id,
765         .mps_oem_check                  = es7000_mps_oem_check,
766
767         .get_apic_id                    = es7000_get_apic_id,
768         .set_apic_id                    = NULL,
769         .apic_id_mask                   = 0xFF << 24,
770
771         .cpu_mask_to_apicid             = es7000_cpu_mask_to_apicid,
772         .cpu_mask_to_apicid_and         = es7000_cpu_mask_to_apicid_and,
773
774         .send_IPI_mask                  = es7000_send_IPI_mask,
775         .send_IPI_mask_allbutself       = NULL,
776         .send_IPI_allbutself            = es7000_send_IPI_allbutself,
777         .send_IPI_all                   = es7000_send_IPI_all,
778         .send_IPI_self                  = default_send_IPI_self,
779
780         .wakeup_cpu                     = NULL,
781
782         .trampoline_phys_low            = 0x467,
783         .trampoline_phys_high           = 0x469,
784
785         .wait_for_init_deassert         = es7000_wait_for_init_deassert,
786
787         /* Nothing to do for most platforms, since cleared by the INIT cycle: */
788         .smp_callin_clear_local_apic    = NULL,
789         .store_NMI_vector               = NULL,
790         .inquire_remote_apic            = default_inquire_remote_apic,
791
792         .read                           = native_apic_mem_read,
793         .write                          = native_apic_mem_write,
794         .icr_read                       = native_apic_icr_read,
795         .icr_write                      = native_apic_icr_write,
796         .wait_icr_idle                  = native_apic_wait_icr_idle,
797         .safe_wait_icr_idle             = native_safe_apic_wait_icr_idle,
798 };