u-boot-brain/arch/x86/cpu
J. Tang 3c03f4928e x86: Force 32-bit jumps in interrupt handlers
Depending upon the compiler used, IRQ entries could vary in sizes. With
GCC 5.x, the code generator will use short jumps for some IRQ entries
but near jumps for others. For example, GCC 5.4.0 generates the
following:

$ objdump -d interrupt.o
<snip>
00000207 <irq_18>:
207:   6a 12                   push   $0x12
209:   eb 85                   jmp    190 <irq_common_entry>

0000020b <irq_19>:
20b:   6a 13                   push   $0x13
20d:   eb 81                   jmp    190 <irq_common_entry>

0000020f <irq_20>:
20f:   6a 14                   push   $0x14
211:   e9 7a ff ff ff          jmp    190 <irq_common_entry>

00000216 <irq_21>:
216:   6a 15                   push   $0x15
218:   e9 73 ff ff ff          jmp    190 <irq_common_entry>

This causes a problem in cpu_init_interrupts(), because the IDT setup
assumed same sizes for all IRQ entries. GCC 4.x always generated 32-bit
jumps, so this previously was not a problem.

The fix is to force 32-bit near jumps for all entries within the
inline assembly. This works for GCC 5.x, and 4.x was already using
that form of jumping.

Signed-off-by: Jason Tang <tang@jtang.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-02-21 14:53:29 +08:00
..
baytrail cpu: Add get_vendor callback 2016-10-19 09:01:51 +02:00
broadwell dm: core: Replace of_offset with accessor 2017-02-08 06:12:14 -07:00
coreboot x86: coreboot: Convert to use DM coreboot video driver 2016-10-12 10:58:24 +08:00
efi x86: Move efi .lds files into the 'lib' directory 2016-11-14 23:24:04 +01:00
i386 x86: Force 32-bit jumps in interrupt handlers 2017-02-21 14:53:29 +08:00
intel_common dm: core: Replace of_offset with accessor 2017-02-08 06:12:14 -07:00
ivybridge dm: core: Replace of_offset with accessor 2017-02-08 06:12:14 -07:00
qemu x86: qemu: Fix compiler warnings for 64-bit 2017-02-07 13:27:08 +08:00
quark x86: quark: Introduce ACPI global NVS 2016-07-12 13:46:01 +08:00
queensbay x86: squash lines for immediate return 2016-09-23 17:53:49 -04:00
x86_64 x86: Wrap print_ch() with config option 2017-02-07 13:23:07 +08:00
call32.S x86: Add a way to call 32-bit code from 64-bit mode 2015-08-05 08:44:07 -06:00
config.mk x86: Update compile/link flags to support 64-bit U-Boot 2017-02-07 13:14:54 +08:00
cpu_x86.c dm: core: Replace of_offset with accessor 2017-02-08 06:12:14 -07:00
cpu.c x86: Move the i386 code into its own directory 2017-02-06 11:38:46 +08:00
ioapic.c x86: Add a function to set the IOAPIC ID 2016-03-17 10:27:27 +08:00
irq.c dm: core: Replace of_offset with accessor 2017-02-08 06:12:14 -07:00
lapic.c x86: Remove SMP limitation in lapic_setup() 2016-05-23 15:27:41 +08:00
Makefile x86: Compile irq.c for 64-bit 2017-02-07 13:23:39 +08:00
mp_init.c dm: core: Replace of_offset with accessor 2017-02-08 06:12:14 -07:00
mtrr.c x86: Test mtrr support flag before accessing mtrr msr 2015-01-23 17:24:55 -07:00
pci.c x86: pci: Drop legacy PCI APIs 2016-02-05 12:47:23 +08:00
resetvec.S Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
sipi_vector.S x86: Add comments to the SIPI vector 2016-03-17 10:27:23 +08:00
start.S x86: make LOAD_FROM_32_BIT visible for platforms 2017-02-07 13:36:50 +08:00
start16.S x86: fsp: Load GDT before calling FspInitEntry 2015-07-14 18:03:15 -06:00
start64.S x86: Add 64-bit start-up code 2017-02-06 11:38:46 +08:00
turbo.c x86: Move turbo_state to global_data 2017-02-07 13:07:26 +08:00
u-boot-64.lds x86: Add a link script for 64-bit x86 2017-02-06 11:38:46 +08:00
u-boot-spl.lds x86: Add a link script for SPL 2017-02-06 11:38:46 +08:00
u-boot.lds x86: Use X86_16BIT_INIT instead of X86_RESET_VECTOR 2017-02-06 11:38:46 +08:00