Vladimir Serbinenko (phcoder@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7052
-gerrit
commit 7eb4012d6e75bb2120131d69da7093dec11b2c9b Author: Vladimir Serbinenko phcoder@gmail.com Date: Sat Oct 11 23:45:40 2014 +0200
acpi: make fill_slit and fill_srat into arguments.
SLIT and SRAT are created this way only on amdk8 and amdfam10. This saves the need of having a lot of dummies.
Change-Id: I76d042702209cd6d11ee78ac22cf9fe9d30d0ca5 Signed-off-by: Vladimir Serbinenko phcoder@gmail.com --- src/arch/x86/boot/acpi.c | 6 ++-- src/arch/x86/include/arch/acpi.h | 8 ++--- src/mainboard/aopen/dxplplusu/acpi_tables.c | 12 -------- src/mainboard/apple/macbook21/acpi_tables.c | 12 -------- src/mainboard/emulation/qemu-i440fx/acpi_tables.c | 12 -------- src/mainboard/emulation/qemu-q35/acpi_tables.c | 12 -------- src/mainboard/getac/p470/acpi_tables.c | 12 -------- src/mainboard/google/bolt/acpi_tables.c | 12 -------- src/mainboard/google/butterfly/acpi_tables.c | 12 -------- src/mainboard/google/falco/acpi_tables.c | 12 -------- src/mainboard/google/link/acpi_tables.c | 12 -------- src/mainboard/google/panther/acpi_tables.c | 12 -------- src/mainboard/google/parrot/acpi_tables.c | 12 -------- src/mainboard/google/peppy/acpi_tables.c | 12 -------- src/mainboard/google/samus/acpi_tables.c | 12 -------- src/mainboard/google/slippy/acpi_tables.c | 12 -------- src/mainboard/google/stout/acpi_tables.c | 12 -------- src/mainboard/ibase/mb899/acpi_tables.c | 13 --------- src/mainboard/intel/baskingridge/acpi_tables.c | 12 -------- src/mainboard/intel/cougar_canyon2/acpi_tables.c | 12 -------- src/mainboard/intel/d945gclf/acpi_tables.c | 12 -------- src/mainboard/intel/eagleheights/acpi_tables.c | 13 --------- src/mainboard/intel/emeraldlake2/acpi_tables.c | 12 -------- src/mainboard/intel/wtm2/acpi_tables.c | 12 -------- src/mainboard/intel/xe7501devkit/acpi_tables.c | 12 -------- src/mainboard/iwave/iWRainbowG6/acpi_tables.c | 12 -------- src/mainboard/kontron/986lcd-m/acpi_tables.c | 12 -------- src/mainboard/kontron/ktqm77/acpi_tables.c | 12 -------- src/mainboard/lenovo/t520/acpi_tables.c | 12 -------- src/mainboard/lenovo/t530/acpi_tables.c | 12 -------- src/mainboard/lenovo/t60/acpi_tables.c | 12 -------- src/mainboard/lenovo/x200/acpi_tables.c | 12 -------- src/mainboard/lenovo/x201/acpi_tables.c | 12 -------- src/mainboard/lenovo/x220/acpi_tables.c | 12 -------- src/mainboard/lenovo/x230/acpi_tables.c | 12 -------- src/mainboard/lenovo/x60/acpi_tables.c | 12 -------- src/mainboard/packardbell/ms2290/acpi_tables.c | 12 -------- src/mainboard/roda/rk886ex/acpi_tables.c | 12 -------- src/mainboard/roda/rk9/acpi_tables.c | 12 -------- src/mainboard/samsung/lumpy/acpi_tables.c | 12 -------- src/mainboard/samsung/stumpy/acpi_tables.c | 12 -------- src/mainboard/via/epia-m/acpi_tables.c | 12 -------- src/mainboard/via/epia-m700/acpi_tables.c | 12 -------- src/mainboard/via/epia-n/acpi_tables.c | 12 -------- src/mainboard/via/vt8454c/acpi_tables.c | 12 -------- src/northbridge/amd/agesa/00730F01/northbridge.c | 12 -------- src/northbridge/amd/agesa/family12/northbridge.c | 12 -------- src/northbridge/amd/agesa/family14/northbridge.c | 13 --------- src/northbridge/amd/agesa/family15/northbridge.c | 12 -------- src/northbridge/amd/agesa/family15tn/northbridge.c | 12 -------- src/northbridge/amd/agesa/family16kb/northbridge.c | 12 -------- src/northbridge/amd/amdfam10/acpi.c | 8 ++--- src/northbridge/amd/amdk8/acpi.c | 34 ++++++++++++++++++++-- src/northbridge/amd/amdk8/acpi.h | 1 + src/northbridge/amd/amdk8/northbridge.c | 31 -------------------- src/northbridge/intel/fsp_rangeley/northbridge.c | 12 -------- src/soc/intel/baytrail/northcluster.c | 12 -------- src/soc/intel/fsp_baytrail/northcluster.c | 12 -------- src/southbridge/intel/i82371eb/acpi_tables.c | 12 -------- 59 files changed, 45 insertions(+), 682 deletions(-)
diff --git a/src/arch/x86/boot/acpi.c b/src/arch/x86/boot/acpi.c index cea7679..0853ef5 100644 --- a/src/arch/x86/boot/acpi.c +++ b/src/arch/x86/boot/acpi.c @@ -324,7 +324,8 @@ int acpi_create_srat_mem(acpi_srat_mem_t *mem, u8 node, u32 basek, u32 sizek, }
/* http://www.microsoft.com/whdc/system/sysinternals/sratdwn.mspx */ -void acpi_create_srat(acpi_srat_t *srat) +void acpi_create_srat(acpi_srat_t *srat, + unsigned long (*acpi_fill_srat)(unsigned long current)) { acpi_header_t *header = &(srat->header); unsigned long current = (unsigned long)srat + sizeof(acpi_srat_t); @@ -415,7 +416,8 @@ unsigned long acpi_create_dmar_drhd_ds_pci(unsigned long current, u8 segment, }
/* http://h21007.www2.hp.com/portal/download/files/unprot/Itanium/slit.pdf */ -void acpi_create_slit(acpi_slit_t *slit) +void acpi_create_slit(acpi_slit_t *slit, + unsigned long (*acpi_fill_slit)(unsigned long current)) { acpi_header_t *header = &(slit->header); unsigned long current = (unsigned long)slit + sizeof(acpi_slit_t); diff --git a/src/arch/x86/include/arch/acpi.h b/src/arch/x86/include/arch/acpi.h index 005ed7c..7fbaf7f 100644 --- a/src/arch/x86/include/arch/acpi.h +++ b/src/arch/x86/include/arch/acpi.h @@ -488,8 +488,6 @@ unsigned long fw_cfg_acpi_tables(unsigned long start); unsigned long write_acpi_tables(unsigned long addr); unsigned long acpi_fill_madt(unsigned long current); unsigned long acpi_fill_mcfg(unsigned long current); -unsigned long acpi_fill_srat(unsigned long current); -unsigned long acpi_fill_slit(unsigned long current); #if !IS_ENABLED(CONFIG_PER_DEVICE_ACPI_TABLES) unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_table_id); @@ -527,9 +525,11 @@ int acpi_create_srat_mem(acpi_srat_mem_t *mem, u8 node, u32 basek,u32 sizek, int acpi_create_mcfg_mmconfig(acpi_mcfg_mmconfig_t *mmconfig, u32 base, u16 seg_nr, u8 start, u8 end); unsigned long acpi_create_srat_lapics(unsigned long current); -void acpi_create_srat(acpi_srat_t *srat); +void acpi_create_srat(acpi_srat_t *srat, + unsigned long (*acpi_fill_srat)(unsigned long current));
-void acpi_create_slit(acpi_slit_t *slit); +void acpi_create_slit(acpi_slit_t *slit, + unsigned long (*acpi_fill_slit)(unsigned long current));
void acpi_create_hpet(acpi_hpet_t *hpet); unsigned long acpi_write_hpet(unsigned long start, acpi_rsdp_t *rsdp); diff --git a/src/mainboard/aopen/dxplplusu/acpi_tables.c b/src/mainboard/aopen/dxplplusu/acpi_tables.c index 405c420..0d114b7 100644 --- a/src/mainboard/aopen/dxplplusu/acpi_tables.c +++ b/src/mainboard/aopen/dxplplusu/acpi_tables.c @@ -30,18 +30,6 @@ #include <assert.h> #include "bus.h"
-unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - // Not implemented - return current; -} - unsigned long acpi_fill_madt(unsigned long current) { unsigned int irq_start = 0; diff --git a/src/mainboard/apple/macbook21/acpi_tables.c b/src/mainboard/apple/macbook21/acpi_tables.c index ada7d08..2a675c0 100644 --- a/src/mainboard/apple/macbook21/acpi_tables.c +++ b/src/mainboard/apple/macbook21/acpi_tables.c @@ -77,15 +77,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/emulation/qemu-i440fx/acpi_tables.c b/src/mainboard/emulation/qemu-i440fx/acpi_tables.c index da1a78d..11afc3a 100644 --- a/src/mainboard/emulation/qemu-i440fx/acpi_tables.c +++ b/src/mainboard/emulation/qemu-i440fx/acpi_tables.c @@ -49,15 +49,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/emulation/qemu-q35/acpi_tables.c b/src/mainboard/emulation/qemu-q35/acpi_tables.c index 2d00a0d..7201bf1 100644 --- a/src/mainboard/emulation/qemu-q35/acpi_tables.c +++ b/src/mainboard/emulation/qemu-q35/acpi_tables.c @@ -198,12 +198,6 @@ unsigned long acpi_fill_madt(unsigned long current) return current; }
-unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - unsigned long acpi_fill_mcfg(unsigned long current) { device_t dev; @@ -221,9 +215,3 @@ unsigned long acpi_fill_mcfg(unsigned long current) reg & 0xf0000000, 0x0, 0x0, 255); return current; } - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/getac/p470/acpi_tables.c b/src/mainboard/getac/p470/acpi_tables.c index 1e22eae..fd10746 100644 --- a/src/mainboard/getac/p470/acpi_tables.c +++ b/src/mainboard/getac/p470/acpi_tables.c @@ -122,18 +122,6 @@ unsigned long acpi_fill_madt(unsigned long current) return current; }
-unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} - #define ALIGN_CURRENT current = (ALIGN(current, 16)) unsigned long mainboard_write_acpi_tables(unsigned long start, acpi_rsdp_t *rsdp) { diff --git a/src/mainboard/google/bolt/acpi_tables.c b/src/mainboard/google/bolt/acpi_tables.c index 3b851c4..1dea444 100644 --- a/src/mainboard/google/bolt/acpi_tables.c +++ b/src/mainboard/google/bolt/acpi_tables.c @@ -99,15 +99,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/google/butterfly/acpi_tables.c b/src/mainboard/google/butterfly/acpi_tables.c index dcaf384..8f0da6a 100644 --- a/src/mainboard/google/butterfly/acpi_tables.c +++ b/src/mainboard/google/butterfly/acpi_tables.c @@ -92,15 +92,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/google/falco/acpi_tables.c b/src/mainboard/google/falco/acpi_tables.c index 5849087..343f15e 100644 --- a/src/mainboard/google/falco/acpi_tables.c +++ b/src/mainboard/google/falco/acpi_tables.c @@ -93,15 +93,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/google/link/acpi_tables.c b/src/mainboard/google/link/acpi_tables.c index 14baad2..7d17d6f 100644 --- a/src/mainboard/google/link/acpi_tables.c +++ b/src/mainboard/google/link/acpi_tables.c @@ -100,15 +100,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/google/panther/acpi_tables.c b/src/mainboard/google/panther/acpi_tables.c index 9340c5a..a018f38 100644 --- a/src/mainboard/google/panther/acpi_tables.c +++ b/src/mainboard/google/panther/acpi_tables.c @@ -110,15 +110,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/google/parrot/acpi_tables.c b/src/mainboard/google/parrot/acpi_tables.c index e4e1797..9671943 100644 --- a/src/mainboard/google/parrot/acpi_tables.c +++ b/src/mainboard/google/parrot/acpi_tables.c @@ -91,15 +91,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/google/peppy/acpi_tables.c b/src/mainboard/google/peppy/acpi_tables.c index 265fe65..12dd698 100644 --- a/src/mainboard/google/peppy/acpi_tables.c +++ b/src/mainboard/google/peppy/acpi_tables.c @@ -102,15 +102,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/google/samus/acpi_tables.c b/src/mainboard/google/samus/acpi_tables.c index 1978494..ccfce2a 100644 --- a/src/mainboard/google/samus/acpi_tables.c +++ b/src/mainboard/google/samus/acpi_tables.c @@ -97,15 +97,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/google/slippy/acpi_tables.c b/src/mainboard/google/slippy/acpi_tables.c index 3b851c4..1dea444 100644 --- a/src/mainboard/google/slippy/acpi_tables.c +++ b/src/mainboard/google/slippy/acpi_tables.c @@ -99,15 +99,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/google/stout/acpi_tables.c b/src/mainboard/google/stout/acpi_tables.c index 504ae64..0dfdeff 100644 --- a/src/mainboard/google/stout/acpi_tables.c +++ b/src/mainboard/google/stout/acpi_tables.c @@ -97,15 +97,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/ibase/mb899/acpi_tables.c b/src/mainboard/ibase/mb899/acpi_tables.c index d7012d1..fdbbec4 100644 --- a/src/mainboard/ibase/mb899/acpi_tables.c +++ b/src/mainboard/ibase/mb899/acpi_tables.c @@ -66,16 +66,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} - diff --git a/src/mainboard/intel/baskingridge/acpi_tables.c b/src/mainboard/intel/baskingridge/acpi_tables.c index d5a5f03..ec54a20 100644 --- a/src/mainboard/intel/baskingridge/acpi_tables.c +++ b/src/mainboard/intel/baskingridge/acpi_tables.c @@ -112,15 +112,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/intel/cougar_canyon2/acpi_tables.c b/src/mainboard/intel/cougar_canyon2/acpi_tables.c index dca35b5..3ba0e96 100644 --- a/src/mainboard/intel/cougar_canyon2/acpi_tables.c +++ b/src/mainboard/intel/cougar_canyon2/acpi_tables.c @@ -91,15 +91,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/intel/d945gclf/acpi_tables.c b/src/mainboard/intel/d945gclf/acpi_tables.c index a27ea57..12822c1 100644 --- a/src/mainboard/intel/d945gclf/acpi_tables.c +++ b/src/mainboard/intel/d945gclf/acpi_tables.c @@ -55,15 +55,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/intel/eagleheights/acpi_tables.c b/src/mainboard/intel/eagleheights/acpi_tables.c index 06ef183..4d5575d 100644 --- a/src/mainboard/intel/eagleheights/acpi_tables.c +++ b/src/mainboard/intel/eagleheights/acpi_tables.c @@ -67,16 +67,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} - diff --git a/src/mainboard/intel/emeraldlake2/acpi_tables.c b/src/mainboard/intel/emeraldlake2/acpi_tables.c index 3d95586..9015085 100644 --- a/src/mainboard/intel/emeraldlake2/acpi_tables.c +++ b/src/mainboard/intel/emeraldlake2/acpi_tables.c @@ -109,15 +109,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/intel/wtm2/acpi_tables.c b/src/mainboard/intel/wtm2/acpi_tables.c index 20814ab..a9cc99a 100644 --- a/src/mainboard/intel/wtm2/acpi_tables.c +++ b/src/mainboard/intel/wtm2/acpi_tables.c @@ -109,15 +109,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/intel/xe7501devkit/acpi_tables.c b/src/mainboard/intel/xe7501devkit/acpi_tables.c index fb7da1f..1d6dc78 100644 --- a/src/mainboard/intel/xe7501devkit/acpi_tables.c +++ b/src/mainboard/intel/xe7501devkit/acpi_tables.c @@ -15,18 +15,6 @@ #include "bus.h" #include "ioapic.h"
-unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - // Not implemented - return current; -} - unsigned long acpi_fill_madt(unsigned long current) { unsigned int irq_start = 0; diff --git a/src/mainboard/iwave/iWRainbowG6/acpi_tables.c b/src/mainboard/iwave/iWRainbowG6/acpi_tables.c index 4dcda79..1577dca 100644 --- a/src/mainboard/iwave/iWRainbowG6/acpi_tables.c +++ b/src/mainboard/iwave/iWRainbowG6/acpi_tables.c @@ -69,15 +69,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - /* Not implemented. */ - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/kontron/986lcd-m/acpi_tables.c b/src/mainboard/kontron/986lcd-m/acpi_tables.c index 0560f8a..fdbbec4 100644 --- a/src/mainboard/kontron/986lcd-m/acpi_tables.c +++ b/src/mainboard/kontron/986lcd-m/acpi_tables.c @@ -66,15 +66,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/kontron/ktqm77/acpi_tables.c b/src/mainboard/kontron/ktqm77/acpi_tables.c index 0d90403..b88e04f 100644 --- a/src/mainboard/kontron/ktqm77/acpi_tables.c +++ b/src/mainboard/kontron/ktqm77/acpi_tables.c @@ -80,15 +80,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/lenovo/t520/acpi_tables.c b/src/mainboard/lenovo/t520/acpi_tables.c index 26a459d..27860f0 100644 --- a/src/mainboard/lenovo/t520/acpi_tables.c +++ b/src/mainboard/lenovo/t520/acpi_tables.c @@ -82,15 +82,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/lenovo/t530/acpi_tables.c b/src/mainboard/lenovo/t530/acpi_tables.c index 26a459d..27860f0 100644 --- a/src/mainboard/lenovo/t530/acpi_tables.c +++ b/src/mainboard/lenovo/t530/acpi_tables.c @@ -82,15 +82,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/lenovo/t60/acpi_tables.c b/src/mainboard/lenovo/t60/acpi_tables.c index ada7d08..2a675c0 100644 --- a/src/mainboard/lenovo/t60/acpi_tables.c +++ b/src/mainboard/lenovo/t60/acpi_tables.c @@ -77,15 +77,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/lenovo/x200/acpi_tables.c b/src/mainboard/lenovo/x200/acpi_tables.c index 77491dc..a09259b 100644 --- a/src/mainboard/lenovo/x200/acpi_tables.c +++ b/src/mainboard/lenovo/x200/acpi_tables.c @@ -77,15 +77,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/lenovo/x201/acpi_tables.c b/src/mainboard/lenovo/x201/acpi_tables.c index b8979f4..31accee 100644 --- a/src/mainboard/lenovo/x201/acpi_tables.c +++ b/src/mainboard/lenovo/x201/acpi_tables.c @@ -83,15 +83,3 @@ unsigned long acpi_fill_madt(unsigned long current) MP_IRQ_TRIGGER_EDGE, 0x01); return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - /* Not implemented */ - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/lenovo/x220/acpi_tables.c b/src/mainboard/lenovo/x220/acpi_tables.c index 26a459d..27860f0 100644 --- a/src/mainboard/lenovo/x220/acpi_tables.c +++ b/src/mainboard/lenovo/x220/acpi_tables.c @@ -82,15 +82,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/lenovo/x230/acpi_tables.c b/src/mainboard/lenovo/x230/acpi_tables.c index 26a459d..27860f0 100644 --- a/src/mainboard/lenovo/x230/acpi_tables.c +++ b/src/mainboard/lenovo/x230/acpi_tables.c @@ -82,15 +82,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/lenovo/x60/acpi_tables.c b/src/mainboard/lenovo/x60/acpi_tables.c index ada7d08..2a675c0 100644 --- a/src/mainboard/lenovo/x60/acpi_tables.c +++ b/src/mainboard/lenovo/x60/acpi_tables.c @@ -77,15 +77,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/packardbell/ms2290/acpi_tables.c b/src/mainboard/packardbell/ms2290/acpi_tables.c index b8979f4..31accee 100644 --- a/src/mainboard/packardbell/ms2290/acpi_tables.c +++ b/src/mainboard/packardbell/ms2290/acpi_tables.c @@ -83,15 +83,3 @@ unsigned long acpi_fill_madt(unsigned long current) MP_IRQ_TRIGGER_EDGE, 0x01); return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - /* Not implemented */ - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/roda/rk886ex/acpi_tables.c b/src/mainboard/roda/rk886ex/acpi_tables.c index ada7d08..2a675c0 100644 --- a/src/mainboard/roda/rk886ex/acpi_tables.c +++ b/src/mainboard/roda/rk886ex/acpi_tables.c @@ -77,15 +77,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/roda/rk9/acpi_tables.c b/src/mainboard/roda/rk9/acpi_tables.c index 77491dc..a09259b 100644 --- a/src/mainboard/roda/rk9/acpi_tables.c +++ b/src/mainboard/roda/rk9/acpi_tables.c @@ -77,15 +77,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/samsung/lumpy/acpi_tables.c b/src/mainboard/samsung/lumpy/acpi_tables.c index 24a0efd..e787158 100644 --- a/src/mainboard/samsung/lumpy/acpi_tables.c +++ b/src/mainboard/samsung/lumpy/acpi_tables.c @@ -110,15 +110,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/samsung/stumpy/acpi_tables.c b/src/mainboard/samsung/stumpy/acpi_tables.c index 2d24822..8125630 100644 --- a/src/mainboard/samsung/stumpy/acpi_tables.c +++ b/src/mainboard/samsung/stumpy/acpi_tables.c @@ -110,15 +110,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/via/epia-m/acpi_tables.c b/src/mainboard/via/epia-m/acpi_tables.c index d02bac2..5804ddb 100644 --- a/src/mainboard/via/epia-m/acpi_tables.c +++ b/src/mainboard/via/epia-m/acpi_tables.c @@ -17,20 +17,8 @@ unsigned long acpi_fill_mcfg(unsigned long current) return current; }
-unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - unsigned long acpi_fill_madt(unsigned long current) { /* Nothing to do */ return current; } - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/via/epia-m700/acpi_tables.c b/src/mainboard/via/epia-m700/acpi_tables.c index c841f2c..06a91c7 100644 --- a/src/mainboard/via/epia-m700/acpi_tables.c +++ b/src/mainboard/via/epia-m700/acpi_tables.c @@ -101,15 +101,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - /* Not implemented. */ - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT. */ - return current; -} diff --git a/src/mainboard/via/epia-n/acpi_tables.c b/src/mainboard/via/epia-n/acpi_tables.c index a48a438..5a5c642 100644 --- a/src/mainboard/via/epia-n/acpi_tables.c +++ b/src/mainboard/via/epia-n/acpi_tables.c @@ -58,12 +58,6 @@ unsigned long acpi_fill_mcfg(unsigned long current) return current; }
-unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - unsigned long acpi_create_madt_lapic_nmis(unsigned long current, u16 flags, u8 lint) { @@ -109,9 +103,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/mainboard/via/vt8454c/acpi_tables.c b/src/mainboard/via/vt8454c/acpi_tables.c index 1830c1d..c8f81a1 100644 --- a/src/mainboard/via/vt8454c/acpi_tables.c +++ b/src/mainboard/via/vt8454c/acpi_tables.c @@ -44,15 +44,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current; } - -unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} diff --git a/src/northbridge/amd/agesa/00730F01/northbridge.c b/src/northbridge/amd/agesa/00730F01/northbridge.c index b95dab7..3a04b95 100644 --- a/src/northbridge/amd/agesa/00730F01/northbridge.c +++ b/src/northbridge/amd/agesa/00730F01/northbridge.c @@ -494,18 +494,6 @@ unsigned long acpi_fill_hest(acpi_hest_t *hest) return (unsigned long)current; }
-/* Implemented with AGESA-specific code. Dummy to keep linker happy. */ -unsigned long acpi_fill_slit(unsigned long current) -{ - return current; -} - -/* Implemented with AGESA-specific code. Dummy to keep linker happy. */ -unsigned long acpi_fill_srat(unsigned long current) -{ - return current; -} - static void northbridge_fill_ssdt_generator(void) { msr_t msr; diff --git a/src/northbridge/amd/agesa/family12/northbridge.c b/src/northbridge/amd/agesa/family12/northbridge.c index 13d096f..314b2bc 100644 --- a/src/northbridge/amd/agesa/family12/northbridge.c +++ b/src/northbridge/amd/agesa/family12/northbridge.c @@ -840,18 +840,6 @@ unsigned long acpi_fill_hest(acpi_hest_t *hest) return (unsigned long)current; }
-/* Implemented with AGESA-specific code. Dummy to keep linker happy. */ -unsigned long acpi_fill_slit(unsigned long current) -{ - return current; -} - -/* Implemented with AGESA-specific code. Dummy to keep linker happy. */ -unsigned long acpi_fill_srat(unsigned long current) -{ - return current; -} - static void northbridge_fill_ssdt_generator(void) { msr_t msr; diff --git a/src/northbridge/amd/agesa/family14/northbridge.c b/src/northbridge/amd/agesa/family14/northbridge.c index 63b663a..71c6dd0 100644 --- a/src/northbridge/amd/agesa/family14/northbridge.c +++ b/src/northbridge/amd/agesa/family14/northbridge.c @@ -931,19 +931,6 @@ static unsigned long agesa_write_acpi_tables(unsigned long current, return current; }
- -/* Implemented with AGESA-specific code. Dummy to keep linker happy. */ -unsigned long acpi_fill_slit(unsigned long current) -{ - return current; -} - -/* Implemented with AGESA-specific code. Dummy to keep linker happy. */ -unsigned long acpi_fill_srat(unsigned long current) -{ - return current; -} - static struct device_operations northbridge_operations = { .read_resources = nb_read_resources, .set_resources = nb_set_resources, diff --git a/src/northbridge/amd/agesa/family15/northbridge.c b/src/northbridge/amd/agesa/family15/northbridge.c index 98ae44d..5e4672c 100644 --- a/src/northbridge/amd/agesa/family15/northbridge.c +++ b/src/northbridge/amd/agesa/family15/northbridge.c @@ -520,18 +520,6 @@ unsigned long acpi_fill_hest(acpi_hest_t *hest) return (unsigned long)current; }
-/* Implemented with AGESA-specific code. Dummy to keep linker happy. */ -unsigned long acpi_fill_slit(unsigned long current) -{ - return current; -} - -/* Implemented with AGESA-specific code. Dummy to keep linker happy. */ -unsigned long acpi_fill_srat(unsigned long current) -{ - return current; -} - static void northbridge_fill_ssdt_generator(void) { msr_t msr; diff --git a/src/northbridge/amd/agesa/family15tn/northbridge.c b/src/northbridge/amd/agesa/family15tn/northbridge.c index 4583e2e..57b4657 100644 --- a/src/northbridge/amd/agesa/family15tn/northbridge.c +++ b/src/northbridge/amd/agesa/family15tn/northbridge.c @@ -487,18 +487,6 @@ unsigned long acpi_fill_hest(acpi_hest_t *hest) return (unsigned long)current; }
-/* Implemented with AGESA-specific code. Dummy to keep linker happy. */ -unsigned long acpi_fill_slit(unsigned long current) -{ - return current; -} - -/* Implemented with AGESA-specific code. Dummy to keep linker happy. */ -unsigned long acpi_fill_srat(unsigned long current) -{ - return current; -} - static void northbridge_fill_ssdt_generator(void) { msr_t msr; diff --git a/src/northbridge/amd/agesa/family16kb/northbridge.c b/src/northbridge/amd/agesa/family16kb/northbridge.c index 3f2238e..91477c8 100644 --- a/src/northbridge/amd/agesa/family16kb/northbridge.c +++ b/src/northbridge/amd/agesa/family16kb/northbridge.c @@ -493,18 +493,6 @@ unsigned long acpi_fill_hest(acpi_hest_t *hest) return (unsigned long)current; }
-/* Implemented with AGESA-specific code. Dummy to keep linker happy. */ -unsigned long acpi_fill_slit(unsigned long current) -{ - return current; -} - -/* Implemented with AGESA-specific code. Dummy to keep linker happy. */ -unsigned long acpi_fill_srat(unsigned long current) -{ - return current; -} - static void northbridge_fill_ssdt_generator(void) { msr_t msr; diff --git a/src/northbridge/amd/amdfam10/acpi.c b/src/northbridge/amd/amdfam10/acpi.c index 463fb7c..de7d7b5 100644 --- a/src/northbridge/amd/amdfam10/acpi.c +++ b/src/northbridge/amd/amdfam10/acpi.c @@ -108,7 +108,7 @@ static void set_srat_mem(void *gp, struct device *dev, struct resource *res) state->current += acpi_create_srat_mem((acpi_srat_mem_t *)state->current, (res->index & 0xf), basek, sizek, 1); }
-unsigned long acpi_fill_srat(unsigned long current) +static unsigned long acpi_fill_srat(unsigned long current) { struct acpi_srat_mem_state srat_mem_state;
@@ -129,7 +129,7 @@ unsigned long acpi_fill_srat(unsigned long current) return current; }
-unsigned long acpi_fill_slit(unsigned long current) +static unsigned long acpi_fill_slit(unsigned long current) { /* need to find out the node num at first */ /* fill the first 8 byte with that num */ @@ -315,7 +315,7 @@ unsigned long northbridge_write_acpi_tables(unsigned long current, current = ALIGN(current, 8); printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current); srat = (acpi_srat_t *) current; - acpi_create_srat(srat); + acpi_create_srat(srat, acpi_fill_srat); current += srat->header.length; acpi_add_table(rsdp, srat);
@@ -323,7 +323,7 @@ unsigned long northbridge_write_acpi_tables(unsigned long current, current = ALIGN(current, 8); printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current); slit = (acpi_slit_t *) current; - acpi_create_slit(slit); + acpi_create_slit(slit, acpi_fill_slit); current += slit->header.length; acpi_add_table(rsdp, slit);
diff --git a/src/northbridge/amd/amdk8/acpi.c b/src/northbridge/amd/amdk8/acpi.c index 2706c64..96e618f 100644 --- a/src/northbridge/amd/amdk8/acpi.c +++ b/src/northbridge/amd/amdk8/acpi.c @@ -114,7 +114,7 @@ static void set_srat_mem(void *gp, struct device *dev, struct resource *res) state->current += acpi_create_srat_mem((acpi_srat_mem_t *)state->current, (res->index & 0xf), basek, sizek, 1); }
-unsigned long acpi_fill_srat(unsigned long current) +static unsigned long acpi_fill_srat(unsigned long current) { struct acpi_srat_mem_state srat_mem_state;
@@ -135,7 +135,7 @@ unsigned long acpi_fill_srat(unsigned long current) return current; }
-unsigned long acpi_fill_slit(unsigned long current) +static unsigned long acpi_fill_slit(unsigned long current) { /* need to find out the node num at first */ /* fill the first 8 byte with that num */ @@ -204,6 +204,36 @@ unsigned long acpi_fill_slit(unsigned long current) return current; }
+unsigned long northbridge_write_acpi_tables(unsigned long start, acpi_rsdp_t *rsdp) +{ + unsigned long current; + acpi_srat_t *srat; + acpi_slit_t *slit; + + current = start; + + /* Fills sysconf structure needed for SRAT and SLIT. */ + get_bus_conf(); + + current = ALIGN(current, 16); + srat = (acpi_srat_t *) current; + printk(BIOS_DEBUG, "ACPI: * SRAT @ %p\n", srat); + acpi_create_srat(srat, acpi_fill_srat); + current += srat->header.length; + acpi_add_table(rsdp, srat); + + /* SLIT */ + current = ALIGN(current, 16); + slit = (acpi_slit_t *) current; + printk(BIOS_DEBUG, "ACPI: * SLIT @ %p\n", slit); + acpi_create_slit(slit, acpi_fill_slit); + current+=slit->header.length; + acpi_add_table(rsdp,slit); + + return current; +} + + static int k8acpi_write_HT(void) { int len, lenp, i;
diff --git a/src/northbridge/amd/amdk8/acpi.h b/src/northbridge/amd/amdk8/acpi.h index 6d7c4d9..4d71507 100644 --- a/src/northbridge/amd/amdk8/acpi.h +++ b/src/northbridge/amd/amdk8/acpi.h @@ -22,5 +22,6 @@ #include <arch/acpigen.h>
void k8acpi_write_vars(void); +unsigned long northbridge_write_acpi_tables(unsigned long start, acpi_rsdp_t *rsdp);
#endif diff --git a/src/northbridge/amd/amdk8/northbridge.c b/src/northbridge/amd/amdk8/northbridge.c index 081ec6d..fa8b2d6 100644 --- a/src/northbridge/amd/amdk8/northbridge.c +++ b/src/northbridge/amd/amdk8/northbridge.c @@ -584,37 +584,6 @@ static void mcf0_control_init(struct device *dev) #endif }
-#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES) -static unsigned long northbridge_write_acpi_tables(unsigned long start, acpi_rsdp_t *rsdp) -{ - unsigned long current; - acpi_srat_t *srat; - acpi_slit_t *slit; - - current = start; - - /* Fills sysconf structure needed for SRAT and SLIT. */ - get_bus_conf(); - - current = ALIGN(current, 16); - srat = (acpi_srat_t *) current; - printk(BIOS_DEBUG, "ACPI: * SRAT @ %p\n", srat); - acpi_create_srat(srat); - current += srat->header.length; - acpi_add_table(rsdp, srat); - - /* SLIT */ - current = ALIGN(current, 16); - slit = (acpi_slit_t *) current; - printk(BIOS_DEBUG, "ACPI: * SLIT @ %p\n", slit); - acpi_create_slit(slit); - current+=slit->header.length; - acpi_add_table(rsdp,slit); - - return current; -} -#endif - static struct device_operations northbridge_operations = { .read_resources = amdk8_read_resources, .set_resources = amdk8_set_resources, diff --git a/src/northbridge/intel/fsp_rangeley/northbridge.c b/src/northbridge/intel/fsp_rangeley/northbridge.c index be3a3ac..0df40a8 100644 --- a/src/northbridge/intel/fsp_rangeley/northbridge.c +++ b/src/northbridge/intel/fsp_rangeley/northbridge.c @@ -212,18 +212,6 @@ static void northbridge_enable(device_t dev) { }
-unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} - static struct pci_operations intel_pci_ops = { .set_subsystem = intel_set_subsystem, }; diff --git a/src/soc/intel/baytrail/northcluster.c b/src/soc/intel/baytrail/northcluster.c index 2807a2d..152962d 100644 --- a/src/soc/intel/baytrail/northcluster.c +++ b/src/soc/intel/baytrail/northcluster.c @@ -132,18 +132,6 @@ static void nc_read_resources(device_t dev) chromeos_reserve_ram_oops(dev, index++); }
-unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} - static struct device_operations nc_ops = { .read_resources = nc_read_resources, .acpi_fill_ssdt_generator = generate_cpu_entries, diff --git a/src/soc/intel/fsp_baytrail/northcluster.c b/src/soc/intel/fsp_baytrail/northcluster.c index a440b9a..2ceda42 100644 --- a/src/soc/intel/fsp_baytrail/northcluster.c +++ b/src/soc/intel/fsp_baytrail/northcluster.c @@ -204,18 +204,6 @@ static void nc_enable(device_t dev) print_fsp_info(); }
-unsigned long acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long acpi_fill_srat(unsigned long current) -{ - /* No NUMA, no SRAT */ - return current; -} - static struct device_operations nc_ops = { .read_resources = nc_read_resources, .acpi_fill_ssdt_generator = generate_cpu_entries, diff --git a/src/southbridge/intel/i82371eb/acpi_tables.c b/src/southbridge/intel/i82371eb/acpi_tables.c index 32d149e..8f3d5b5 100644 --- a/src/southbridge/intel/i82371eb/acpi_tables.c +++ b/src/southbridge/intel/i82371eb/acpi_tables.c @@ -61,18 +61,6 @@ void generate_cpu_entries(void) acpigen_pop_len(); }
-unsigned long __attribute__((weak)) acpi_fill_slit(unsigned long current) -{ - // Not implemented - return current; -} - -unsigned long __attribute__((weak)) acpi_fill_srat(unsigned long current) -{ - // Not implemented - return current; -} - unsigned long __attribute__((weak)) acpi_fill_madt(unsigned long current) { /* mainboard has no ioapic */