1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #include <arch/smp/mpspec.h>
4 #include <arch/ioapic.h>
6 static void *smp_write_config_table(void *v
)
9 struct mp_config_table
*mc
;
11 mc
= (void *)(((char *)v
) + SMP_FLOATING_TABLE_LEN
);
15 smp_write_processors(mc
);
17 mptable_write_buses(mc
, NULL
, &isa_bus
);
19 /* External Intel 82093AA IOAPIC. */
20 u8 ioapic_id
= smp_write_ioapic_from_hw(mc
, IO_APIC_ADDR
);
22 /* Legacy Interrupts */
23 mptable_add_isa_interrupts(mc
, isa_bus
, ioapic_id
, 0);
25 /* I/O Ints: Type Trigger Polarity Bus ID IRQ APIC ID PIN# */
26 smp_write_pci_intsrc(mc
, mp_INT
, 0x0, 0x04, 3, ioapic_id
, 0x13); /* UHCI */
28 /* Local Ints: Type Trigger Polarity Bus ID IRQ APIC ID PIN# */
29 mptable_lintsrc(mc
, isa_bus
);
31 /* Compute the checksums. */
32 return mptable_finalize(mc
);
35 unsigned long write_smp_table(unsigned long addr
)
38 v
= smp_write_floating_table(addr
, 0);
39 return (unsigned long)smp_write_config_table(v
);