Messages in this thread Patch in this message | | | Date | Wed, 16 Jul 2008 01:36:21 -0700 | From | "Yinghai Lu" <> | Subject | Re: 2.6.26-rc9-git9 doesn't boot on Macintel |
| |
On Wed, Jul 16, 2008 at 12:50 AM, Justin Mattock <justinmattock@gmail.com> wrote: > On Wed, Jul 16, 2008 at 7:44 AM, Yinghai Lu <yhlu.kernel@gmail.com> wrote: >> I looked at your dmesg from 2.6.25.10 >> >> it tried to use mmconfig, and later fall back to conf1, because >> 1. your MCFG said it support bus [0,255], and range will be >> [0xf0000000, 0xffffffff] >> 2. firmware only reserve [0xf0000000, 0xf4000000) >> >> and 2.5.25 will not check acp reserved range. >> >> from 2.6.26, it will check if the [0xf0000000, 0xffffffff] is reserved >> via acpi dsdt _crs? >> it will fail too. >> >> So MCFG table is broken. >> >> You need to get firmware update from your vendor. >> >> or we need to put that system on DMI check to change end_bus_number >> from 0xff to 0x3f >> >> ps: mem=2g will not work, it will can not change mcfg table etc... you >> need take out 1G ram out. >> >> YH >> > > Well shit man, that sucks... > how hard is it to do a DMI check? > regards;
please check attached patch... not sure the DMI_MATCH(DMI_PRODUCT_NAME, "MacPro2"), is right or not.
YH [PATCH] x86,pci: dmi check for mackpro 2.2 mmconf
change the mconf bus range from [0,0xff] to to [0, 0x3f] to match range [0xf0000000, 0xf4000000) in e820 tables.
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
--- arch/x86/pci/mmconfig-shared.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+)
Index: linux-2.6/arch/x86/pci/mmconfig-shared.c =================================================================== --- linux-2.6.orig/arch/x86/pci/mmconfig-shared.c +++ linux-2.6/arch/x86/pci/mmconfig-shared.c @@ -374,6 +374,40 @@ reject: static int __initdata known_bridge; +static int __devinit check_mmconf(const struct dmi_system_id *d) +{ + typeof(pci_mmcfg_config[0]) *cfg; + + if ((pci_mmcfg_config_num != 1) || + (pci_mmcfg_config == NULL) || + (pci_mmcfg_config[0].address == 0)) + return 1; + + cfg = &pci_mmcfg_config[0]; + + if (cfg->start_bus_number == 0 && cfg->end_bus_number > 0x3f) + cfg->end_bus_number = 0x3f; + + return 0; +} + +static struct dmi_system_id __devinitdata mmconf_dmi_table[] = { + { + .callback = check_mmconf, + .ident = "Apple", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Apple"), + DMI_MATCH(DMI_PRODUCT_NAME, "MacPro2"), + }, + }, + {} +}; + +void __init check_mmconf_dmi(void) +{ + dmi_check_system(mmconf_dmi_table); +} + static void __init __pci_mmcfg_init(int early) { /* MMCONFIG disabled */ @@ -395,6 +429,7 @@ static void __init __pci_mmcfg_init(int if (!known_bridge) { acpi_table_parse(ACPI_SIG_MCFG, acpi_parse_mcfg); + check_mmconf_dmi(); pci_mmcfg_reject_broken(early); } | |