Attention is currently required from: Lance Zhao, Marc Jones, Jonathan Zhang, Philipp Deppenwiese, Tim Wawrzynczak, Julius Werner, Angel Pons, Subrata Banik, Patrick Rudolph, Peter Tsung Ho Wu, Ron Minnich. Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/52585 )
Change subject: lib: set up specific purpose memory as LB_MEM_SOFT_RESERVED ......................................................................
Patch Set 4:
(1 comment)
File src/include/device/device.h:
https://review.coreboot.org/c/coreboot/+/52585/comment/1a3a05c2_3f3ccab5 PS3, Line 286: fixed_mem_resource(dev, idx, basek, sizek, IORESOURCE_CACHEABLE \
Hi Aaron, thanks for the review. […]
Do you have the output of the physical address space? My suggested patch may not be enough to just cover !SOFT_RESERVE cacheable and !cacheable.
We might need to add IORESOURCE_SOFT_RESERVE to the mask for the MTRR_TYPE_UNCACHEABLE entries as well. My suggested patch was attempting to omit SOFT_RESERVE entirely from the MTRR solution, but it looks like the soft reserve was getting changed to UNCACHEABLE. Give this a go?
diff --git a/src/cpu/x86/mtrr/mtrr.c b/src/cpu/x86/mtrr/mtrr.c index cb7ecdc963..94f6e6dbe4 100644 --- a/src/cpu/x86/mtrr/mtrr.c +++ b/src/cpu/x86/mtrr/mtrr.c @@ -184,8 +184,8 @@ static struct memranges *get_physical_address_space(void) /* Collect cacheable and uncacheable address ranges. The * uncacheable regions take precedence over the cacheable * regions. */ - memranges_init(addr_space, mask, mask, MTRR_TYPE_WRBACK); - memranges_add_resources(addr_space, mask, 0, + memranges_init(addr_space, mask | IORESOURCE_SOFT_RESERVE, mask, MTRR_TYPE_WRBACK); + memranges_add_resources(addr_space, mask | IORESOURCE_SOFT_RESERVE, 0, MTRR_TYPE_UNCACHEABLE);
/* Handle any write combining resources. Only prefetchable
Full logs would be helpful to see the entire address space, etc.