Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37197 )
Change subject: drivers/amd/agesa/romstage: Only mark cbmem as UC if needed
......................................................................
drivers/amd/agesa/romstage: Only mark cbmem as UC if needed
Now cbmem is flushed to dram before calling postcar stage.
UNTESTED.
Change-Id: Iaa0d154e2c5b2052027d07ad26e31f3ff63ae9f3
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/drivers/amd/agesa/mtrr_fixme.c
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/97/37197/1
diff --git a/src/drivers/amd/agesa/mtrr_fixme.c b/src/drivers/amd/agesa/mtrr_fixme.c
index bbb9eb0..9e63425 100644
--- a/src/drivers/amd/agesa/mtrr_fixme.c
+++ b/src/drivers/amd/agesa/mtrr_fixme.c
@@ -51,6 +51,10 @@
if (s3resume)
return;
+ /* We worry about cbmem hitting dram later */
+ if (clflush_supported())
+ return;
+
/* For normal path, INIT_POST has returned with all
* memory set WB cacheable. But we need CBMEM as UC
* to make CAR teardown with invalidation without
--
To view, visit https://review.coreboot.org/c/coreboot/+/37197
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iaa0d154e2c5b2052027d07ad26e31f3ff63ae9f3
Gerrit-Change-Number: 37197
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: newchange
Michał Żygowski has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32989
Change subject: mb/pcengines/apu2: describe serial ports in ACPI
......................................................................
mb/pcengines/apu2: describe serial ports in ACPI
FreeBSD users had to manually configure serial ports on their
installations. Defining serial ports in ACPI save that effort.
Signed-off-by: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Change-Id: I0de4172a1884abbe9d625060a9045c9d71469e27
---
A src/mainboard/pcengines/apu2/acpi/superio.asl
M src/mainboard/pcengines/apu2/dsdt.asl
2 files changed, 68 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/32989/1
diff --git a/src/mainboard/pcengines/apu2/acpi/superio.asl b/src/mainboard/pcengines/apu2/acpi/superio.asl
new file mode 100644
index 0000000..c61e3d7
--- /dev/null
+++ b/src/mainboard/pcengines/apu2/acpi/superio.asl
@@ -0,0 +1,65 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2019 PC Engines Gmbh
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+Scope (\_SB.PCI0.LIBR) {
+
+ Device (COM1) {
+ Name (_HID, EISAID ("PNP0501"))
+ Name (_UID, 1)
+
+ Method (_STA, 0, NotSerialized) {
+ Return (0x0F)
+ }
+
+ Name (_CRS, ResourceTemplate ()
+ {
+ IO (Decode16, 0x03F8, 0x3F8, 0x08, 0x08)
+ IRQNoFlags () {4}
+ })
+
+ Name (_PRS, ResourceTemplate ()
+ {
+ StartDependentFn (0, 0) {
+ IO (Decode16, 0x03F8, 0x3F8, 0x08, 0x08)
+ IRQNoFlags () {4}
+ }
+ EndDependentFn ()
+ })
+ }
+
+ Device (COM2) {
+ Name (_HID, EISAID ("PNP0501"))
+ Name (_UID, 2)
+
+ Method (_STA, 0, NotSerialized) {
+ Return (0x0F)
+ }
+
+ Name (_CRS, ResourceTemplate ()
+ {
+ IO (Decode16, 0x02F8, 0x2F8, 0x08, 0x08)
+ IRQNoFlags () {3}
+ })
+
+ Name (_PRS, ResourceTemplate ()
+ {
+ StartDependentFn (0, 0) {
+ IO (Decode16, 0x02F8, 0x2F8, 0x08, 0x08)
+ IRQNoFlags () {3}
+ }
+ EndDependentFn ()
+ })
+ }
+}
\ No newline at end of file
diff --git a/src/mainboard/pcengines/apu2/dsdt.asl b/src/mainboard/pcengines/apu2/dsdt.asl
index 3bf0ed6..409f03d 100644
--- a/src/mainboard/pcengines/apu2/dsdt.asl
+++ b/src/mainboard/pcengines/apu2/dsdt.asl
@@ -81,5 +81,8 @@
/* Define the System Indicators for the platform */
#include "acpi/si.asl"
+
+ /* Super IO devices (COM ports) */
+ #include "acpi/superio.asl"
}
/* End of ASL file */
--
To view, visit https://review.coreboot.org/c/coreboot/+/32989
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I0de4172a1884abbe9d625060a9045c9d71469e27
Gerrit-Change-Number: 32989
Gerrit-PatchSet: 1
Gerrit-Owner: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-MessageType: newchange
Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/41959 )
Change subject: [WIP] device/resource_allocator_v4.5: Directly recurse in pass 2 for each bridge resource
......................................................................
[WIP] device/resource_allocator_v4.5: Directly recurse in pass 2 for each bridge resource
Change-Id: I9b31c7242f0cdf747db48203243f0e9ba6643bf4
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
---
M src/device/resource_allocator_v4.5.c
1 file changed, 40 insertions(+), 61 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/59/41959/1
diff --git a/src/device/resource_allocator_v4.5.c b/src/device/resource_allocator_v4.5.c
index 34e9fdd..96a6503 100644
--- a/src/device/resource_allocator_v4.5.c
+++ b/src/device/resource_allocator_v4.5.c
@@ -394,6 +394,43 @@
}
/*
+ * Pass 2 of the resource allocator at the bridge level loops through
+ * all the resources for the bridge and assigns all the base addresses
+ * of its children's resources of the same type. update_bridge_resource()
+ * of pass 1 pre-calculated the offsets of these bases inside the bridge
+ * resource. Now that the bridge resource is allocated, all we have to
+ * do is to add its final base to these offsets.
+ *
+ * Once allocation at the current bridge is complete, resource allocator
+ * continues walking down the downstream bridges until it hits the leaf
+ * devices.
+ */
+static void allocate_bridge_resources(const struct device *bridge, struct resource *bridge_res)
+{
+ void assign_resource_cb(void *param, struct device *dev, struct resource *res)
+ {
+ /* We have to filter the same resources as update_bridge_resource(). */
+ if (!res->size || !res->limit)
+ return;
+
+ assign_resource(res, *(const resource_t *)param + res->base, dev);
+
+ if (res->flags & IORESOURCE_BRIDGE)
+ allocate_bridge_resources(dev, res);
+ }
+
+ const unsigned long type_mask = IORESOURCE_TYPE_MASK | IORESOURCE_PREFETCH;
+ const unsigned long type = bridge_res->flags & type_mask;
+ struct bus *const bus = bridge->link_list;
+
+ if (!bus)
+ return;
+
+ /* Run assign_resource_cb() for all downstream resources of the same type. */
+ search_bus_resources(bus, type_mask, type, assign_resource_cb, &bridge_res->base);
+}
+
+/*
* This is where the actual allocation of resources happens during
* pass 2. We construct a list of memory ranges corresponding to the
* resource of a given type, then look for the biggest unallocated
@@ -433,63 +470,15 @@
}
assign_resource(res, base, dev);
+
+ if (res->flags & IORESOURCE_BRIDGE)
+ allocate_bridge_resources(dev, res);
}
cleanup_resource_ranges(domain, &ranges, domain_res);
}
/*
- * Pass 2 of the resource allocator at the bridge level loops through
- * all the resources for the bridge and assigns all the base addresses
- * of its children's resources of the same type. update_bridge_resource()
- * of pass 1 pre-calculated the offsets of these bases inside the bridge
- * resource. Now that the bridge resource is allocated, all we have to
- * do is to add its final base to these offsets.
- *
- * Once allocation at the current bridge is complete, resource allocator
- * continues walking down the downstream bridges until it hits the leaf
- * devices.
- */
-static void allocate_bridge_resources(const struct device *bridge)
-{
- void assign_resource_cb(void *param, struct device *dev, struct resource *res)
- {
- /* We have to filter the same resources as update_bridge_resource(). */
- if (!res->size || !res->limit)
- return;
-
- assign_resource(res, *(const resource_t *)param + res->base, dev);
- }
-
- const unsigned long type_mask = IORESOURCE_TYPE_MASK | IORESOURCE_PREFETCH;
- struct bus *const bus = bridge->link_list;
- struct resource *res;
- struct device *child;
-
- for (res = bridge->resource_list; res != NULL; res = res->next) {
- if (!res->size)
- continue;
-
- if (!(res->flags & IORESOURCE_BRIDGE))
- continue;
-
- if (!(res->flags & IORESOURCE_ASSIGNED))
- continue;
-
- /* Run assign_resource_cb() for all downstream resources of the same type. */
- search_bus_resources(bus, type_mask, res->flags & type_mask,
- assign_resource_cb, &res->base);
- }
-
- for (child = bus->children; child != NULL; child = child->sibling) {
- if (!dev_has_children(child))
- continue;
-
- allocate_bridge_resources(child);
- }
-}
-
-/*
* Pass 2 of resource allocator begins at the domain level. Every domain
* has two types of resources - io and mem. For each of these resources,
* this function creates a list of memory ranges that can be used for
@@ -504,8 +493,6 @@
*/
static void allocate_domain_resources(const struct device *domain)
{
- struct device *child;
-
/* Resource type I/O */
allocate_toplevel_resources(domain, IORESOURCE_IO);
@@ -516,14 +503,6 @@
* on the biggest resource requirement.
*/
allocate_toplevel_resources(domain, IORESOURCE_MEM);
-
- for (child = domain->link_list->children; child; child = child->sibling) {
- if (!dev_has_children(child))
- continue;
-
- /* Continue allocation for all downstream bridges. */
- allocate_bridge_resources(child);
- }
}
/*
--
To view, visit https://review.coreboot.org/c/coreboot/+/41959
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I9b31c7242f0cdf747db48203243f0e9ba6643bf4
Gerrit-Change-Number: 41959
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-MessageType: newchange