2 * Machine specific setup for generic
6 #include <linux/init.h>
7 #include <linux/interrupt.h>
9 #include <asm/arch_hooks.h>
11 #include <asm/setup.h>
13 #ifdef CONFIG_HOTPLUG_CPU
14 #define DEFAULT_SEND_IPI (1)
16 #define DEFAULT_SEND_IPI (0)
19 int no_broadcast
=DEFAULT_SEND_IPI
;
22 * pre_intr_init_hook - initialisation prior to setting up interrupt vectors
25 * Perform any necessary interrupt initialisation prior to setting up
26 * the "ordinary" interrupt call gates. For legacy reasons, the ISA
27 * interrupts should be initialised here if the machine emulates a PC
30 void __init
pre_intr_init_hook(void)
36 * IRQ2 is cascade interrupt to second interrupt controller
38 static struct irqaction irq2
= { no_action
, 0, CPU_MASK_NONE
, "cascade", NULL
, NULL
};
41 * intr_init_hook - post gate setup interrupt initialisation
44 * Fill in any interrupts that may have been left out by the general
45 * init_IRQ() routine. interrupts having to do with the machine rather
46 * than the devices on the I/O bus (like APIC interrupts in intel MP
47 * systems) are started here.
49 void __init
intr_init_hook(void)
51 #ifdef CONFIG_X86_LOCAL_APIC
60 * pre_setup_arch_hook - hook called prior to any setup_arch() execution
63 * generally used to activate any machine specific identification
64 * routines that may be needed before setup_arch() runs. On VISWS
65 * this is used to get the board revision and type.
67 void __init
pre_setup_arch_hook(void)
72 * trap_init_hook - initialise system specific traps
75 * Called as the final act of trap_init(). Used in VISWS to initialise
76 * the various board specific APIC traps.
78 void __init
trap_init_hook(void)
82 static struct irqaction irq0
= {
83 .handler
= timer_interrupt
,
84 .flags
= IRQF_DISABLED
| IRQF_NOBALANCING
| IRQF_IRQPOLL
,
85 .mask
= CPU_MASK_NONE
,
90 * time_init_hook - do any specific initialisations for the system timer.
93 * Must plug the system timer interrupt source at HZ into the IRQ listed
94 * in irq_vectors.h:TIMER_IRQ
96 void __init
time_init_hook(void)
98 irq0
.mask
= cpumask_of_cpu(0);
104 * mca_nmi_hook - hook into MCA specific NMI chain
107 * The MCA (Microchannel Arcitecture) has an NMI chain for NMI sources
108 * along the MCA bus. Use this to hook into that chain if you will need
111 void mca_nmi_hook(void)
113 /* If I recall correctly, there's a whole bunch of other things that
114 * we can do to check for NMI problems, but that's all I know about
118 printk("NMI generated from unknown source!\n");
122 static __init
int no_ipi_broadcast(char *str
)
124 get_option(&str
, &no_broadcast
);
125 printk ("Using %s mode\n", no_broadcast
? "No IPI Broadcast" :
130 __setup("no_ipi_broadcast", no_ipi_broadcast
);
132 static int __init
print_ipi_mode(void)
134 printk ("Using IPI %s mode\n", no_broadcast
? "No-Shortcut" :
139 late_initcall(print_ipi_mode
);
142 * machine_specific_memory_setup - Hook for machine specific memory setup.
145 * This is included late in kernel/setup.c so that it can make
146 * use of all of the static functions.
149 char * __init
machine_specific_memory_setup(void)
157 * Try to copy the BIOS-supplied E820-map.
159 * Otherwise fake a memory map; one section from 0k->640k,
160 * the next section from 1mb->appropriate_mem_k
162 sanitize_e820_map(E820_MAP
, &E820_MAP_NR
);
163 if (copy_e820_map(E820_MAP
, E820_MAP_NR
) < 0) {
164 unsigned long mem_size
;
166 /* compare results from other methods and take the greater */
167 if (ALT_MEM_K
< EXT_MEM_K
) {
168 mem_size
= EXT_MEM_K
;
171 mem_size
= ALT_MEM_K
;
176 add_memory_region(0, LOWMEMSIZE(), E820_RAM
);
177 add_memory_region(HIGH_MEMORY
, mem_size
<< 10, E820_RAM
);