From 0fe6e9a9a4dfdabf0ad1336112207899b868ee9c Mon Sep 17 00:00:00 2001 From: Tobias Diedrich Date: Wed, 17 Nov 2010 16:27:06 +0000 Subject: Dynamically generate PNP0C02 mainboard resources in SSDT Updated patch with improved comments and small bugfix (use same value for min and max on io resource). While adding the area between TOM1 and 4GB to \SB.PCI0._CRS seems to be the easiest way to get both Linux and Windows happy, it is not quite correct because reserved areas like APIC, MMCONF etc. ranges need to be excluded. This is a proof of concept patch for the M2V board that dynamically creates a ResourceTemplate() containing these in the SSDT and adds a corresponding PNP0C02 device to the DSDT. All resources that have IORESOURCE_RESERVE and (IORESOURCE_MEM or IORESOURCE_IO) set are added. Signed-off-by: Tobias Diedrich Added M2V-MX SE too. Signed-off-by: Rudolf Marek Acked-by: Rudolf Marek git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6084 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/mainboard/asus/m2v-mx_se/acpi_tables.c | 2 ++ src/mainboard/asus/m2v-mx_se/dsdt.asl | 6 ++++++ 2 files changed, 8 insertions(+) (limited to 'src/mainboard/asus/m2v-mx_se') diff --git a/src/mainboard/asus/m2v-mx_se/acpi_tables.c b/src/mainboard/asus/m2v-mx_se/acpi_tables.c index 43cd3291fd..bce295dc45 100644 --- a/src/mainboard/asus/m2v-mx_se/acpi_tables.c +++ b/src/mainboard/asus/m2v-mx_se/acpi_tables.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -87,6 +88,7 @@ unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_ta { k8acpi_write_vars(); amd_model_fxx_generate_powernow(0, 0, 0); + acpigen_write_mainboard_resources("\\_SB.PCI0.MBRS", "_CRS"); return (unsigned long) (acpigen_get_current()); } diff --git a/src/mainboard/asus/m2v-mx_se/dsdt.asl b/src/mainboard/asus/m2v-mx_se/dsdt.asl index 493f1d6c8f..b1c2d38707 100644 --- a/src/mainboard/asus/m2v-mx_se/dsdt.asl +++ b/src/mainboard/asus/m2v-mx_se/dsdt.asl @@ -242,6 +242,12 @@ DefinitionBlock ("DSDT.aml", "DSDT", 1, "LXBIOS", "LXB-DSDT", 1) } } } + /* Dummy device to hold auto generated reserved resources */ + Device(MBRS) { + Name (_HID, EisaId ("PNP0C02")) + Name (_UID, 0x01) + External(_CRS) /* Resource Template in SSDT */ + } } } } -- cgit v1.2.3