summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorTobias Diedrich <ranma+coreboot@tdiedrich.de>2010-11-17 16:27:06 +0000
committerRudolf Marek <r.marek@assembler.cz>2010-11-17 16:27:06 +0000
commit0fe6e9a9a4dfdabf0ad1336112207899b868ee9c (patch)
tree4170ac992ea1e6dea278e816040804742d13bc94 /src/mainboard
parent8520e01af792bca95aaed332bc0cbc7116948706 (diff)
downloadcoreboot-0fe6e9a9a4dfdabf0ad1336112207899b868ee9c.tar.xz
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 <ranma+coreboot@tdiedrich.de> Added M2V-MX SE too. Signed-off-by: Rudolf Marek <r.marek@assembler.cz> Acked-by: Rudolf Marek <r.marek@assembler.cz> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6084 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/asus/m2v-mx_se/acpi_tables.c2
-rw-r--r--src/mainboard/asus/m2v-mx_se/dsdt.asl6
-rw-r--r--src/mainboard/asus/m2v/acpi_tables.c2
-rw-r--r--src/mainboard/asus/m2v/dsdt.asl7
4 files changed, 17 insertions, 0 deletions
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 <console/console.h>
#include <string.h>
#include <arch/acpi.h>
+#include <arch/acpigen.h>
#include <arch/smp/mpspec.h>
#include <arch/ioapic.h>
#include <device/device.h>
@@ -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 */
+ }
}
}
}
diff --git a/src/mainboard/asus/m2v/acpi_tables.c b/src/mainboard/asus/m2v/acpi_tables.c
index 17101fc3b6..2919517ddb 100644
--- a/src/mainboard/asus/m2v/acpi_tables.c
+++ b/src/mainboard/asus/m2v/acpi_tables.c
@@ -25,6 +25,7 @@
#include <console/console.h>
#include <string.h>
#include <arch/acpi.h>
+#include <arch/acpigen.h>
#include <arch/smp/mpspec.h>
#include <arch/ioapic.h>
#include <device/device.h>
@@ -88,6 +89,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/dsdt.asl b/src/mainboard/asus/m2v/dsdt.asl
index 55243db331..959e5a7990 100644
--- a/src/mainboard/asus/m2v/dsdt.asl
+++ b/src/mainboard/asus/m2v/dsdt.asl
@@ -399,6 +399,13 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, "CORE ", "COREBOOT", 1)
}
}
+ Device(MBRS) {
+ Name (_HID, EisaId ("PNP0C02"))
+ Name (_UID, 0x01)
+
+ External(_CRS) /* Resource Template in SSDT */
+ }
+
External(TOM1) /* top of memory below 4GB */
Method(_CRS, 0) {