pciexp_device: Propagate above-4G flag to all hotplug devices
The `IORESOURCE_ABOVE_4G` flag was only explicitly set for our dummy device that reserves resources behind a hotplug port. The current re- source allocator implicitly extends this to all devices below the port, including real ones. Let's make that explicit, so future changes to the allocator can't break this rule. Change-Id: Id4c90b60682cf5c8949cde25362d286625b3e953 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/66719 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
This commit is contained in:
committed by
Martin L Roth
parent
526c64249a
commit
577c6b9225
@@ -5,6 +5,7 @@
|
||||
#include <device/path.h>
|
||||
#include <device/pci_def.h>
|
||||
#include <device/resource.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -939,6 +940,15 @@ const char *dev_path_name(enum device_path_type type)
|
||||
return type_name;
|
||||
}
|
||||
|
||||
bool dev_path_hotplug(const struct device *dev)
|
||||
{
|
||||
for (dev = dev->bus->dev; dev != dev->bus->dev; dev = dev->bus->dev) {
|
||||
if (dev->hotplug_port)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void log_resource(const char *type, const struct device *dev, const struct resource *res,
|
||||
const char *srcfile, const int line)
|
||||
{
|
||||
|
Reference in New Issue
Block a user