soc/intel/xeon_sp: Add domain resource window creation utils
It might be benefical to have utils for domain resource window creation so that the correct IORESOURCE flags used could be guaranteed. TEST=Build and boot on intel/archercity CRB TEST=Build on intel/avenuecity CRB Change-Id: I1e90512a48ab002a1c1d5031585ddadaac63673e Signed-off-by: Shuo Liu <shuo.liu@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82103 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
parent
94bfdd1282
commit
6c708d8a46
5 changed files with 81 additions and 85 deletions
|
|
@ -776,7 +776,7 @@ void show_all_devs_resources(int debug_level, const char *msg)
|
|||
}
|
||||
}
|
||||
|
||||
const struct resource *fixed_resource_range_idx(struct device *dev, unsigned long index,
|
||||
const struct resource *resource_range_idx(struct device *dev, unsigned long index,
|
||||
uint64_t base, uint64_t size, unsigned long flags)
|
||||
{
|
||||
struct resource *resource;
|
||||
|
|
@ -785,8 +785,13 @@ const struct resource *fixed_resource_range_idx(struct device *dev, unsigned lon
|
|||
|
||||
resource = new_resource(dev, index);
|
||||
resource->base = base;
|
||||
resource->size = size;
|
||||
resource->flags = IORESOURCE_FIXED | IORESOURCE_ASSIGNED;
|
||||
|
||||
if (flags & IORESOURCE_FIXED)
|
||||
resource->size = size;
|
||||
if (flags & IORESOURCE_BRIDGE)
|
||||
resource->limit = base + size - 1;
|
||||
|
||||
resource->flags = IORESOURCE_ASSIGNED;
|
||||
resource->flags |= flags;
|
||||
|
||||
printk(BIOS_SPEW, "dev: %s, index: 0x%lx, base: 0x%llx, size: 0x%llx\n",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue