tests/lib: Set IORESOURCE_ASSIGNED for bootmem-test and memrange-test
IORESOURCE_ASSIGNED is used to indicate the resource is actually mapped host physical address space. E.g. PCI BAR resources not mapped are not regarded as assigned. In src/include/device/device.h, standard macros, e.g. ram_resource, mmio_resource, io_resource, et al, are all following the usage above. This patch updates the bootmem-test and memrange-test to follow the usage as well. Change-Id: Ifc19302482038267cef01321a46a72d90ca76d35 Signed-off-by: Shuo Liu <shuo.liu@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/66450 Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Jonathan Zhang <jonzhang@fb.com> Reviewed-by: Jan Dabros <jsd@semihalf.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
		@@ -116,11 +116,11 @@ struct bootmem_ranges_t *ranges = ranges_mock;
 | 
			
		||||
/* Note that second region overlaps first */
 | 
			
		||||
struct resource res_mock[] = {
 | 
			
		||||
	{ .base = ZERO_REGION_START, .size = ZERO_REGION_SIZE, .next = &res_mock[1],
 | 
			
		||||
	  .flags = IORESOURCE_CACHEABLE | IORESOURCE_MEM },
 | 
			
		||||
	  .flags = IORESOURCE_CACHEABLE | IORESOURCE_MEM | IORESOURCE_ASSIGNED },
 | 
			
		||||
	{ .base = CACHEABLE_START, .size = CACHEABLE_SIZE, .next = &res_mock[2],
 | 
			
		||||
	  .flags = IORESOURCE_CACHEABLE | IORESOURCE_MEM },
 | 
			
		||||
	  .flags = IORESOURCE_CACHEABLE | IORESOURCE_MEM | IORESOURCE_ASSIGNED },
 | 
			
		||||
	{ .base = RESERVED_START, .size = RESERVED_SIZE, .next = NULL,
 | 
			
		||||
	  .flags = IORESOURCE_RESERVE | IORESOURCE_MEM }
 | 
			
		||||
	  .flags = IORESOURCE_RESERVE | IORESOURCE_MEM | IORESOURCE_ASSIGNED }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/* Device simulating RAM */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user