lib/fit: support booting initrd placed above 4GiB
Store initrd offset as 64bit integer. Tested on Cavium CN81XX EVB: The initrd could be loaded when placed above 4GiB. Previously it failed to find the initrd. Change-Id: I5d1ae860ae4a4465546bc0ef89937d611d1e56ab Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/28002 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
This commit is contained in:
		
				
					committed by
					
						
						Philipp Deppenwiese
					
				
			
			
				
	
			
			
			
						parent
						
							6539edef41
						
					
				
				
					commit
					3fca4ed45e
				
			@@ -212,12 +212,11 @@ void fit_add_ramdisk(struct device_tree *tree, void *ramdisk_addr,
 | 
			
		||||
	struct device_tree_node *node;
 | 
			
		||||
	node = dt_find_node(tree->root, path, NULL, NULL, 1);
 | 
			
		||||
 | 
			
		||||
	/* Warning: this assumes the ramdisk is currently located below 4GiB. */
 | 
			
		||||
	u32 start = (uintptr_t)ramdisk_addr;
 | 
			
		||||
	u32 end = start + ramdisk_size;
 | 
			
		||||
	u64 start = (uintptr_t)ramdisk_addr;
 | 
			
		||||
	u64 end = start + ramdisk_size;
 | 
			
		||||
 | 
			
		||||
	dt_add_u32_prop(node, "linux,initrd-start", start);
 | 
			
		||||
	dt_add_u32_prop(node, "linux,initrd-end", end);
 | 
			
		||||
	dt_add_u64_prop(node, "linux,initrd-start", start);
 | 
			
		||||
	dt_add_u64_prop(node, "linux,initrd-end", end);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void update_reserve_map(uint64_t start, uint64_t end,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user