summaryrefslogtreecommitdiff
path: root/arch/x86/lib/tables.c
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2015-06-23 04:18:52 (GMT)
committerSimon Glass <sjg@chromium.org>2015-07-15 00:03:17 (GMT)
commit07545d861ccc54aecbeaa51b264258b90912b856 (patch)
tree3e64d07fec4397bf2b7dc0433ca74b184b6c3318 /arch/x86/lib/tables.c
parent7f5df8d42d8eb0fbdb6bf168fd530aa0f01b99c7 (diff)
downloadu-boot-07545d861ccc54aecbeaa51b264258b90912b856.tar.xz
x86: Generate a valid MultiProcessor (MP) table
Implement write_mp_table() to create a minimal working MP table. This includes an MP floating table, a configuration table header and all of the 5 base configuration table entries. The I/O interrupt assignment table entry is created based on the same information used in the creation of PIRQ routing table from device tree. A check duplicated entry logic is applied to prevent writing multiple I/O interrupt entries with the same information. Use a Kconfig option GENERATE_MP_TABLE to tell U-Boot whether we need actually write the MP table at the F seg, just like we did for PIRQ routing and SFI tables. With MP table existence, linux kernel will switch to I/O APIC and local APIC to process all the peripheral interrupts instead of 8259 PICs. This takes full advantage of the multicore hardware and the SMP kernel. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86/lib/tables.c')
-rw-r--r--arch/x86/lib/tables.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/lib/tables.c b/arch/x86/lib/tables.c
index 41c50bc..75ffbc1 100644
--- a/arch/x86/lib/tables.c
+++ b/arch/x86/lib/tables.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <asm/sfi.h>
+#include <asm/mpspec.h>
#include <asm/tables.h>
u8 table_compute_checksum(void *v, int len)
@@ -46,4 +47,8 @@ void write_tables(void)
rom_table_end = write_sfi_table(rom_table_end);
rom_table_end = ALIGN(rom_table_end, 1024);
#endif
+#ifdef CONFIG_GENERATE_MP_TABLE
+ rom_table_end = write_mp_table(rom_table_end);
+ rom_table_end = ALIGN(rom_table_end, 1024);
+#endif
}