coreboot-kgpe-d16/src/mainboard/kontron
Kyösti Mälkki 860cff96dc mb/*/mptable.c: Replace magic constants
Read I/O APIC ID and version from hardware registers.

With coccinelle below, and minor fixups.

@ r1 @
expression E1, E2, E3, E4;
typedef u8;
@@

-smp_write_ioapic(E1, E2, E3, E4);
+u8 ioapic_id = smp_write_ioapic_from_hw(E1, E4);

@ r2 @
expression E1, E2, E3, E4;
@@

-mptable_add_isa_interrupts(E1, E2, E3, E4)
+mptable_add_isa_interrupts(E1, E2, ioapic_id, E4)

@ r3 @
expression E1, E2, E3, E4, E5, E6, E7;
@@

-smp_write_pci_intsrc(E1, E2, E3, E4, E5, E6, E7)
+smp_write_pci_intsrc(E1, E2, E3, E4, E5, ioapic_id, E7)

@ r4 @
symbol mp_INT;
expression E1, E3, E4, E5, E6, E7;
@@

-smp_write_intsrc(E1, mp_INT, E3, E4, E5, E6, E7)
+smp_write_intsrc(E1, mp_INT, E3, E4, E5, ioapic_id, E7)

Change-Id: I20799f0c09cf0292661e1f3cb93373b2c68b7314
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55284
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2021-06-14 05:14:06 +00:00
..
986lcd-m mb/*/mptable.c: Replace magic constants 2021-06-14 05:14:06 +00:00
bsl6 src: Retype option API to use unsigned integers 2021-05-06 14:48:15 +00:00
ktqm77 bd82x6x boards: Drop redundant c2_latency 2021-06-07 04:53:39 +00:00
mal10 mb/kontron/mal10: Use mainboard_ops driver for GPIO configuration 2021-05-28 18:30:10 +00:00
Kconfig
Kconfig.name