mirror of
				https://source.denx.de/u-boot/u-boot.git
				synced 2025-10-31 00:11:51 +01:00 
			
		
		
		
	The EFI stub provides information to U-Boot in a table. This includes the memory map which is needed to decide where to relocate U-Boot. Collect this information in the early init code and store it in global_data. Fix up the BIST code at the same time since we don't have it when booting from EFI and can assume it is 0. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
		
			
				
	
	
		
			27 lines
		
	
	
		
			675 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			675 B
		
	
	
	
		
			C
		
	
	
	
	
	
| /*
 | |
|  * Adapted from Linux v2.6.36 kernel: arch/powerpc/kernel/asm-offsets.c
 | |
|  *
 | |
|  * This program is used to generate definitions needed by
 | |
|  * assembly language modules.
 | |
|  *
 | |
|  * We use the technique used in the OSF Mach kernel code:
 | |
|  * generate asm statements containing #defines,
 | |
|  * compile this file to assembler, and then extract the
 | |
|  * #defines from the assembly-language output.
 | |
|  *
 | |
|  * SPDX-License-Identifier:	GPL-2.0+
 | |
|  */
 | |
| 
 | |
| #include <common.h>
 | |
| #include <linux/kbuild.h>
 | |
| 
 | |
| int main(void)
 | |
| {
 | |
| 	DEFINE(GD_BIST, offsetof(gd_t, arch.bist));
 | |
| #ifdef CONFIG_HAVE_FSP
 | |
| 	DEFINE(GD_HOB_LIST, offsetof(gd_t, arch.hob_list));
 | |
| #endif
 | |
| 	DEFINE(GD_TABLE, offsetof(gd_t, arch.table));
 | |
| 	return 0;
 | |
| }
 |